Extracting noun+noun or (adj|noun)+noun from Text

后端 未结 2 1920
星月不相逢
星月不相逢 2020-12-09 00:17

I would like to query if it is possible to extract noun+noun or (adj|noun)+noun in R package openNLP?That is, I would like to use linguistic filtering to extract candidate n

2条回答
  •  既然无缘
    2020-12-09 00:34

    It is possible.

    EDIT:

    You got it. Use the POS tagger and split on spaces: ll <- strsplit(acqTag,' '). From there iterate on the length of the input list (length of ll) like: for (i in 1:37){qq <-strsplit(ll[[1]][i],'/')} and get the part of speech sequence you're looking for.

    After splitting on spaces it is just list processing in R.

提交回复
热议问题