[ Skip to the content ]

Institute of Formal and Applied Linguistics Wiki


[ Back to the navigation ]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
user:zeman:interset:common-problems [2007/03/06 22:18]
zeman
user:zeman:interset:common-problems [2008/04/04 16:03] (current)
zeman Refined future model.
Line 49: Line 49:
 Even if you know that your own decode() always sets ''$f{definiteness} = "wh"'', you cannot be sure that the feature values were not set by a driver, which uses ''"int"'' or ''"rel"'' in different contexts. Even if you know that your own decode() always sets ''$f{definiteness} = "wh"'', you cannot be sure that the feature values were not set by a driver, which uses ''"int"'' or ''"rel"'' in different contexts.
  
 +===== Chinese particles =====
 +
 +Chinese 的 (de) has a part of speech of its own in the Sinica treebank, ''DE''. The easiest approach is to decode it as a particle and remember its special nature using a new ''subpos'' value, or just storing it in the ''other'' feature. However, //de//'s usage could be compared to that of conjunctions. (It's not a coordinative conjunction, though. It connects two elements with different roles: often a possessor and the possessed object, e.g. 我的腦海.)
 +
 +
 +
 +
 +===== 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>$f{case} = ["nom", "acc"];</code>
 +
 +However, we cannot define complex combinations of values of different features. For instance, if we assign
 +
 +<code perl>$f{gender} = ["fem", "neut"];
 +$f{number} = ["sing", "plu"];</code>
 +
 +all four combinations of the gender and number values are permitted. We cannot properly decode a tag that applies to either ''fem+sing'' or ''neut+plu'' but not ''fem+plu'', nor ''neut+sing'' (real example taken from ''cs::pdt''). The only way to encode this is to exit our one-tag-at-a-time scope and create two parallel feature structures as the result of decoding. That would complicate using the feature structure(s) by the user, and also subsequent encoding into a physical tagset. Even the arrays that are already implemented make the system quite complex.
 +
 +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 ''cs::pdt'' gender ''I'' is decoded as ''gender = "masc", animateness = "anim"''. Now how shall we decode the physical gender ''T'', meaning disjunction of physical genders ''I'' and ''F'' (masculine inanimate or feminine)? ''gender = ["masc", "fem"], animateness = ["inan", ""]'' is not exactly the description of what's going on here.
 +
 +Similar situation is in ''pt::conll'' with the feature ''NOM/PIV'', meaning "this is either nominative, or the prepositional form of accusative". We can decode it as ''case = ["nom", "acc"], prepcase = ["", "pre"]'', but it is not precise representation of the original information. Nor is ''case = "nom", prepcase = "pre"''.
 +
 +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 ''_clusters_''. Its value is an array of substructures (clusters) C1..Cn. If a feature is set in a cluster, it must be empty in the main structure (or there can be the reference to the clusters or another special value). If there are two disjunct independent subsets of features (there are dependencies between the features in one subset but not between the subsets), we must write all combinations of possible values from all affected subsets (as if there were dependencies between the subsets). Adding a layer to separate the independent subsets would only complicate processing.
 +
 +<code perl>%f =
 +(
 +    'pos'          => "adj",
 +    'gender'       => \$clusters,
 +    'animateness'  => \$clusters,
 +    'number'       => "plu",
 +    'case'         => "nom",
 +    'degree'       => "pos",
 +    'negativeness' => "pos",
 +    '_clusters_'    =>
 +    [
 +        {'gender' => "masc", 'animateness' => "inan"},
 +        {'gender' => "fem"}
 +    ]
 +);</code>
 +
 +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>@alt1 =
 +(
 +    {'gender' => "masc", 'animateness' => "inan"},
 +    {'gender' => "fem"}
 +);
 +@alt2 =
 +(
 +    {'case' => "nom"},
 +    {'case' => "acc"},
 +    {'case' => "voc"}
 +);
 +%f =
 +(
 +    'pos'          => "adj",
 +    'gender'       => \@alt1,
 +    'animateness'  => \@alt1,
 +    'number'       => "plu",
 +    'case'         => \@alt2,
 +    'degree'       => "pos",
 +    'negativeness' => "pos",
 +);</code>

[ Back to the navigation ] [ Back to the content ]