Questions tagged [pos-tagger]
A part-of-speech tagger, or POS tagger, is a concrete implementation of algorithms which associate discrete terms, as well as hidden parts of speech, in accordance with a set of descriptive tags, such as the identification of words as nouns, verbs, adjectives, adverbs, and so on. It often follows an approach based on Machine Learning (ML) techniques.
551
questions
-2
votes
0answers
20 views
Methods and Metrics to compare various NLP tools performance [closed]
What methods and metrics I can use to compare two different,
POS taggers,
Parsers,
Named Entity Recognizers
Tokenizers
I want to compare performance of each on data set of movie scripts.
0
votes
0answers
7 views
POS/NER able to differentiate between the same word being used in multiple contexts?
I have a collection of over 1 million bodies of text. Within those bodies are multiple entities whose names mimic common stop words and phrases.
This has created issues when tokenizing the data, as ...
0
votes
1answer
35 views
Spacy token.lemma_ not identifying nouns and pronouns
I have been following a tutorial on Lemmatization -> https://www.machinelearningplus.com/nlp/lemmatization-examples-python/
As told in the spacy lemmatization section, I loaded the 'en-core-web-sm' ...
0
votes
0answers
23 views
trouble with nltk tags
I am trying to tag a set of words as a part of speech using NLTK then save the word in a file. It seems to work for VB as a keyword and NN but I cannot get VBD to work. It returns an empty set.
...
0
votes
0answers
4 views
How to run the NLX tagger on my terminal?
I've downloaded a part-of-speech tagger tool (NLX tagger) for Portuguese, but I don't know how to run it in order to get my text file tagged.
What I'm trying to do on my terminal is on the picture ...
0
votes
0answers
7 views
Output Contents of dict in MaxentTagger
In my main class, I initialized MaxentTagger as such:
MaxentTagger tagger = new MaxentTagger("edu/stanford/nlp/models/pos-tagger/english-left3words-distsim.tagger");
In debugging mode, if ...
1
vote
1answer
16 views
Read customed corpus in three column format for pos tagging using NLTK
I have corpus in txt extention with like this below format:
Mike NNP B-PERSON
Noah NNP I-PERSON
eats VB O
donuts NN O
Sarah NNP B-PERSON
Larsson NNP I-PERSON
comes VB O
from IN O
Stockholm NN B-GPE
I ...
0
votes
0answers
16 views
pos tagging for a sentence
We have 2 sentences
The old man the boat.
The complex houses married and single soldiers and their families.
The POS tags given by stanford NLP are
DT JJ NN DT NN .
DT JJ NNS VBN CC JJ NNS CC PRP$ ...
0
votes
2answers
43 views
Python POS tagging: return the most common POS for a word, after training
I am trying to write a code that will create a dictionary with key(word), values(POS tags that word appears with + respective count). The final goal is to know what POS tag is most frequent for a ...
0
votes
0answers
34 views
How to best store tokens in a container?
I'm rather new to programming and am trying to create a small parser with the spacy package.
What I would like to do would be to parse through any kind of text (as string), and store each word plus ...
0
votes
0answers
23 views
Question about for loop in CRF sequence tagging (solved)
So I'm working with NLTK CRFTagger where my input consist a list of tokens of word from movie queries and I'm trying to implement an IOB tagger. I have been trying to read the example code that I got ...
1
vote
0answers
37 views
Making a tagged part-of-speech corpus with the help of a lexicon
I have a part-of-speech lexicon that has two columns, words and part-of-speech tags, inside a Pandas's Dataframe.
Also, I have a list of tokens (words) in another Dataframe.
I want to take each ...
0
votes
0answers
17 views
Identifying Linking verbs (To be) in first person with NLTK POS_TAG
i need to identify Linking verbs like "am" in Portuguese using NLTK POS_TAG. There is a specific tag for this type of word? Or another tool for helping me to find this type of word in a ...
1
vote
1answer
26 views
Apertium + Python: POS-tagger not providing surface form
I'm trying to POS-tag some sentences in Italian with Apertium's tagger.
While according to the Apertium GitHub page I am supposed to get as output also the surface form in addition to the ...
1
vote
2answers
72 views
SpaCy: How to manually set POS tag for vertical bar “|”?
When text is tagged by SpaCy, the vertical bar "|" is assigned different POS tags depending on the context, such as "ADV" , "DEL"... While I want "|" to be ...
0
votes
0answers
5 views
nltk.pos_tag not working. Is it correct to be inputting a list of strings?
I'm trying to test out some nltk code and I'm having trouble using pos_tag. I'm inputting a list of strings, so I'm not understanding this traceback or what the issue is.
traceback code
EXAMPLE_TWEET =...
0
votes
1answer
50 views
Adding POS part-of-speech column in pyspark dataframe
I'm working in pyspark dataframe where I want to add a column to see if the word is NOUN, VERB, ADJ, ADV, ADP, PROPN using pyspark or nltk.pos_tag
Here is the pyspark table.
------------------------
| ...
1
vote
2answers
73 views
Spacy pos tagging PPER
I'm trying to make spacy tag a german word with PPER. See https://spacy.io/api/annotation. Here is my code:
import de_core_news_sm
nlp = de_core_news_sm.load()
tokenized = nlp("Der Mann liebt ...
0
votes
0answers
22 views
nltk pos tag with custom keyword and StanfordPOSTagger
My sentences contain some keywords (abbreviation from a very long name) that I need to tag with a custom tag. The tagger from both default pos_tag and StanfordPOSTagger sometimes returns it as NNP or ...
0
votes
1answer
23 views
How to remove unwanted chars and leave only actual words with POS tags?
Using Python, I have split up the chunks of a text file data into sentences into a list as below ("My list"). I need to figure out how to only pull out the word tokens and their associated ...
0
votes
0answers
22 views
Why I am getting error while loading pos tagger?
I am trying to write code for lemma, pos, ner, tokenize but facing many issues, one of the issues is this error. How can I solve this error?
I am bound to use servlet for the main work and I have ...
0
votes
0answers
19 views
POS and word associations tm
I'm quite new with tm package in R. I'm using findAssocs function to get associations among words in my Corpus, but I'd like to run it among nouns and adjectives only. Do you know how to do POS ...
0
votes
1answer
56 views
IllegalArgumentException: PTBLexer: Invalid options key in constructor: asciiQuotes Stanford NLP
I'm trying to test the Hello word of [Stanford POS tagger][1] API in Java (I used the same .jar in python and it worked well) on french sentences.
Here is my code
public class TextPreprocessor {
...
0
votes
0answers
15 views
Can I retrieve tree structure of a text using POS tags?
Hi (sorry for the bad English), I want to "treetag" french sentences in Java to find words (or group of words) that impacts the most sense of a sentence and have enough context to be ...
-2
votes
1answer
55 views
ValueError: Shape of passed values is blah, indices imply blah
I try to do POS-Tagging to a list of sentences in Bahasa Indonesia with Flair https://github.com/flairNLP/flair
The result is a list, the name is pos:
['Sejarah <NOUN> perkembangan <NOUN> ...
0
votes
1answer
111 views
Accessing out of range word in spaCy doc : why does it work?
I'm learning spaCy and am playing with Matchers.
I have:
a very basic sentence ("white shepherd dog")
a matcher object, searching for a pattern ("white shepherd")
a print to show ...
0
votes
1answer
123 views
How can I include my Python program that uses spaCy in Android Studio?
I have a Python program that uses spaCy for identifying a nouns in a sentence. This is my program:
import spacy
nlp = spacy.load('en_core_web_sm')
sentence = "1 slice of english blue ...
0
votes
0answers
32 views
How to solve the problem of word segmentation, pos tag and sentiment analysis in SnowNLP?
I'm using SnowNLP package to execute the program, then I used the following github website to download this tool:
https://github.com/isnowfy/snownlp
In this tool, I saw it can execute 3 programs. It ...
1
vote
1answer
55 views
How to find uncapitalised proper nouns with NLTK?
I'm trying to make a 'fix faulty capitalisation' program, and I'm trying to find proper nouns in python using NLTK's pos tagger. The problem is that it doesn't seem to be working very well for text ...
0
votes
0answers
51 views
Spacy : train POS tagger after tokenization
I am trying to train spaCy's POS tagger after customizing the tokenizer.
For example the tokenization of the text
"Il est culotté celui-là ."
is now ['Il', 'est', 'culotté', 'celui-là ', '.']
...
1
vote
0answers
104 views
Get tag-specific accuracy for pos tagger in spacy tagger evaluation
I'm using the code below for evaluate the pos tagger that I trained in spacy 2.3.0 (built from source- last commit : 9860b8399ed2a3d1d680e1c1cd31d85926422709):
def evaluate(nlp, examples):
...
0
votes
1answer
306 views
How to get indices of words in a Spacy dependency parse?
I am trying to use Spacy to extract word relations/dependencies, but am a little unsure about how to use the information it gives me. I understand how to generate the visual dependency tree for ...
1
vote
0answers
16 views
Stanford POS Tagger raise error when I “tag” string [duplicate]
I'm trying to run this code
from nltk.tag import StanfordPOSTagger
st = StanfordPOSTagger('/home/username/Documents/stanford-tagger-4.0.0/models/english-bidirectional-distsim.tagger', '/home/username/...
0
votes
1answer
20 views
Are there recognized strategies to get the adjectives associated with a person or a place in NLP (or the general impression of a person or a place)?
I am acquainted with part of speach tags (POS-tag), but even with this metodology does not seem trivial to do this.
1
vote
0answers
232 views
How to add GloVe word embeddings to Keras POS tagger?
I've been trying to research how to use Keras to train a POS tagger; specifically I want it to use an LSTM architecture and to use word embeddings, namely, GloVe. I've taken inspiration from two blogs....
0
votes
0answers
31 views
Getting error while using custom tagging “object has no attribute 'choose_tag'”
Wile using perceptron tagger as backoff in unigramTagger , getting and error "object has no attribute 'choose_tag'".
I used :
import nltk.tag, nltk.data
from nltk.tag.perceptron import ...
0
votes
2answers
412 views
Spacy es_core_news_sm model not loading
I'm trying to use Spacy for pos tagging in Spanish, for this I have checked the official documentation and also have read various post in Stackoverflow nonetheless neither has worked to me.
I have ...
0
votes
0answers
210 views
Faster ways to POS tag using Python
I have ~2 million rows of text. Each row can be one or multiple sentences. I need to POS tag the entire corpus. The corpus is a list of strings, for example:
corpus = ["I am awesome. I really am.", "...
0
votes
0answers
21 views
Which of NLTK tokenizer is good before POS tagging?
NLTK has a number of tokenizers like below
treebankWordTokenizer
WordPunctTokenizer
PunctWordTokenizer
WhitespaceTokenizer
TweetTokenizer
RegexpTokenizer - custom regex split like eg: word- "[\w']+"
...
2
votes
2answers
52 views
Transform a pandas serie of collections.counter objects into a many columns of pandas dataframe
i have a serie of collection.counter objects in each row. Like this:
0 {'PRP$': 1, 'NNS': 1, 'VBP': 1, 'DT': 3, 'NN':...
1 {'JJS': 1, 'NN': 4, 'IN': 1, 'JJ': 1}
2 {'DT'...
0
votes
2answers
308 views
Filtering SpaCy noun_chunks by pos_tag
As the subj line says, I'm trying to extract elements of noun_chunks based on their individual POS tags. It seems that elements of a noun_chunk do not have access to the global sentence POS tags.
To ...
0
votes
0answers
24 views
TreeTagger Spanish - Imperative verbs detection
I am trying to realize an algorithm for T/V Distinction for the Spanish language in Java.
For POS Tagging, I am using TreeTagger trained on the Ancora corpus. It works pretty well, but I guess that ...
1
vote
1answer
284 views
Cannot import name Model in Python
I'm using hazm in order to extract chunks in a text using python 2.7 (Using an older version of python because of library compatibility)
In a line, I've to reference to a model called postagger.model ...
1
vote
0answers
122 views
How to get POS tags for merged phrases from Spacy?
I am currently working on an NLP problem where POS tagging is one of the essential steps. I was using Stanford CoreNLP for this task until I came across spaCy. I am new to spaCy and have been playing ...
0
votes
1answer
49 views
Regex pattern to find all matches for suffixes, end quotes and words in English POS tagged corpus
I'm working on an NLP project where I have been given a POS tagged dataset of sentences to work with. The format of the dataset (shall be providing example sentences too) is
('word', 'pos_tag')
unless ...
0
votes
1answer
394 views
How to Extract subject Verb Object using NLP Java? for every sentence
I want to find a subject, verb, and object for each sentence and then it will be passed to natural language generation library simpleNLG to form a sentence.
I tried multiple libraries like Cornlp, ...
1
vote
1answer
29 views
NPM Package for relational POS tagging/parse tree? (i.e. identify subject and object, not just noun/verb/adjective)
I'm working on a project where I scrape an Esports Wiki for player transfers, team changes, etc. I've gotten to the point where I can isolate a string like "Sizz joins NRG Esports as coach," and from ...
-2
votes
1answer
178 views
how to fix list indices must be integers or slices, not str
after 2 previous questions still did not fix the problem. question 1 question 2
I have a python script that clean text before it goes to analysis text part.
so i have some functions that clean the ...
2
votes
1answer
43 views
Identify Location Within the Sentence where the Missing Word Belongs
I have the code below:
import nltk
exampleArray = ['The dog barking']
def processLanguage():
for item in exampleArray:
tokenized = nltk.word_tokenize(item)
tagged = nltk.pos_tag(...
1
vote
1answer
623 views
Hazm: POSTagger(): ArgumentError: argument 2: <class 'TypeError'>: wrong type
I have got an error for running the below code. May you give me some help?
from __future__ import unicode_literals
from hazm import *
tagger = POSTagger(model='resources/postagger.model')
tagger = ...