allenai / allenai/scispacy

Update scispacy version on streamlit demo

未关闭
#342 8 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Python
星标
2k
派生
258
PR 合并指标
30 天内没有已合并 PR

描述

I am getting different results for the same input text when I use the streamlit demo vs. when I run the code locally. The text in question:

```python
text = "The structural unit of the secretory Na+-K+-2Cl- cotransporter (NKCC1) is a homodimer."
```

NER results using `"en_ner_jnlpba_md"` on streamlit demo

![image](https://user-images.githubusercontent.com/8917831/112166886-6d643000-8bc6-11eb-9030-d2b23c69768d.png)

Then, running things locally:

```python
import spacy

model = "en_ner_jnlpba_md"
nlp = spacy.load(model)

doc = nlp("The structural unit of the secretory Na+-K+-2Cl- cotransporter (NKCC1) is a homodimer.")

for ent in doc.ents:
print(f"{ent.text}\t{ent.label_}")

"""
The above prints:

NKCC1 DNA
homodimer PROTEIN
"""
```

My `pyproject.toml` has the following dependencies:

```toml
scispacy = "^0.4.0"
en_ner_jnlpba_md = {url = "https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.4.0/en_ner_jnlpba_md-0.4.0.tar.gz"}
```

Any idea what might be causing this? I consider the streamlit demo response to be more correct, and am interesting in getting the same result locally!

---

Also, I am only showing one example here, but I found I could quickly come up with other examples where the streamlit demo specialized NER results were better (IMO) than the results I got locally. A second example is:

```python
text = "Fourteen residues of the U1 snRNP-specific U1A protein are required for homodimerization, cooperative RNA binding, and inhibition of polyadenylation."
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。