I am trying to work with Collins Parser. I have POS tagged English corpora generated using MXPOST.I am trying to parse them using Collins parser. But the format specified requires each sentence to be preceded by no. of tokens(including punctuations) for every sentence. Is there a way to do so? Or if there is any POS tagger for English that includes token counting in the ouput, please suggest.
My file is in the following format:
It PRP is VBZ rich JJ in IN iron NN and CC vitamin NNP . .
But I need it to be like:
8 It PRP is VBZ rich JJ in IN iron NN and CC vitamin NNP . .