Reputation: 167
Is there any way to get POS tags without any other chaff?
let doc = nlp("I am a librarian at the Yale University, do you know what that is?")
console.log(doc.out("tags"))
The above prints POS tags along side named entities and other stuff I'm not interested in. I just want the "all so basic" POS tags.
Upvotes: 1
Views: 150
Reputation: 23
You can resolve this using a map function. Try this.
console.log(doc.out("tags").map(obj => obj.tags))
Upvotes: 2