I am trying to implement text classification and sentiment analysis from the documents.
I always use POS tags as features in the following way.

Mike is playing football

I would convert it into this format: Word_POS

Mike_Noun is_Verb playing_Verb football_Noun

I wanted to know what are the ways I can use NER as features. One of the ways I use is by taking count of NERs as Features. So my sentence would be

Mike_Noun is_Verb playing_Verb football_Noun 0 0

Where 0 is the number of ORG-organisations entities and another 0 is the number of e.g., DATE entities.

So I have 2 questions:

What are the other ways we can use POS tags and NERs as features in

  1. Without deep learning?
  2. With deep learning

Also it would be really helpful if you could share resources where I can learn more about feature engineering for Text Data.


1 Answer 1


I don't think adding counts of named entities can help. You should ask a question: do you think that you would be able to better decide about sentiment of a sentence if you knew the number of entities in the sentence? I don't think so. If you prefer more data-driven reasoning, you can try to plot your training data with respect to the features and have a look if the features seem to separate the classes in the train data. If not, they are probably useless.

When using deep learning, we usually do not explicitly introduce linguistically features. A typical approach would be using a pre-trained encoder (such as BERT) or pre-trained word embeddings and add an LSTM/CNN to get a single vector from the embeddings. The pre-trained components are usually somehow aware of the linguistic features and using them as an explicit input does not further improve the performance.

  • $\begingroup$ What is your opinion on using POS tags as features??Is there any other way? $\endgroup$
    – chaitanya
    Apr 30, 2020 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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