text stringlengths 0 27.6k | python int64 0 1 | DeepLearning or NLP int64 0 1 | Other int64 0 1 | Machine Learning int64 0 1 | Mathematics int64 0 1 | Trash int64 0 1 |
|---|---|---|---|---|---|---|
My dataset structure:
Text: 'Good service, nice view, location'
Tag: '{SERVICE#GENERAL, positive}, {HOTEL#GENERAL, positive}, {LOCATI
ON#GENERAL, positive}'
And the point here is that I don't know how can I structure my data frame. If you have any recommendations, these will be really nice to me. Thank you.
| 1 | 1 | 0 | 0 | 0 | 0 |
I tried for a few days to install spaCy and it's giving me different errors.
now it gives me this error (attached link to the error):
(https://drive.google.com/file/d/1V_n1WB-HlVPTHHlsBJ0zpdQYYHlInM-W/view?usp=sharing)
| 1 | 1 | 0 | 1 | 0 | 0 |
I'm currently working on generating distractor for multiple choice questions. Training set consists of question, answer and 3 distractor and I need to predict 3 distractor for test set. I have gone through many research papers regarding this but the problem in my case is unique. Here the problem is the questions and an... | 1 | 1 | 0 | 1 | 0 | 0 |
I'm working on a NLP project using as dataset amazon digital music reviews. I'm preprocessing all the reviews by lemmatizing, stemming, tokenizing, removing punctuations and stopwords...
However I got stuck in a problem. Is there a way to preprocessing the text by saying to python:
`if there is 'new york', 'los angele... | 1 | 1 | 0 | 0 | 0 | 0 |
I want to remove digit except '3d', this word.
I've tried some methods but failed.
Please look through my simple code below:
s = 'd3 4 3d'
rep_ls = re.findall('([0-9]+[a-zA-Z]*)', s)
>> ['3', '4', '3d']
for n in rep_ls:
if n == '3d':
continue
s = s.replace(n, '')
>> s = 'd d'
>> expected = 'd 3d'
| 1 | 1 | 0 | 0 | 0 | 0 |
I am trying to break down the text column of a dataframe, and get the top words broken down per row/document. I have the top words, in this example it is machine and learning both at counts of 8. However I'm unsure how to break down the top words per document instead of the whole dataframe.
Below are the results for t... | 1 | 1 | 0 | 0 | 0 | 0 |
I'm assembling a twitter hashtag dictionary using Python. The keys are the hashtag itself and the corresponding entry is a large collection of tweets that contain this hashtag appended end-to-end. I've got a separate list of all hashtagless tweets and am adding them to dictionary entries according to cosine similarity.... | 1 | 1 | 0 | 0 | 0 | 0 |
I have a set of documents (3000) which each contain a short description. I want to use Word2Vec model to see if I can cluster these documents based on the description.
I'm doing it the in the following way, but I am not sure if this is a "good" way to do it. Would love to get feedback.
I'm using Google's trained w2v m... | 1 | 1 | 0 | 0 | 0 | 0 |
I am successfully converting documents using this module available on TensorFlow hub.
The output of each document is a 512 dimensional vector, however this is too large for my application and I would like to reduce the dimensionality, which the module itself does not provide.
I can see a few options:
Use another packa... | 1 | 1 | 0 | 1 | 0 | 0 |
The code read data from specific column in excel column ( in my case i used columns = 'profile')
The result is in dataframe as below:
profile
0 https://scontent-lga3-1.xx.fbcdn.net/v/t1.0-1/...
1 https://scontent-lga3-1.xx.fbcdn.net/v/t1.0-1/...
2 https://scontent-lga3-1.xx.fbcdn.net/v/t1.0-1/...
So, I try to loop... | 1 | 1 | 0 | 0 | 0 | 0 |
I'm trying to learn NLP with python. Although I work with a variety of programming languages I'm looking for some kind of from the ground up solution that I can put together to come up with a product that has a high standard of spelling and grammer like grammerly?
I've tried some approaches with python. https://pypi.or... | 1 | 1 | 0 | 0 | 0 | 0 |
I am working on a text dataset containing messages from users on a website. Please check the image in the link as stack is not allowing me to post this image directly.
dataframe of the first five rows
Reading those messages i want to find out the intent of the users whether they are buyer, seller or neutral. I have tri... | 1 | 1 | 0 | 1 | 0 | 0 |
In text processing tasks, one of the first things to do is figure out how often each word appears in a given document. In this task, you will be completing a function that returns the unique word frequencies of a tokenized word document.
write code to complete the count_frequencies function. The input argument (arr), i... | 1 | 1 | 0 | 0 | 0 | 0 |
I used Chris Mccormick tutorial on BERT using pytorch-pretained-bert to get a sentence embedding as follows:
tokenized_text = tokenizer.tokenize(marked_text)
indexed_tokens = tokenizer.convert_tokens_to_ids(tokenized_text)
segments_ids = [1] * len(tokenized_text)
tokens_tensor = torch.tensor([indexed_tokens])
segments... | 1 | 1 | 0 | 0 | 0 | 0 |
I am practicing with building an article summarizer. I built something using the script below. I would like to export the model and use it for deployment but can't find a way around it.
Here is the script for the analyzer.
#import necessary libraries
import re
import gensim
import numpy as np
from sklearn.metrics.pair... | 1 | 1 | 0 | 0 | 0 | 0 |
I am looking for steps/process to extract information from a Invoice using machine learning/NLP/Deep learning techniques. What will be the steps/process to be followed ?
The approach would need clarification on below
Suppose there are invoices from 2 Vendors, how a model needs to be created to extract the value mentio... | 1 | 1 | 0 | 0 | 0 | 0 |
I am able to use universal dependencies parser from Stanford in NLTK, But is there any way to use universal dependencies, enhanced in NLTK? As shown here Stanford Parser
Thanks
| 1 | 1 | 0 | 0 | 0 | 0 |
I have a df with variable named url. Each url string in url has a unique six character alphanumeric ID in the URL string. Ive been trying to extract a specific part of each string, the article_id from all urls, and then add it to the df as a new variable.
For example, xwpd7w is the article_id for https://www.vice.com... | 1 | 1 | 0 | 0 | 0 | 0 |
In Keras, I can have the following code:
docs ... | 1 | 1 | 0 | 1 | 0 | 0 |
I have built a binary text classifier. Trained it to recognize sentences for clients based on 'New' or 'Return'. My issue is that real data may not always have a clear distinction between new or return, even to an actual person reading the sentence.
My model was trained to 0.99% accuracy with supervised learning using... | 1 | 1 | 0 | 0 | 0 | 0 |
I'm using Keras for the layers, optimizer, and model and my model is Sequential
I've got two DQN networks and I'm making them duel each other in a simulated environment however after about 35 episodes (different each time) the script just stops without any errors. I've isolated my issue to be somewhere around when the ... | 1 | 1 | 0 | 1 | 0 | 0 |
I am building a LSTM for text classification in with Keras, and am playing around with different input sentences to get a sense of what is happening, but I'm getting strange outputs. For example:
Sentence 1 = "On Tuesday, Ms. [Mary] Barra, 51, completed a remarkable personal odyssey when she was named as the next chief... | 1 | 1 | 0 | 1 | 0 | 0 |
I have trained a classifier model using logistic regression on a set of strings that classifies strings into 0 or 1. I currently have it where I can only test one string at a time. How can I have my model run through more than one sentence at a time, maybe from a .csv file so I dont have to input each sentence individu... | 1 | 1 | 0 | 0 | 0 | 0 |
I want to compare two lists (result, ground-truth). Output should contain 1 if both are match, if not '0' and output positive sensitive. For example:
result= [1,2,3,4,5]
ground-truth=[2,4]
Output= [0,1,0,1,0]
I implemented python code for this:
def comparedkeground(dke,grd):
correct=np.zeros(len(dke))
try:... | 1 | 1 | 0 | 0 | 0 | 0 |
I can not make Stanford Parser Version 3.5.1 work. I know that newer versions of this tool are available but I have tons of old code using this particular version. This is for an academic course.
I am using Windows 7, JDK 1.8.0_65, python 3.3.3 and NLTK 3.0.2
My environment variables are as follows:
CLASSPATH : C:\Pro... | 1 | 1 | 0 | 0 | 0 | 0 |
I am creating a text summarizer and using a basic model to work with using Bag of words approach.
the code i am performing is using the nltk library.
the file read is a large file with over 2500000 words.
below is the loop i am working on with but this takes over 2 hours to run and complete. is there a way to optimiz... | 1 | 1 | 0 | 0 | 0 | 0 |
I created a Doc object from a custom list of tokens according to documentation like so:
import spacy
from spacy.tokens import Doc
nlp = spacy.load("my_ner_model")
doc = Doc(nlp.vocab, words=["Hello", ",", "world", "!"])
How do I write named entities tags to doc with my NER model now?
I tried to do doc = nlp(doc), but... | 1 | 1 | 0 | 0 | 0 | 0 |
I would like to try out an idea about autoencoder.
The model is like this:
input (pictures) - conv2d - pooling - dense - dense(supervised output) - dense - conv - upsampling - output (pictures)
If it is possible to train the NN having desired outputs for dense(supervised output) and output (pictures)? In other words, ... | 1 | 1 | 0 | 0 | 0 | 0 |
I'm interested in using tf-idf with FastText library, but have found a logical way to handle the ngrams. I have used tf-idf with SpaCy vectors already for what I have found several examples like these ones:
http://dsgeek.com/2018/02/19/tfidf_vectors.html
https://www.aclweb.org/anthology/P16-1089
http://nadbordrozd.gi... | 1 | 1 | 0 | 0 | 0 | 0 |
I am trying to use TFI/DF and CountVectorizer in one pipeline.
i did the following:
pipe = Pipeline([
('tfic', TfidfVectorizer()),
('cvec', CountVectorizer()),
('lr' ,LogisticRegression())
])
and the parameters:
pipe_parms = {
'cvec__max_features' : [100,500],
'cvec__ngram_range' : [(1,1),(1,2)],
... | 1 | 1 | 0 | 1 | 0 | 0 |
After training a classifier, I tried passing a few sentences to check if it is going to classify it correctly.
During that testing the results are not appearing well.
I suppose some variables are not correct.
Explanation
I have a dataframe called df that looks like this:
ne... | 1 | 1 | 0 | 1 | 0 | 0 |
clean_train_reviews is a list of strings.
Each string is a review, an example is included below:
classic war worlds timothy hines entertaining film obviously goes
great effort lengths faithfully recreate h g wells classic book mr
hines succeeds watched film appreciated fact standard predictable
hollywood fare c... | 1 | 1 | 0 | 0 | 0 | 0 |
I have regex code
https://regex101.com/r/o5gdDt/8
As you see this code
(?<!\S)(?<![\d,])(?:(?!(?:1[2-9]\d\d|20[01]\d|2020))\d{4,}[\u00BC-\u00BE\u2150-\u215E]?|\d{1,3}(?:,\d{3})+)(?![\d,])[\u00BC-\u00BE\u2150-\u215E]?(?!x)(?!/)
can capture all digits which sperated by 3 digits in text like
"here is 100,100"
"23,456"
... | 1 | 1 | 0 | 0 | 0 | 0 |
I have a use case where I want to match one list of words with a list of sentences and bring the most relevant sentences
I am working in python. What I have already tried is using KMeans where we cluster our set of documents into the clusters and then predict the sentence that in which structure it resides. But in my c... | 1 | 1 | 0 | 0 | 0 | 0 |
I have hundreds of images of handwritten notes. They were written from different people but they are in sequence so you know that for example person1 wrote img1.jpg -> img100.jpg. The style of handwriting varies a lot from person to person but there are parts of the notes which are always fixed, I imagine that could he... | 1 | 1 | 0 | 0 | 0 | 0 |
I run the language translator using TextBlob. It can translate from a string. However, I tried to loop the textblob translator for the data in a dataframe which in dataframe might have a mixed of different languages (en and es).
The code I used is :
for content in data:
blob = TextBlob(content)
for i in data:
blo... | 1 | 1 | 0 | 0 | 0 | 0 |
I have a dataset with the following features
data = {
description:'the tea was amazing, had great taste.'
country:'Chile'
year: 1980
designation:'random'
points: 80
}
I am looking for a way to use these features to build a model to predict points.
Description seems to hold alot of information about points.
How do i f... | 1 | 1 | 0 | 1 | 0 | 0 |
I have this plot, as you can see there are red and blue points.
The points have been randomly plotted, basically, my task is that i need to identify red and blue areas where there is more concentration of the same color.
With "concentration" i mean an area (or more than one area) where blue or red are >80% more than ... | 1 | 1 | 0 | 0 | 0 | 0 |
Hi!
I am trying to understand how BERT is dealing with text that has number within.
More concretely I'm trying to find the most similar line in document(text+numbers) and specific line(text+numbers).
I tried an example with BERT of 30 characters and cosine similarity:
sentence2 = "I have 2 apple"; score(between senten... | 1 | 1 | 0 | 0 | 0 | 0 |
I'm new in Python.
Wrote the function to specify the bag of words.
DICT_SIZE = 5000
WORDS_TO_INDEX = words_counts
"""INDEX_TO_WORDS = ####### YOUR CODE HERE #######"""
ALL_WORDS = WORDS_TO_INDEX.keys()
It's the function:
def my_bag_of_words(text, words_to_index, dict_size):
"""
text: a string
dict... | 1 | 1 | 0 | 0 | 0 | 0 |
I want to analyse some text on a Google Compute server on Google Cloud Platform (GCP) using the Word2Vec model.
However, the un-compressed word2vec model from https://mccormickml.com/2016/04/12/googles-pretrained-word2vec-model-in-python/ is over 3.5GB and it will take time to download it manually and upload it to a cl... | 1 | 1 | 0 | 0 | 0 | 0 |
Let's say I have a bag of keywords.
Ex :
['profit low', 'loss increased', 'profit lowered']
I have a pdf document and I parse the entire text from that,
now I want to get the sentences which match the bag of words.
Lets say one sentence is :
'The profit in the month of November lowered from 5% to 3%.'
This should ... | 1 | 1 | 0 | 0 | 0 | 0 |
I have cleaned and de-duplicated text data with a 'count_raw_id' column which implies the number of raw ids that are mapped to one cleaned id
A clean id represent that it is unique and has some raw ids mapped to it
Now i don't want to split my cleaned text data('clean_df') randomly
I need some Criteria based samplin... | 1 | 1 | 0 | 0 | 0 | 0 |
How do I detect what language a text is written in using NLTK?
The examples I've seen use nltk.detect, but when I've installed it on my mac, I cannot find this package.
| 1 | 1 | 0 | 0 | 0 | 0 |
We're implementing NLP solution, where we have a bunch of paragraphs text and tables. We've used google's burt for NLP, and it works great on text. However, if we ask a question whose answer lies in a table value then our nlp solution wouldn't work. Because it only works on natural language text (sentence, paragraph et... | 1 | 1 | 0 | 0 | 0 | 0 |
I'm trying to use low-rank-approximation for latent semantic indexing. I thought that doing low rank approximation reduces matrix dimensions but it contradicts the results I get.
Assume I have my dictionary with 40 000 words and 2000 documents. Then my term-by-document matrix is 40 000 x 2000.
According to wikipedia, I... | 1 | 1 | 0 | 0 | 0 | 0 |
I have a list of paragraphs, I would like to check if these words are valid English words or not. Sometimes, due to some external issues, i might not get valid English words in these paragraphs. I am aware of libraries like pyenchant and nltk which have a set of dictionaries and provide accuracy of some level but both ... | 1 | 1 | 0 | 0 | 0 | 0 |
I was kind of posting this to get some ideas, but I wanted to go through some text and figure out how to tag body parts and injuries. Any idea how I could do this?
For example if I had this text: "Wizards guard John Wall will undergo surgery to repair a ruptured left Achilles tendon. The procedure, which has yet to be ... | 1 | 1 | 0 | 0 | 0 | 0 |
Getting the following error message when setting up a 3D-GAN for ModelNet10:
InvalidArgumentError: Input to reshape is a tensor with 27000 values, but the requested shape has 810000 [Op:Reshape]
In my opinion the batch is not properly created and thereby the shape of the tensor is not valid. Tried different things but ... | 1 | 1 | 0 | 1 | 0 | 0 |
dataset image I have transportation dataset which contains 6 categorical variables(i.e sender,reciver,truckername,fromcity,tocity,vehicletype) and one continuous variable(i.e weight).i want to predict sale(which is continuous variable). i have 13000 records in dataset.
I have already tried one hot encoding but there ... | 1 | 1 | 0 | 1 | 0 | 0 |
I'm working with about 24k text files and am splitting some lines on '-'. It works for some files, however it fails to split for some other files.
company_participants is a list with N >= 1 elements, with each element consisting of a name followed by a hyphen ("-"), followed by the job title. To get the names, I use:
n... | 1 | 1 | 0 | 0 | 0 | 0 |
rather than finding the similarity between two string ,i just want find the similarity of the meaning of the two strings for ex.
what are the types of hyper threading
is there any categoriesin hyper threading
should have similarity .Till now i tried cosine similarity and word mover distance but i am not getting ac... | 1 | 1 | 0 | 1 | 0 | 0 |
I'm trying to solve KNN using tensorflow. After I get the K neighbours for N vectors, I have a N by K tensor. Now, for each vector in N, I need to use tf.unique_with_counts to find the majority vote. However, I cannot iterate in a tensor and I cannot run tf.unique_with_counts with a multi-dimensional tensor. It keeps g... | 1 | 1 | 0 | 1 | 0 | 0 |
Issue
I am trying to run the spaCy CLI but my training data and dev data seem somehow to be incorrect as seen when I run debug:
| => python3 -m spacy debug-data en
./CLI_train_randsplit_anno191022.json ./CLI_dev_randsplit_anno191022.json --pipeline ner --verbose
=========================== Data format validation... | 1 | 1 | 0 | 0 | 0 | 0 |
I am doing ruled based phrase matching in Spacy. I am trying the following example but it is not working.
Example
import spacy
from spacy.matcher import Matcher
nlp = spacy.load('en_core_web_sm')
doc = nlp('Hello world!')
pattern = [{"LOWER": "hello"}, {"IS_PUNCT": True}, {"LOWER": "world"}]
matcher = Matcher(nlp.vo... | 1 | 1 | 0 | 0 | 0 | 0 |
I want to do something like this if i have a textual transcript of a speech recognition system i want to convert this text like this - Triple A converts in AAA. Can someone help ?
| 1 | 1 | 0 | 1 | 0 | 0 |
I am using Amazon Comprehend Medical for entity detection of injuries.
Lets say I have a piece of text as follows:
John had surgery to repair a dislocated left knee and a full ACL tear."
Amazon comprehend medical (ACM) is able to recognize dislocated as a medical condition. However consider the next piece of text:
"Jo... | 1 | 1 | 0 | 0 | 0 | 0 |
Could anyone please help me to fix this? I am trying to install pyenchant in colab to perform a possible suggestion if a word is spelled wrongly. I would like to use pyenchant.
This is what I tried;
!pip install pyenchant==1.6.8
but it output the following error;
ERROR: Command errored out with exit status 1: python ... | 1 | 1 | 0 | 0 | 0 | 0 |
I was training a model in Colab, but, I shut down my computer and this training stoped. Every 5 epochs I save the weights. I think it is but I don't know how. How it's possible to continue the training with the weights previously saved?
Thanks.
| 1 | 1 | 0 | 0 | 0 | 0 |
For example:
I have a input tensor(input), shaped (?,10) dtype=float32, the first dimension means batch_size.
And a mask tensor(mask), shaped (?,10). mask[sample_number] is like [True,True,False,...], means the masks
And a label tensor(avg_label), shaped (?,) ,means the correct mean value of masked positions for each s... | 1 | 1 | 0 | 0 | 0 | 0 |
I have a Word2Vec model that I'm building where I have a vocab_list of about 30k words. I have a list of sentences (sentence_list) about 150k large. I am trying to remove tokens (words) from the sentences that weren't included in vocab_list. The task seemed simple, but nesting for loops and reallocating memory is sl... | 1 | 1 | 0 | 0 | 0 | 0 |
The issue I face is that I want to match properties (houses/apartments etc) that are similar to each other (e.g. longitude and latitude (numerical), bedrooms (numerical), district (categorial), condition (categorical) etc.) using deep learning. The data is heterogenous because we mix numerical and categorical data and ... | 1 | 1 | 0 | 0 | 0 | 0 |
I am new to NLP and Word Embeddings and still need to learn many concepts within these topics, so any pointers would be appreciated. This question is related to this and this, and I think there may have been developments since these questions had been asked. Facebook MUSE provides aligned, supervised word embeddings fo... | 1 | 1 | 0 | 0 | 0 | 0 |
I am trying to train my own Address classifier model using Stanford CRF-NER but the performance is very low. I am confused about the format of the training data I have trained with. The training data is typically the list of districts, cities, provinces and their respective labels. But the model is not tagging the resp... | 1 | 1 | 0 | 0 | 0 | 0 |
I am facing a problem with regex usage. I am using the following regex:
\\S*the[^o\\s]*(?<!theo)\\b
The sentence that I am using is:
If the world says that theo is not oreo cookies then thetatheoder theotatheder thetatheder is extratheaterly good.
What i want from output is to have patterns: the, then, thetatheder... | 1 | 1 | 0 | 1 | 0 | 0 |
I have a problem where I am tasked with creating three classifiers (two "out of box", one "optimized") for predicting sentiment analysis using sklearn.
The instructions are to:
Ingest the training set, train classifiers
Save the classifiers to disk
In a separate program, load the classifiers from disk
Predict using th... | 1 | 1 | 0 | 1 | 0 | 0 |
I am doing binary classification for title sentences in news. (To determinate whether the new is political biased)
I am using the Bert embedding from https://pypi.org/project/bert-embedding/ to embedding training sentences (one raw one title sentence) in Dataframes then feed vectorised Data into logistic regression, bu... | 1 | 1 | 0 | 0 | 0 | 0 |
Iam trying to check if keyword occurs in the sentence and then add the said keyword. I managed to write this solution but it only works if the search term is one word (said keyword). How to improve it to work when keyword occurs in a sentence? Here is my code:
keyword = []
for i in keywords['keyword']:
keyword.... | 1 | 1 | 0 | 0 | 0 | 0 |
I have installed Spacy using conda.
conda install -c conda-forge spacy
python -m spacy download en
And installed version was
import spacy
nlp=spacy.load('en_core_web_sm')
doc = nlp(u"Let's visit St. Louis in the U.S. next year.")
len(doc)
len(doc.vocab)
len(nlp.vocab)
len(doc.vocab) and len(nlp.vocab) showing only... | 1 | 1 | 0 | 0 | 0 | 0 |
I'm trying to build a deep learning model to predict the top 5 probable movie genres, using movies' synopses as input. The movie genres I'm including in the data are 19, but regardless of test input, the model always predicts the same 5 movie genres. Below is my code building the model. However, the accuracy during fit... | 1 | 1 | 0 | 0 | 0 | 0 |
i have tokenized a text in a column into a new column 'token_sentences' of sentence tokens.
i want to use 'token_sentences' column to create a new column 'token_words' containing tokenized words.
df i am using
article_id article_text
1 Maria Sharapova has basically ... | 1 | 1 | 0 | 0 | 0 | 0 |
I feel like I have a dumb question, but here goes anyway..
I'm trying to go from data that looks something like this:
a word form lemma POS count of occurrance
same word form lemma Not the same POS another count
same word form lemma Yet another POS another count
to a result that loo... | 1 | 1 | 0 | 0 | 0 | 0 |
I am having trouble constructing a pandas DataFrame with sparse dtype. My input is a bunch of feature vectors stored as dicts or Counters. With sparse data like bag-of-words representation of text, it is often inappropriate and infeasible to store the data as a dense document x term matrix, and is necessary to maintain... | 1 | 1 | 0 | 0 | 0 | 0 |
I use Python 3 and NLTK 3.0.0 with WordNet 3.0.
I would like to use this data (semeval2007) with WordNet 2.1.
Is that possible to use WordNet 2.1 with Python 3?
Is that possible to replace WordNet 3.0 with WordNet 2.1? How can i do that?
| 1 | 1 | 0 | 0 | 0 | 0 |
I am running spacy on a paragraph of text and it's not extracting text in quote the same way for each, and I don't understand why that is
nlp = spacy.load("en_core_web_lg")
doc = nlp("""A seasoned TV exec, Greenblatt spent eight years as chairman of NBC Entertainment before WarnerMedia. He helped revive the broadcast ... | 1 | 1 | 0 | 0 | 0 | 0 |
I have a dataframe with a 'description' column with details about the product. Each of the description in the column has long paragraphs. Like
"This is a superb product. I so so loved this superb product that I wanna gift to all. This is like the quality and packaging. I like it very much"
How do I locate/extract the s... | 1 | 1 | 0 | 0 | 0 | 0 |
General speaking, after I have successfully trained a text RNN model with Pytorch, using PytorchText to leverage data loading on an origin source, I would like to test with other data sets (a sort of blink test) that are from different sources but the same text format.
First I defined a class to handle the data loading... | 1 | 1 | 0 | 0 | 0 | 0 |
I have an image dataset that I am extracting text data from. I have the text as a string but now want to separate this text into a more structured form.
The data looks like this:
Camden Row,Camberwell, S.E—A. Massey, M.D.4.
Campden Hill, Kensington.
(Hornton House).
Campden Hill Road, Kensington.
James, M.D. 6.
Can... | 1 | 1 | 0 | 0 | 0 | 0 |
I have a dataset of keywords and clicks.
I'm trying to build a model where it takes in a phrase of keyword ( not more than 5 words, eg: mechanical engineer ) and outputs a value (like clicks, eg: 56). I'm using the bag of words approach which resulted in about 40% accuracy which is not good enough. Can I get some opin... | 1 | 1 | 0 | 0 | 0 | 0 |
How can I match the longest 'and chain' available in some text?
For example, consider
"The forum had jam and berry and wine along with bread and butter and cheese and milk, even chocolate and pista!"
How can I match
'jam and berry and wine'
and
'bread and butter and cheese and milk'
without knowing the number of 'an... | 1 | 1 | 0 | 0 | 0 | 0 |
I am attempting to save Doc data and attributes to binary using the new DocBin() class in spacy
I have saved data using pickle before but am looking for a more efficient method.
def serialize_to_disk():
doc_bin = DocBin(attrs=["LEMMA", "ENT_IOB", "ENT_TYPE", "POS", "TAG"], store_user_data=True)
for doc in nlp.pipe(ff)... | 1 | 1 | 0 | 0 | 0 | 0 |
I want to create a text classifer that looks at research abstracts and determines whether they are focused on access to care, based on a labeled dataset I have. The data source is an Excel spreadsheet, with three fields (project_number, abstract, and accessclass) and 326 rows of abstracts. The accessclass is 1 for ac... | 1 | 1 | 0 | 0 | 0 | 0 |
I'm new to text classification, however I get most of the concepts. In short, I have a list of restaurant reviews in an Excel dataset and I want to use them as my training data. Where I'm struggling is with the example syntax for importing both the actual review and the classification (1 = pos, 0 = neg) as part of my... | 1 | 1 | 0 | 0 | 0 | 0 |
In a binary text classification with scikit-learn with a SGDClassifier linear model on a TF-IDF representation of a bag-of-words, I want to obtain feature importances per class through the models coefficients. I heard diverging opinions if the columns (features) should be scaled with a StandardScaler(with_mean=False) o... | 1 | 1 | 0 | 1 | 0 | 0 |
Basically I have a RomanUrduDataSet (Urdu written with the help of English alphabets e.g Sahi-right) which also includes some English language words. And I have to detect how many words of the English language are included and what are they. In other words, wants to differentiate between two languages i.e English and r... | 1 | 1 | 0 | 0 | 0 | 0 |
I have trained a spacy model on below sentences.
sent1 - STREET abc city: pqr COUNTY: STATE: qw ziP: 99999
sent2 - STREET qwe city: ewwe COUNTY: STATE: we ziP: 99990
I have annotated as shown below:
risk_street_label STREET
risk_street_value abc
risk_city_label city
risk_city_value pqr
risk_state_label ... | 1 | 1 | 0 | 0 | 0 | 0 |
I'm trying to use a shortest path function to find the distance between strings in a graph. The problem is that sometimes there are close matches that I want to count. For example, I would like "communication" to count as "communications" or "networking device" to count as "network device". Is there a way to do this i... | 1 | 1 | 0 | 0 | 0 | 0 |
Since recently I have been getting this error whenever I run my notebook:
ModuleNotFoundError: No module named 'pytextrank'
Here is the link to my notebook:
https://colab.research.google.com/github/neomatrix369/awesome-ai-ml-dl/blob/master/examples/better-nlp/notebooks/jupyter/better_nlp_summarisers.ipynb#scrollTo=-d... | 1 | 1 | 0 | 0 | 0 | 0 |
I have a large collection of UGC reviews and I want to find how strongly they are associated with an attraction eg The Eiffel tower.
I tried word count frequency but I got results like 'I stayed at a hotel and I could see the Eiffel tower from there' along with relevant reviews.
Is there a was with NLP to find reviews ... | 1 | 1 | 0 | 0 | 0 | 0 |
I have a .csv file and I want to separate Non-English Text and English Text in two different files. Below is the code, I tried:
import string
def isEnglish(s):
return s.translate(None, string.punctuation).isalnum()
file=open('File1.csv','r',encoding='UTF-8')
outfile1=open('Eng.csv','w', encoding='utf-8')
... | 1 | 1 | 0 | 0 | 0 | 0 |
This is from a text analysis exercise using data from Rotten Tomatoes. The data is in critics.csv, imported as a pandas DataFrame, "critics".
This piece of the exercise is to
Construct the cumulative distribution of document frequencies (df).
The -axis is a document count () and the -axis is the
percentage o... | 1 | 1 | 0 | 0 | 0 | 0 |
:) I tried using w = Word(printables), but it isn't working. How should I give the spec for this. 'w' is meant to process Hindi characters (UTF-8)
The code specifies the grammar and parses accordingly.
671.assess :: अहसास ::2
x=number + "." + src + "::" + w + "::" + number + "." + number
If there is only english ch... | 1 | 1 | 0 | 0 | 0 | 0 |
this is my code
with open('file.txt', 'r') as source:
# Indentation
polTerm = [line.strip().split()[0] for line in source.readlines()]
polFreq = [int(line.strip().split()[1]) for line in source.readlines()]
this is inside file.txt
anak 1
aset 3
atas 1
bangun 1
bank 9
benar 1
bentuk 1
I got the polTerm jus... | 1 | 1 | 0 | 0 | 0 | 0 |
I want to run textrank against a large corpus (just my dev env is using 17K sentences)
Hence I have used scipy dok_matrix. However, when assigning the first value to my sparse matrix (i.e., similarity_matrix[1][0]), I get the following error, despite seeing in pycharm debug that my dok_matrix is of size 17K by 17k.
In... | 1 | 1 | 0 | 0 | 0 | 0 |
I am currently working in python with spacy and there are different pre-trained models like the en_core_web_sm or the en_core_web_md. One of them is using words vectors to find word similarity and the other one is using context-sensitive tensors.
What is the difference between using context-sensitive tensors and using... | 1 | 1 | 0 | 0 | 0 | 0 |
I have a nlp dataset, and according to the Pytorch official tutorial, I change the dataset to the word_to_idx and tag_to_idx, like:
word_to_idx = {'I': 0, 'have': 1, 'used': 2, 'transfers': 3, 'on': 4, 'three': 5, 'occasions': 6, 'now': 7, 'and': 8, 'each': 9, 'time': 10}
tag_to_idx = {'PRON': 0, 'VERB': 1, 'NOUN': 2... | 1 | 1 | 0 | 0 | 0 | 0 |
I've doing POS tagging on Bengali Language
but this error shows
when i wrote print(word + tag) then no data goes to the tagged file.
taggedOutput = doTag(tagger,untagged)
tagged = pd.read_csv("Tagged_bangla_hmm.csv",'w',encoding="utf-8", header=None, delimiter = r'\s+',skip_blank_lines=False, engine='python'... | 1 | 1 | 0 | 0 | 0 | 0 |
Size of the dataset: 81256,
Classes:200,
Range for each class varies from 2757 under a particular class to as low as 10 under particular class.Its highly unbalanced.
How to balance this dataset and what type of algorithm should be used to train the model.
Right now i have used random over sampler for sampling and Linea... | 1 | 1 | 0 | 1 | 0 | 0 |
Hello everyone I've tried searching this topic and haven't been able to find a good answer so I was hoping someone could help me out.
Let's say I am trying to create a ML model using scikit-learn and python. I have a data set as such:
| Features | Topic | Sub-Topic |
|----------|---------|------------------|
|... | 1 | 1 | 0 | 1 | 0 | 0 |
I am working on the Sentiment Analysis for a college project. I have an excel file with a "column" named "comments" and it has "1000 rows". The sentences in these rows have spelling mistakes and for the analysis, I need to have them corrected. I don't know how to process this so that I get and column with correct sente... | 1 | 1 | 0 | 0 | 0 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.