moos / wordpos

Part-of-speech utilities for node.js based on the WordNet database.
477 stars 41 forks source link

lookup, Cannot read property 'toLowerCase' of undefined #50

Open Truemedia opened 2 years ago

Truemedia commented 2 years ago

I get this error when using cli with following command:

wordpos get over

Not sure if it's an issue progmatically aswell

moos commented 2 years ago

I can reproduce:

$ wordpos get over
  return word.toLowerCase().replace(/\s+/g, '_');

"over" is a stop-word and that's causing the error. Try wordpos -w get over to not strip stopwords for now.

Truemedia commented 2 years ago

Ah that makes sense and yes that works for me thanks