Skip to content

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

@JustenRickert

Description

@JustenRickert

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)
>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions