hankcs / hankcs/HanLP

amr部分node缺失anchors信息、label错误

Open
#1,733 2 comments 0 reactions 1 assignee Claimed by @hankcs View on GitHub
bug
Dominant language
Python
Stars
36.5k
Forks
10.9k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
amr模型: MRP2020_AMR_ZHO_MENGZI_BASE

例1 输入 ["我", "不", "吃饭"]
执行结果中, 吃饭 对应的 "anchors": []

```
{
"id": "0",
"input": "我 不 吃饭",
"nodes": [
{
"id": 0,
"label": "我",
"anchors": [
{
"from": 0,
"to": 1
}
]
},
{
"id": 1,
"label": "-",
"anchors": [
{
"from": 2,
"to": 3
}
]
},
{
"id": 2,
"label": "吃饭-01",
"anchors": []
}
],
"edges": [
{
"source": 2,
"target": 1,
"label": "polarity"
},
{
"source": 2,
"target": 0,
"label": "arg0"
}
],
"tops": [
2
],
"framework": "amr"
}
```

例2, 输入 ["我", "吃饭"]
吃饭 对应的 "label": "**死-01**", "anchors": []
```
{
"id": "0",
"input": "我 吃饭",
"nodes": [
{
"id": 0,
"label": "我",
"anchors": [
{
"from": 0,
"to": 1
}
]
},
{
"id": 1,
"label": "死-01",
"anchors": []
}
],
"edges": [
{
"source": 1,
"target": 0,
"label": "arg0"
}
],
"tops": [
1
],
"framework": "amr"
}
```
**Code to reproduce the issue**
Provide a reproducible test case that is the bare minimum necessary to generate the problem.

```python
```

**Describe the current behavior**
上述例子在线版测试时label没有问题

**Expected behavior**
A clear and concise description of what you expected to happen.

**System information**
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04
- Python version: 3.9
- HanLP version: 2.1b27

**Other info / logs**
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

* [x] I've completed this form and searched the web for solutions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.