UNPKG

@hiherto-elements/natural

Version:
9 lines (7 loc) 297 B
import { Assert } from '../../node_modules/@hiherto-elements/assert/Assert.js'; import { RegexpTokenizer } from '../../src/tokenizers/regexp-tokenizer.js'; Assert.isFunction(RegexpTokenizer); const res = new RegexpTokenizer({ pattern: /^The/ }).tokenize('The quick brown'); console.log(res);