Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't access word 'constructor' on lexicon #1

Open
JustenRickert opened this issue Apr 28, 2018 · 0 comments
Open

Can't access word 'constructor' on lexicon #1

JustenRickert opened this issue Apr 28, 2018 · 0 comments

Comments

@JustenRickert
Copy link

The way you store words on the lexicon instance makes the word constructor impossible to store in the lexicon, and results in errors when trying to access it using en-pos

> const lexicon = require('en-lexicon')
undefined
> lexicon.lexicon.lactate
'NN|VB'
> lexicon.lexicon.beauty
'NN'
> lexicon.lexicon.constructor
[Function: Object]
>

When tagging...

> const pos = require('en-pos')
coundefined
> const { Tag } = pos
undefined
> new Tag(['constructor']).initial()
TypeError: entry.split is not a function
    at Object.default_1 [as default] (/Users/justen/myproject/node_modules/en-pos/dist/tagging/lexicon.js:8:26)
    at Tag.initial (/Users/justen/myproject/node_modules/en-pos/dist/index.js:38:57)
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant