question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Differences in dependency trees built by models of different versions

See original GitHub issue

Hello!

I trained a tagger/parser for portuguese using spaCy 2.1.8 and got a consistent model (let’s call it model A), but, when I upgraded to spaCy 2.2, I discovered it didn’t work the same way in the newer version. I trained a new model (model B) for this version using the exact same corpus and got metrics (tokenizer, tags, uas and las) relatively close to the ones presented by model A, as show in the table below.

metric model A
(spaCy 2.1.8)
model B
(spaCy 2.2)
tokenizer 98.55 98.35
tags 94.71 96.98
uas 85.76 85.48
las 82.52 82.12

However, when the models are used to annotate the same sentence, they give different results. For example, in the sentence [...] ou seja será necessários dois planetas para suprir a demanda [...], model A builds the following dependency tree:

Batelada

In the meantime, model B builds a slightly different tree, as shown below.

Quarentena

I know there is a difference in how models apply lemmas from spaCy 2.1 to 2.2, but is there any other changes that could affect the model behaviour? How can two models trained with the exact same corpus and with similar metrics can diverge while constructing dependency trees?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mileenawinscommented, Jul 22, 2020

Hi everyone! Same here… I noticed the lemmatization difference between models but it wasn’t a big matter, but then I realized some sentence structures were different and some rules with dependencies didn’t work so well anymore.

1reaction
ggteixeiracommented, Jul 22, 2020

I’m facing the very same problem here guys. I’m stuck in spaCy 2.1 because of that weird trees behavior

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dependency Structure Trees in Syntax Based Machine ...
A dependency tree for a sentence is a directed acyclic graph with words as nodes and relations as edges. Each word in the...
Read more >
Understanding the npm dependency model - Alexis King
Peer dependencies​​ The difference shows up in how npm performs dependency resolution: rather than getting its own copy of a peer dependency, a ......
Read more >
Versions Maven Plugin – versions:compare-dependencies
Compare dependency versions of the current project to dependencies or dependency management of a remote repository project. Can optionally update locally ...
Read more >
Dependency Parsing - Stanford University
A dependency tree is then said to be projective if all the arcs that make it up are projective. All the dependency trees...
Read more >
Dependencies vs. Constituents for Tree-Based Alignment
In this paper, we make a comparison of two tree- to-tree models, one trained on the trees produced by automatic parsers for both...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found