Nasty.Translation.ASTTransformer (Nasty v0.3.0)
View SourceTransforms Abstract Syntax Trees between languages.
Orchestrates the complete translation pipeline:
- Token translation (word-level)
- Word order adjustment (phrase structure)
- Agreement enforcement (morphology)
Works recursively on AST nodes from top to bottom.
Usage
alias Nasty.AST.Document
alias Nasty.Translation.ASTTransformer
# Transform complete document
{:ok, translated_doc} = ASTTransformer.transform(document, :en, :es)
Summary
Functions
Transforms an AST node from source to target language.