W dniu 2014-03-25 13:29, Daniel Naber pisze:
> On 2014-03-25 11:07, Marcin Miłkowski wrote:
>
>> For all I can see, no HashMaps are required at all, just a consistent
>> way of understanding the values in class members.
> So instead of just adding the POS tag we get from Morfologik to our
> AnalyzedToken object as a string, we interpret it and store something
> like pos = preposition, case = accusative. Is it that what you mean?

Exactly. We pay the computational price just once, during parsing the 
tag, and given that most tags are pretty nicely structured (except 
Penn!), we could parse them very quickly.

Yet I would still store the string as well: we use it for the 
synthesizer and changing the synthesizer is not as trivial as parsing 
tags (we might, of course, recreate the tag from the keys and values but 
this is just additional computational overhead). Also, some rules may be 
hard to express without regexes on POS tags (we will still need to regex 
in case of a disjunction of several different POS tags, I'm afraid, but 
these regexes will be quite rare).

> Then indeed 'mapping' isn't a good term for that. We could make all keys
> and values enums, so we have type safety and don't have to deal with
> strings. Do we need type safety so that you cannot use a Polish-only
> value for German even in Java code? I think that may not be needed.

As long as it's enforced in XML namespaces (which should be doable), we 
should be fine. Developers should know what they're doing. LOL ;)

Regards,
  Marcin

>
> Regards
>    Daniel
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> Languagetool-devel mailing list
> Languagetool-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/languagetool-devel


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to