Inside the Argument
Here’s a little picture of the different sections of text in a single parsed argument and which properties of the resultant argument object they are assigned to.

You’ll see, from left to right, outerSpace, modifier, innerSpace, inactivePrefix, input/data, inactiveSuffix.
The example text is from the Catalan example, “compra mitjons amb el Google,” meaning “buy socks with Google.” You’ll notice the argument “amb el Google” is literally “with the Google.” The normalizeArgument() method of the Catalan parser, as I described earlier this week, strips the article “el ” and puts it in the inactivePrefix property of the argument.
I’m going to spend the rest of the day updating Parser 2 design doc and related documentation so they match these and other recent developments in the parser.
Related posts:
- Solving a Romantic Problem: Portmanteau’ed Prepositions
- Localizing Ubiquity: commands and nountypes
- Ubiquity in Italian!
- Adding Your Language to Ubiquity Parser 2
- This week on Ubiquity Parser: The Next Generation
Related posts brought to you by Yet Another Related Posts Plugin.
Tags: argument, Catalan, code, Mozilla Planet, parser, ubiquity
If you enjoyed this post, make sure you subscribe to my RSS feed (optionally with tweets from my Twitter)!
May 19th, 2009 at 9:09 am
Thank you, Micheal for your suggestions
Sandro