pythonspacynamed-entity-recognitionpart-of-speech

Finding the word that corresponds to experience


Suppose i have a sentence like the following, how can i find what the experience corresponds to?

Ex: Programmer with 5 years of experience wanted. I want to find what the experience (5 years) corresponds to, in this case programmer.

The code should also be recognize a corresponding verb, ex: 5 years of programming

So how should i go about it? I was thinking of making a pattern that finds the closest noun or verb.


Solution

  • As I didn't get any meaningful help, I just came up with a temporary solution of my own. Find the sentence with the entity tag "DATE", and remove the stop words.

    For example, the sentence 'The ideal candidate must have at least 6 years of experience in the field.' becomes into the following:

    'ideal candidate 6 years experience field'

    Obviously I can refine this further, but for now this will do.