Skip to content

Combining its functions #44

Discussion options

You must be logged in to vote

Here's my solution to the problem, using as much of the built-in winkjs pieces that made sense. Again, am curious if there is a better built-in way to handle this, even if it doesn't produce the exact same output format (but includes all the data).

Note for future people wanting to use this: these methods are private members of an ES6 class, hence the # at the start of the methods. To turn these into more "normal" javascript functions, just replace the # with the word function :

#getWordsByPos takes a parsed document that is the result of a nlp.readDoc(xxx) call, and an array of Part-Of-Speech tags that you want to filter to. You could easily remove the filter step.

    #getWordsByPos(doc…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by sanjayaksaxena
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants