I'm fairly new to NLP and text classification world, and so far I haven't been able to find the answer to the following problem:

I have text entries for a large number of observations. My goal is to classify (supervised) by text into one of two outcomes. However, the text I'm looking to classify has phrases where ordering matters, especially when it comes to negation prior to the word. Are there robust methods that allow for this accommodation of strings and negation terms prior to strings?

Ideally, the method would also allow me to specify a priori which terms that are already known to denote an observation as having a specific classification, but then learn beyond those terms how to classify.


It sounds like there are two things you want here:

  1. A text classification method that takes word order into account (specifically keeping track of which words are negated)

  2. A method to allow the end user to label certain features

For point #1, there are two common ways I can think of. You can choose either or both. The first is to use n-grams as features. The drawback of using n-grams in text classification is that you'll generally need more training data if you want the classifier to perform better, since moving from 1-grams to 2-grams effectively squares the number of features.

If it turns out that negation is all you're really interested in, you're probably best off running a negation detection program (such as the one in cTAKES) as a pre-processing step and then using feature conjunctions as the input to your classifier, e.g. word=effective&negation=true.

For point #2, you may want to look into Generalized Expectation Criteria, which is a weakly-supervised learning method that allows end users to label features rather than/in addition to labeling full documents.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.