# NLP approaches to infer Processes from Text

I would like to use NLP techniques to infer a process out of raw text. For example, if I have a sentence like:

Recruitment is about attracting and selecting the right person for the job.

To get the following process:

Attracting the right person.

I noticed that a very good strong step forward is to use SpaCy, tokenizing the texts and filtering them for NOUNS. But from this point on, I'm completely blank. Someone suggested to me something named "Semantic Role Labelling" (SRL) and reading about the approach I think it could work here in a good way, perhaps using the AllenNLP module.

What I would like to know though (and the whole purpose of this post) are alternatives. Besides SRL, what other approaches could suit and provide a solution to this problem? I obviously don't expect the people who reply to solve the problem, only to make suggestions on approaches that might work so I can dig upon them (as mentioned, my experience on this topic is really short).

• as a first question, do you have your input sentences labeled with the processes categories you want? Or you want to find out possible processes categories without knowing them in advance? Jun 10 '21 at 7:32
• The first step would be to formalize what is the expected output, i.e. what is a "process". Ideally you would have a sample of documents annotated with their corresponding processes. Fwiw I'm skeptical about SRL being the right direction, because it would lead you to exploiting the linguistic structure of the sentences and that's rarely convenient. Jun 10 '21 at 8:59
• @GermanCM hi. To be fair I'm debating which road of the ones you mention is the easiest to achieve, I'm thinking labeling will get me faster to what I want/need despite having to re-train a model for each new label previously not taken into account. And knowing them in advance, well, it would be ideal but not sure how to do so. What would you use for each of the paths suggested? Jun 10 '21 at 15:57
• @Erwan hi, thanks for your insight. So what you are telling me is in other words, to label data as GermanCM mentioned in his commentary right? Jun 10 '21 at 16:03
• @Aquiles It is indeed a crucial step for a supervised ML model to have a reliable labeling in advance. But in case you suspect more "processes" labels exist and you do not know yet, you could first try to implement an unsupervised model like LDA to infer new labels but... I would suggest labeling in advance if you can, and proceed with text classification Jun 10 '21 at 19:51

Following with the idea of building a classifier, one option is to use nltk library together with Keras-Tensorflow once you have a labeled dataset with the desired process categories. You can go on two main approaches:

• bag-of-words
• sequence-modeling

As a quick resume of the steps to implement in a text classifier with the first approach, you could follow the ones below (you can find a worked pout example here):

• Read and check that your raw input sentences (to be used for training, validating...) have the right format and correct label, something like:
• Preprocess your sentences as needed, which could be these steps: