GrammarApply
GrammarApply[grammar,input]
attempts to parse input according to the grammar defined by grammar.
Details and Options
- The grammar used in GrammarApply is typically a cloud object generated by GrammarRules.
- GrammarApply uses rules in grammar in an attempt to transform input and generate expressions.
- GrammarApply[grammar,"input"] attempts to parse the string "input".
- GrammarApply[grammar,{input1,input2,…}] attempts to parse the concatenation of the inputi.
- Each inputi can be either an individual string, or alternatives of the form inputi1inputi2…. With alternatives, the first sequence of alternatives that leads to a valid parse will be used.
- GrammarApply supports the following options:
-
AllowLooseGrammar Automatic whether to allow extra grammatical "fluff" IgnoreDiacritics Automatic whether to ignore diacritics when applying grammar rules IgnoreCase Automatic whether to ignore case when applying grammar rules AmbiguityFunction Automatic function for handling ambiguity GeoLocation $GeoLocation geo location to assume for semantic interpretation
Examples
Wolfram Research (2014), GrammarApply, Wolfram Language function, https://reference.wolfram.com/language/ref/GrammarApply.html (updated 2015).
Text
Wolfram Research (2014), GrammarApply, Wolfram Language function, https://reference.wolfram.com/language/ref/GrammarApply.html (updated 2015).
CMS
Wolfram Language. 2014. "GrammarApply." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/GrammarApply.html.
APA
Wolfram Language. (2014). GrammarApply. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GrammarApply.html