Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
user:zeman:interset:common-problems [2008/03/05 12:03] zeman 的. |
user:zeman:interset:common-problems [2008/04/04 16:03] (current) zeman Refined future model. |
||
---|---|---|---|
Line 53: | Line 53: | ||
Chinese 的 (de) has a part of speech of its own in the Sinica treebank, '' | Chinese 的 (de) has a part of speech of its own in the Sinica treebank, '' | ||
+ | |||
+ | |||
+ | |||
+ | ===== Combinations of values in one feature structure ===== | ||
+ | |||
+ | The current version allows for storing arrays of values in one feature. For instance, we can say that a word is either in nominative or in accusative by assigning | ||
+ | |||
+ | <code perl> | ||
+ | |||
+ | However, we cannot define complex combinations of values of different features. For instance, if we assign | ||
+ | |||
+ | <code perl> | ||
+ | $f{number} = [" | ||
+ | |||
+ | all four combinations of the gender and number values are permitted. We cannot properly decode a tag that applies to either '' | ||
+ | |||
+ | The inability to describe value combinations also plays a role in the situation where one feature value of the physical tagset has to be decomposed into values of multiple features in Interset, and the decomposed value should be one of multiple values in an array. For instance, the '' | ||
+ | |||
+ | Similar situation is in '' | ||
+ | |||
+ | The correct solution would be to decode such tag into multiple parallel feature structures. Every structure would only contain single values, no arrays. This would remove one level of complexity inside the structures but add another level around the structure. We can consider making this change in a future version of Interset. There could be two interfaces to the decoding function: one that would output an array of (references to) feature structures, and the other that would output (reference to) just one feature structure but there would be an additional feature with reference to the next feature structure. The encoder would select the structure that requires the least modification to fit the target tagset. If the user can deal with more than one target tag, they would ask for encoding each of them separately. If the target tagset could accommodate alternate values in some features, the encoder could look at multiple structures at a time; it is unclear how this would be done. | ||
+ | |||
+ | Multiple alternate feature structures can also be stored in a packed form. There is only one structure. It has an additional feature called '' | ||
+ | |||
+ | <code perl>%f = | ||
+ | ( | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | [ | ||
+ | {' | ||
+ | {' | ||
+ | ] | ||
+ | );</ | ||
+ | |||
+ | Or the alternating features would directly reference the array of substructures containing their alternating values. No additional technical feature would be needed. There could be more than one independent arrays of substructures if needed. The main structure would look the same as today, including the possibility that a feature value is an array reference. However, the referenced array would not contain directly the values of the referencing feature. Instead, it would contain (references to) substructures (hashes), each of them defining a single value for this and possibly other features. | ||
+ | |||
+ | <code perl> | ||
+ | ( | ||
+ | {' | ||
+ | {' | ||
+ | ); | ||
+ | @alt2 = | ||
+ | ( | ||
+ | {' | ||
+ | {' | ||
+ | {' | ||
+ | ); | ||
+ | %f = | ||
+ | ( | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | );</ |
[ Back to the navigation ] [ Back to the content ]