Best way to POS label an entire text document?
What is the best way to parse an entire text document to get POS labels for all sentences? Rather than the brute force approach of first tokenizing the document into individual sentences by the punctuations and then passing each sentence individually to syntaxnet (which will sort of be defeating the purpose)? I am using the default parsey_mcparseface model.
Yeah, I'm interested in doing the same thing.
I am not sure why you consider the approach where the document is first broken into sentences as 'brute-force'. I think this is the correct way of labeling the document. We did not release a sentence breaking component, so you will need to figure out the sentence boundaries yourself (there are plenty of tools for that out there). Note that the model we released expects individual sentences as input - if you were to treat the entire document as a single sentence, the accuracy would likely suffer. If you care only about the POS tags, you can uncomment the second step where the parser is run after the POS tagger - this will make the process more efficient as POS tagging is computationally a lot cheaper than parsing.
Thanks Slav, but please note that I did not mention that breaking the document into sentences is brute force. What I mentioned was that tokenizing the document just by the punctuations, is brute force, which obviously has limitations. For example breaking the sentence in wrong locations (e.g. urls or abbreviations such as "e.g."). Nevertheless, it is fine if syntaxnet is not meant to do that part. But could you please kindly point me to some tools that can do a good job of detecting the sentence boundaries? --Tnx