Melius
Melius

Reputation: 1

Dependency parser with SpaCy

I am trying to build an entity ruler with SpaCy that will identify specific organizations based on their relationship (contract) with other organizations. For context, you are a supermarket dealing with big clients, some of whom have the same name.

patterns of main organizations.
{'entity': 'Jane Doe', 'label': 'MainORG', 'pattern': [{'LOWER': 'janedoe'}], 'id': 'jane001'}
{'entity': 'James Doe', 'label': 'MainORG', 'pattern': [{'LOWER': 'jamesdoe'}], 'id': 'james007'}
patterns of clients
{'entity': 'John Doe', 'label': 'ORGTypeB', 'pattern': [{'LOWER': 'johndoe'}], 'id': 'clientA'}
{'entity': 'John Doe', 'label': 'ORGTypeB', 'pattern': [{'LOWER': 'johndoe'}], 'id': 'clientB'}

There are individual contracts between Jane and John with ID clientA and another contract between Jack and the second Jdon with ID clientB.

How can I build a dependency parser with SpaCy or any solutuon so that when you have a messages between Jane and John and between James and the other John, the correct John is returned with their IDs?

I have tried to build an entity ruler based on only patterns as shown above, but the model ges confused easily. Is there a way to build such a model from scratch? I can imagine it's similar to the way Apple as a company can differentiate from Apple as a fruit.

Upvotes: 0

Views: 57

Answers (0)

Related Questions