You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@opennlp.apache.org by "Manoj B. Narayanan" <ma...@gmail.com> on 2017/08/18 13:52:16 UTC

Adding features to Document Categorizer

Hi,

Is there any way by which I can add features to a Document Categorizer. For
example, the POS tags of the words.

Thanks,
Manoj

Re: Adding features to Document Categorizer

Posted by "Manoj B. Narayanan" <ma...@gmail.com>.
Hi Cohan,

I was also thinking of the same solution. :)

Thanks.

Manoj.

On Fri, Aug 18, 2017 at 7:43 PM, Cohan Sujay Carlos <co...@aiaioo.com>
wrote:

> One way to do it is to encode the tags into your input text file.
>
> Say one line in the input file is:
>
> CLASS1 Pierre Vinken , 61 years old , will join the board as a
> nonexecutive director Nov. 29 .
>
>
> If you wanted to use POS tags along with the tokens, you could do something
> like this:
>
> CLASS1 Pierre_NNP Vinken_NNP ,_, 61_CD years_NNS old_JJ ,_, will_MD
> join_VB the_DT board_NN as_IN
>     a_DT nonexecutive_JJ director_NN Nov._NNP 29_CD ._.
>
>
> Cohan
>
>
> On Fri, Aug 18, 2017 at 7:22 PM, Manoj B. Narayanan <
> manojb.narayanan2011@gmail.com> wrote:
>
> > Hi,
> >
> > Is there any way by which I can add features to a Document Categorizer.
> For
> > example, the POS tags of the words.
> >
> > Thanks,
> > Manoj
> >
>

Re: Adding features to Document Categorizer

Posted by Cohan Sujay Carlos <co...@aiaioo.com>.
One way to do it is to encode the tags into your input text file.

Say one line in the input file is:

CLASS1 Pierre Vinken , 61 years old , will join the board as a
nonexecutive director Nov. 29 .


If you wanted to use POS tags along with the tokens, you could do something
like this:

CLASS1 Pierre_NNP Vinken_NNP ,_, 61_CD years_NNS old_JJ ,_, will_MD
join_VB the_DT board_NN as_IN
    a_DT nonexecutive_JJ director_NN Nov._NNP 29_CD ._.


Cohan


On Fri, Aug 18, 2017 at 7:22 PM, Manoj B. Narayanan <
manojb.narayanan2011@gmail.com> wrote:

> Hi,
>
> Is there any way by which I can add features to a Document Categorizer. For
> example, the POS tags of the words.
>
> Thanks,
> Manoj
>