mistval / jp-verb-deconjugator

Unconjugate conjugated Japanese verbs.
MIT License
23 stars 2 forks source link

Need clarification -- how can I use/configure the library to work only for adjectives? #5

Closed IGMontero closed 1 month ago

IGMontero commented 3 months ago

As the question states, I don't know how to make it only match WordType.ADJECTIVE. Any clarification is highly appreciated!

mistval commented 3 months ago

Hi,

This module only supports verbs. There is WIP adjective support in it, but it's not enabled and I don't remember how good of a state it's in since I haven't touched it in 6 years.

If you would like to try it, you can try changing this line to const isDictionaryForm = wordType === WordType.ADJECTIVE;

If it works decently well, I would welcome a pull request to add an onlyAdjectives option to the unconjugate() function that changes the behavior of that line of code accordingly.