
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
| Added: | ||||||||
| > > |
Grammar Engineering Frequently Asked QuestionsI'm trying to add a new feature, and the LKB doesn't like it. What should I do?There are two rules about where you can declare new features:
"No possible type ..."If you're getting the error message "No possible type for features (...) at path (...)" you have probably tried to introduce a feature other than in the outermost feature structure. For example, if you wanted to add a feature CASE appropriate only for nouns, the correct way to do it is on the typenoun (subtype of head):
noun := head & [ CASE case ].If instead, you tried to do it on noun-lex:
noun-lex := basic-noun-lex & spr-only-lex-item &
[ SYNSEM.LOCAL.CAT.HEAD noun &
[ CASE case ] ].
you would get this error message. (If you also have the correct declaration on noun, the constraint shown here on noun-lex won't cause an error, but it will be redundant.)
"Feature ... introduced at multiple types (...)"As stated above, features can only be declared for one type. If two types need the same feature, they need to have a common supertype from which to inherit it. You might hit this error if you happen to try to reuse a feature name already in use in the matrix, or if you try to declare a feature for two types at the same time (e.g., FORM onverb and prep) instead of putting it on a supertype.
NB: You can of course mention features on multiple types, and often need to in order to constrain their values appropriately. They just need to be introduced on a supertype to all types that they are appropriate for. This doesn't mean that e.g., noun-lex needs to inherit from noun in order to constrain a value of CASE. In the example above, CASE remains a feature of noun, which happens to be the value at the end of a path inside noun-lex.
Adding a feature to an existing typeIf you want to add a feature to a type that's already declared in the matrix, you need to write a type addendum statement.Back to FAQs page Back to main course page | |||||||