wordnet.lextype

Get lex type of WordNet from lex number & lex id.

Usage no npm install needed!

<script type="module">
  import wordnetLextype from 'https://cdn.skypack.dev/wordnet.lextype';
</script>

README

wordnet.lextype

NPM

Get lex type of WordNet from lex number & lex id.

Use wordnet.lextype-tolexnumber, if lex number is needed.
Use wordnet.lextype-tolexid, if lex id is needed.

const lexType = require('wordnet.lextype');
// lexType(<lex_number>, [lex_id=0])
// lexType(<string>)
// (format: [8-bit lex_number][6-bit lex_id])

lexType(65, 7);
// 4167

lexType('noun.act.1');
// 65
lexType('noun.act');
// 64
lexType('noun.1');
// 1
lexType('n.1');
// 1
lexType('n');
// 0