1
$\begingroup$

I am trying to make a first analysis on the interest of people feedback from their emails. For a first analysis I made with a simple wordcount to know the key words.

I am facing the following problem: some customers give very short feedback and others a single customer gives very long feedback so the wordcount mechanism that simply counts words gives more weight to the customer who writes more, which may not be the most important.

i.e

customer_1: I would like to know the normative about Covid, cause I m covid vaccinated... covid ..covid (2000 words) # word covid appear 13 times

customer_2: I m worry about price (100 words)
customer_3: Something about pices too(150 words)

If we just follow the aproach of Word count, the results are unbalanced towards the person who writes the most. how can this be avoided ?

In ML, in order to avoid that some attributes have more weight than others, they are normalised, how would this be in NLP ?

$\endgroup$

1 Answer 1

1
$\begingroup$

You can apply text classification with Bert.

It would give a classification, whatever the message length is.

Therefore, you can use multi-class text classification, for instance:

https://huggingface.co/palakagl/Roberta_Multiclass_TextClassification?text=I+love+AutoTrain+%F0%9F%A4%97

To implement it, here are several tutorials:

https://www.kaggle.com/code/thebrownviking20/bert-multiclass-classification

https://towardsdatascience.com/multi-class-text-classification-with-deep-learning-using-bert-b59ca2f5c613

https://towardsdatascience.com/text-classification-with-bert-in-pytorch-887965e5820f#:~:text=There%20are%20two%20different%20BERT,hidden%20size%2C%20and%20340%20parameters.

$\endgroup$
3
  • $\begingroup$ Hi @Nicolas thanks for taking the time to answer... but we are not really interested in "sentimental analysis" but in knowing why people are calling, i.e. what people are concerned about, that's why we need the "Key Words". $\endgroup$ Aug 25, 2022 at 9:32
  • 1
    $\begingroup$ Understood Enrique. I've updated the answer accordingly. $\endgroup$ Aug 25, 2022 at 9:55
  • $\begingroup$ Thanks nicolas the one with mutiliclass classification coul work thanks again $\endgroup$ Aug 25, 2022 at 10:44

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.