Open giorgio79 opened 6 years ago
Would be nice indeed. It would require some revision of methods so that they return an object with the right methods attached. I will put it on the backlog. Feel free to create a PR!
Hugo
Alternatively, you can get rid of binding functions to explicit this
and use functional composition (which doesn't work now):
const transformSentence = compose(
classifier.classify,
tagger.tag,
tokenizer.tokenize,
)
Functional composition is much more powerful than object chaining. I do understand the implications this puts into internal design of a library, it's just a suggestion ;)
Like jquery, or en-pos https://github.com/FinNLP/en-pos
Would be nice if we could
natural("my nice text").sentences().tokenize().tag();
Here is a sample from en-pos