New answers tagged

0

From OP's comment: I want to find out if an unlabelled tweet has to categorized as activism or not according to the labelled data I already have (the ones containing activism hashtags) This could correspond to a semi-supervised learning setting along the lines of: Train a model on a labelled sample of data, e.g. taking tweets with #activism as positive ...


1

Yes, this is feasible. One-class classification is a thing, but it is usually used in a context where it is hard or impossible to get negative samples. In your case, I would argue, you can quite easily get tweets that are not about activism, therefore you can render it as a binary classification, because you have data points of two classes or labels: 1 for ...


1

Yes. one-class SVM is actually designed for your problem. The question it answers is "how similar a new sample point (unlabeled tweet) is to my training data (hash-tagged tweets)?" Regardless of what is a good answer to this question, I can share my brainstorming. Try to find the answer of "How can I model my data in a way that activism tweets stick together ...


0

I would say that the meaningful difference in approaches to sentiment classification is between knowledge-based and statistical ones. The knowledge-based, as you mention, usually use a polarity lexicon, that contains words with a sentiment value and then calculate the sentiment of a text by summing up the values of the words. The statistical ones train a ...


0

In general, training your own classifier is likely to perform better but it's going to take more time and effort: Probably the NLTK system was trained on some generic data which might be very different from your target text. Since any supervised system assumes the same distribution between the training and test set, it's always better to train on a sample ...


0

Here are a couple of steps I suggest to take: Compare your data to the data used in the paper. Your dataset contains only 40k examples while theirs range from ~335k to ~1.57m. So it could be that your dataset is just too small for the more complex model. Looking at accuracy scores for training and validation data separately can help to figure this out too. ...


2

I think Valentin's answer is great. I just wanted to +1 his remark that you really seem interested in how to find important words rather than filtering uncommon ones (bodybuilding might actually turn out to be not very common, but I understand even in that case it would still be irrelevant for your task). If this assumption is correct, I think what you need ...


3

Some common approaches to this problem are: Keep only the n- most common words in a corpus (automatically done in scikit-learn: https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.CountVectorizer.html#sklearn.feature_extraction.text.CountVectorizer). Keep all words, but downweight uninformative words using a transformation ...


5

It all depends on your definition of what a common word is in your domain. You are using an NLTK corpus which likely doesn't fit your domain very well. Either you have a corpus containing the domain you want and you do a simple lookup. Or you don't know in advance and you need to compute these common words from your documents (your short phrases). In that ...


2

Named Entity Recognition (NER) would extract names of people, organizations and such. Example: "Penalty missed! Bad penalty by <person>Felipe Brisola</person> - <organization>Riga FC</organization> - shot with right foot is very close to the goal. <person>Felipe Brisola</person> should be disappointed." So it could be ...


0

Ok, so it seems that the whole idea of transfer learning in NLP is to use more than just the word-embeddings which is considered "low level", but rather higher level representations. This is akin to what goes on in Computer Vision where the final (or almost final) layer embedding in nets trained on ImageNet are then used in transfer learning in other tasks, ...


1

WordNet is certainly an interesting resource to explore for this task. It might not cover all your vocabulary but I can't think of any other way to capture fine-grained semantic relationship between words.


0

If you can achieve high results with a simpler model, it is great news! Always choose simpler models because they may be wrong on fewer things than complex ones (Occam's Razor). Nothing to be worried about, this can happen. Obviously, it is always possible that there is an implementation problem, so always make sure your code works better. Reproducing ...


1

You can email the authors to ask them if they could share their code with you, but maybe they can't for IP reasons or don't want to share it. Papers like these are not unusual in experimental research. In theory you should be able to reproduce their system following the explanations in the paper. However there are other tools available for biomedical NER: ...


0

That's because using NN for chatbots have proven super challenging. Basically once you type a query the NN (whether its NN or RL) has to tag it to a particular intent based on which u give a templatized response ( generating a human like response goes into even more complex territory of natural language generation) The issue with NN like LSTM , GRU etc is ...


1

As far as I know you don't have a lot of options, you're probably stuck with heuristics: Capital letters Regular expressions (e.g. for dates) List of predefined entities (e.g. from Wikipedia) stored in a dictionary


0

Since topic modeling is unsupervised, it's not usually evaluated against labeled data. Instead people devise measures which evaluate the clusters, typically based on how much the most probable words for a topic are semantically relevant. You might find data ideas in this paper: https://www.cs.cornell.edu/~laurejt/papers/authorless-tms-2018.pdf


0

As far as I know the word "lexicon" is mostly used for a simple list of words (or terms), I would say it's quite rare to use it for describing a list of patterns/rules. "gazetteer" and "dictionary" would be a bit more general in my opinion, for instance one can have a "dictionary of rules" which associates specific patterns with actions. But overall I agree ...


0

NLP is rather quite hyper-dimensional. I'd go data-driven way and use some pretrained embedder. Nowadays there're a few to choose from, like LASER from Facebook. There's unofficial pypi lib, though it works just fine. If you want to reach seminal-like scores, there's no point in doing NLP by hand. Embedders usually cover dozens of languages, so you can feed ...


0

I don't think there will be a definitive answer, but I suspect that you'll get better results using the averaging method rather than the padding method. One big problem with the padding method is that it's sensitive to word order. For example, the sentences "Gibbons are one type of ape" and "One type of ape is the Gibbon" look very different if we do a word-...


1

That would probably be related to textual entailment and also relation extraction. I'm not aware of any specific work but I would check in the biomedical domain, because there are resources such as SemRep and I wouldn't be surprised if people tried to use it for similar purposes.


0

Using bigrams and trigrams is likely to generate a high number of features, but with a small dataset the traditional approach would be to reduce the number of features. You could start by removing the least frequent words/n-grams (e.g. less than 3 occurrences), and/or use feature selection with InfoGain. It might not be very accurate but at least you avoid ...


0

Check my answer to this question. Nowadays there're many pretrained embedders to choose from. They'll give you fixed-size numerical vector of features. You don't even have to go DNN way, xgboost will work just fine.


0

Is it possible to do some form of clustering? I am actually trying to do this as well (turning a single label data to a multi-label data except my data is in the form of time series). Therefore, in my case, the time series can be transformed into a pairwise distance matrix. Then using some form of clustering method (k-means) the time series of similar ...


0

First of all, I think you are confused with pretrained and finetuned. BERT is pretrained on a lot of text data. By using this pretrained BERT, you have a model that already have knowledge about text. BERT can then be finetuned on specific dataset, where BERT learn specific knowledge related to the dataset. That's why a finetuned BERT is bad on other ...


1

It is easy. You need to tag a phrase using B (Begin), I (Interior), and E (End). For example, you want to tag "United States of America" as the name of a country. You will tag likes: United(B_Country) States(I_Country) of(I_Country) America(E_Country) In the same text if you find "Islamic Republic of Iran", you will tag likes: Islamic(B_Country) Republic(...


2

What you describe is called padding and is indeed used frequently in language modeling. For instance if one represents the sequence "A B C" with trigrams: # # A # A B A B C B C # C # # The advantages of padding: it makes every word/symbol appear the same number of times whether it appears in the middle of the sequence or not. it marks the beginning and ...


0

If you would know the target(s) (pasta, pizza) and the sentiment features (good, bad, etc), you could try to catch the feature that is closest to the target in a sentence. But to say more, it really is necessary to see more of your sentences to understand the structure.


0

If obtaining word similarity is your main goal, I would suggest you to look at Word2Vec from gensim. You can even train a simple network on your corpus and fetch the most similar word(vectors). enter link description here


0

There're few pretrained embedders i.e. LASER, which covers Hindi as well. If you want to achieve seminal-like scores, I wouldn't bother doing this all by hand, and take on full data-driven approach.


1

You just stumble over one big problem in the NLP field : finding the perfect metric.. Most traditional metrics (BLEU, ROUGE, ...) simply does not take into account the distance in terms of semantics between barking and crying. So according to these metrics, The dog is crying is as similar as The dog is salmon to the reference, the dog is barking. From a ...


0

You are mixing two different concepts in the same question: One hot encoding: approach to encode $n$ discrete tokens by having an $n$-dimensional vectors with all 0's except one 1. This can be used to encode the tokens them selves in networks with discrete inputs, but only if $n$ is not very large, as the amount of memory needed is very large. Transformers (...


0

The theoretical advantage should be that the network should be able to grasp the pattern from the encoding and thus generalize better for longer sentences. With one-hot position encoding, you would learn embeddings of earlier positions much more reliably than embeddings of later positions. On the other hand paper on Convolutional Sequence to Sequence ...


0

Have you done any analysis as to what steps in your procedure consume most time? For example, it may be that GPU operations are responsible for most of the time. Then, of course, adding CPU cores will not give any benefit. And have you looked at CPU statistics, i.e. is the full capacity used?


0

This is a hard problem. I don't think using spell correction is the best method to use here, since I think you already knew the issue which is as you mentioned. So here is some suggestions from me : Study the texts, determine where misspeling occurs and provide the correction by simple mapping. However this could be a bit of problematic especially with ...


1

This blog has the solution for short text similarity. They mainly use the BERT neural network model to find similarities between sentences. https://medium.com/@vimald8959/sentence-categorisation-short-text-similarity-61bb88fae15e


Top 50 recent answers are included