Skip to content
Advertisement

Tag: nltk

Chunking – regular expressions and trees

I’m a total noob so sorry if I’m asking something obvious. My question is twofold, or rather it’s two questions in the same topic: I’m studying nltk in Uni, and we’re doing chunks. In the grammar I have on my notes the following code: What is the “$” symbol for in this case? I know it’s “end of the line”

How to convert a dictionary with a tuple inside of a nested list?

I’m trying to create a bigram from a dictionary with a specific condition. Below is the example of the dictionary: The specific condition is that I want to create a bigram if the words in each element are more than 1. Below is the code that I have been working on so far: This code works, but instead of returning

Position of that Noun and Verb

I have a rule-based code that prints out the Noun which is followed by a verb in a sentence The output of a sentence following this rule: high school football players charged after video surfaces showing hazing trump accuser pushes new york to pass the adult survivors act plans to sue Is there a way to also print out the

Running a for loop or .apply with a pandas series

I’m trying to run a for loop or .apply using lambdas for my pandas series. Here’s the code: What I’m trying to achieve is for each word in df[‘Filtered_text’], apply the analyzer.polartiy_scores(x[‘Filtered_text’]) through the column. An example of what is stored in df[‘Filtered_text’]: So for every one of those words, I’d like it to be applied to the analyzer.polarity_scores I’ve

Advertisement