pos-tagger

Extracting the POS tags in R using

匆匆过客 提交于 2019-12-11 17:28:41
问题 In my dataset I am trying to create variables containing the number of nouns, verbs and adjectives, respectively for each observation. Using the openNLP package I have managed to get this far: s <- paste(c("Pierre Vinken, 61 years old, will join the board as a ", "nonexecutive director Nov. 29.\n", "Mr. Vinken is chairman of Elsevier N.V., ", "the Dutch publishing group."), collapse = "") s <- as.String(s) s sent_token_annotator <- Maxent_Sent_Token_Annotator() word_token_annotator <- Maxent

detecting POS tag pattern along with specified words

家住魔仙堡 提交于 2019-12-11 12:52:43
问题 I need to identify certain POS tags before/after certain specified words, for example the following tagged sentence: [('This', 'DT'), ('feature', 'NN'), ('would', 'MD'), ('be', 'VB'), ('nice', 'JJ'), ('to', 'TO'), ('have', 'VB')] can be abstracted to the form "would be" + Adjective Similarly: [('I', 'PRP'), ('am', 'VBP'), ('able', 'JJ'), ('to', 'TO'), ('delete', 'VB'), ('the', 'DT'), ('group', 'NN'), ('functionality', 'NN')] is of the form "am able to" + Verb How can I go about checking for

NLTK identifies verb as Noun in Imperatives

安稳与你 提交于 2019-12-11 12:07:49
问题 I am using NLTK POS tagger as below sent1='get me now' sent2='run fast' tags=pos_tag(word_tokenize(sent2)) print tags [('run', 'NN'), ('fast', 'VBD')] I find similar posts NLTK Thinks that Imperatives are Nouns which suggest to add the word to a dictionary as a verb. Problem is I have too many such unknown words. But one clue I have, they always appear at the start of a phrase. Eg: 'Download now', 'Book it now', 'Sign up' How can i correctly assist the NLTK to produce correct result 回答1:

NLP- Sentiment Processing for Junk Data takes time

柔情痞子 提交于 2019-12-11 11:24:15
问题 I am trying to find the Sentiment for the input text. This test is a junk sentence and when I tried to find the Sentiment the Annotation to parse the sentence is taking around 30 seconds. For normal text it takes less than a second. If i need to process around millions of data it will add up the time to process. Any solution to this. String text = "Nm n n 4 n n bkj nun4hmnun Onn njnb hm5bn nm55m nbbh n mnrrnut but n rym4n nbn 4nn65 m nun m n nn nun 4nm 5 gm n my b bb b b rtmrt55tmmm5tttn b b

Python NLTK Brill Tagger does not have SymmetricProximateTokensTemplate, ProximateTokensTemplate, ProximateTagsRule, ProximateWordsRule

这一生的挚爱 提交于 2019-12-11 09:54:16
问题 When i try importing, from nltk.tag.brill import SymmetricProximateTokensTemplate, ProximateTokensTemplate from nltk.tag.brill import ProximateTagsRule, ProximateWordsRule Python Throws Import Error, ImportError: cannot import name 'SymmetricProximateTokensTemplate' What's the problem? but this works from nltk.tag import brill 回答1: The Brill part of NLTK has been redesigned in NLTK 3. So all those classes you try to import do not exist any more. See https://github.com/nltk/nltk/pull/549 I'm

POS tagging for each record in R

蹲街弑〆低调 提交于 2019-12-11 09:13:28
问题 I have a data frame like Task Response 1 NA 2 NA 3 EFFICACY 4 I was sent to external vendor for solution (PDA parts), but at PDA parts they identified within few minites that new battery would not solve the issue. I wonder why this diagnosis part could no have been done at the locla IS service in the Amgen office. Now I spent time to visit PDA parts at their place, while this finally did not bring any solution. 5 Issue could not be resolved Where the 2 columns are tasks and Response. And

NLP Postagger can't grok imperatives?

假装没事ソ 提交于 2019-12-11 07:13:55
问题 Stanford NLP postagger claims imperative verbs added to recent version. I've inputted lots of text with abundant and obvious imperatives, but there seems to be no tag for them on output. Must one, after all, train it for this pos? 回答1: There is no special tag for imperatives, they are simply tagged as VB . The info on the website refers to the fact that we added a bunch of manually annotated imperative sentences to our training data such that the POS tagger gets more of them right, i.e. tags

Pos Tagger in PHP

帅比萌擦擦* 提交于 2019-12-11 06:49:28
问题 I am looking for a pos-tagger which can be used in php.Or i need to know if there is any way to use results of Qtag java app with php. 回答1: PHP/IR has an article on "Part Of Speech Tagging" with an implementation of a Brill Tagger 回答2: Take a look at PHP wrapper of Standford NLP processor. This is a more complete implementation of the functionality then the PHP/IR. https://github.com/agentile/PHP-Stanford-NLP The git hub page has examples to get you started fast. 回答3: I'm working on a part of

Working with the python NLTK: How can I improve the accuracy of the POS tagger?

不想你离开。 提交于 2019-12-11 03:54:59
问题 I've been using NLTK's POS tagger: ... nltk.pos_tag(nltk.word_tokenize(tfile[i])) ... but sometimes I get inaccurate results (NN when I should be getting JJ, and so forth. The text I want to tag is within a fairly specific business domain... I'm not quite at liberty to say what domain here). Admittedly, I'm not an expert with either Python or the NLTK (working on it, however), but I was wondering if there were some way to improve the accuracy of the tagger. I think I understand that the

How to use PoS tag as a feature for training data by Naive Bayes classifier?

我是研究僧i 提交于 2019-12-11 03:05:33
问题 I'm researching how to extract keyphrases from document for my thesis. In my research, I used Naive Bayes classifier machine learning for creating a training model of the candidate term features. One of features is PoS tag , I think this feature is important for specifying a term is keyphrase or not. But the input of Naive Bayes (NB) classifier is numbers and the PoS tag is a string. So I don't know the way to represent PoS tag feature as a number in order to become a input feature for NB