NLP - Extract main actions/tasks from unstructured sentences

Viewed 42

I have a lot of unstructured data that conveys a set of certain actions. For example:

Sentence 1: build and paint chain link fence with black coating, post and rail to be red coat
Sentence 2: new roll door and temp slide door - additional ac installation
Sentence 3: the worker shall : - remove exist fence panel and scrap

I have many such sentences in the dataset. I am trying to extract the main actions from these sentences, for example, the main actions in above sentences would be:

Sentence 1: build and paint chain link fence
Sentence 2: additional ac installation
Sentence 3: remove exist fence panel and scrap

So far I have done Topic Modelling using this wonderful package called BERTopic. It clusters the sentences and extracts topics using TF-IDF of the words in the sentences. Since it's a huge dataset, each cluster would have a lot of sentences and the topics obtained from those clusters will be less relevant.

For example, BERTopic would create more item clusters (such as clusters having sentences with words: fence, gate, house etc. since they occur more and has greater TF-IDF) instead of action clusters (such as paint, roofing, remodel, roll out, installation etc).

To extract main actions, I was thinking of Named Entity Recognition but I am not sure how the model would identify phrases of varying lengths.

Is there a way in which I can extract the main context/task/action in a sentence?

0 Answers
Related