Organization finder in spaCy I am trying to find the parties between which the agreement is executed from the statement below.

AGREEMENT, dated as of January 10, 2000, is entered into by and between ABC-EFG GROUP Inc. having an address at 418 Mona Drive, Prominade 34, Florida 34673, United States of America and Rob Cummins, an individual residing in the state of Florida, and having an address at 13 test Dr, Arosa, FL 43566

To get this, I tried the following code:
for chunk in doc.noun_chunks: # after loading &quot;nlp = spacy.load(&quot;en_core_web_sm&quot;)&quot; and doc = nlp(&quot;string&quot;)
   print(chunk.text, chunk.root.text, chunk.root.dep_,chunk.root.head.text)

which gives me:
AGREEMENT AGREEMENT nsubjpass entered
January January pobj of
ABC-EFG GROUP Inc. Inc. pobj between
an address address dobj having
418 Mona Drive Drive pobj at
United States States conj Drive
America America pobj of
Rob Cummins Cummins conj America
an individual individual appos States
the state state pobj in
Florida Florida pobj of
an address address dobj having
13 test test pobj at
Dr Dr ROOT Dr
FL FL appos Arosa

I don't understand how I am supposed to find the two parties from this output.
I am not specific to spaCy. A suggestion of any other model or method also will work.
Please note that I have already tried NER but the results are very poor.
Using dependency parsing alone will not give you what you need. You may be able to get your answer by interpreting the dependency tree. For instance, in this case ABC-EFG GROUP Inc. is a pobj of between, which could infer that it is party 1. In this particular case, the dependency parsing isn't fully correct and party 2 (Rob Cummins) is difficult to find.

I would recommend you try the following things:

It seems that the parties are either organization or people, so you could narrow down your candidates to proper nouns and you could use NER to see whether any ORG or PER are detected. That will not tell you exactly whether they are the parties, but they could give you useful hints.

In this case, it feels like a plain regular expression could work. Whatever proper noun occurs after between seems to be party 1, and whatever follows and seems to be party 2. Of course, a regular expression would only work for cases written with the same pattern, but it is always wise to consider. Perhaps, you are already a fair amount of your scenarios with a solution that will always work. You could also use the presence of words like "between" and "and" as a feature.

If you don't have a lot of training examples, you could take a look at libraries like mimesis and faker. They allow you to generate company names, addresses, people names, etc.