moos/wordpos

add lexical domain to result

kengz opened this issue · 4 comments

kengz commented

as detailed here [https://github.com/Planeshifter/node-wordnet-magic#lexdomain],

The lexical domain of the synset. Each domain category is composed of the word type followed by a dot and then the category name. WordNet has implemented the following domain categories:

For example 'dance' gives lexdomain 'noun.act'

moos commented

This would be a simple matter of mapping the 'lexFilenum' attribute to the lexnames.

An example of how you intend to use this would help in prioritizing this work.

kengz commented

Oh thanks. Though it'd be sweet if we can get the words directly than having to manually translate into the lexnames.

A use case would be for a module to know if it's supposed to perform a function. For example inputting "bot switch on the lights", after tokenizing and some string cleaning, if a token belongs to "noun.act" or "verb.change" in this case it will invoke the function if it is recognized (function = switch on, argument = lights in this case).

Would this be a reasonable addition, i.e. showing the lex name directly. Thanks

moos commented

lexName property is added in v1.1. See lookupAdjective example in readme.

kengz commented

Awesome, thanks!