Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Results cannot be displayed #9

Closed
caizhuo opened this issue Jun 1, 2019 · 4 comments
Closed

Results cannot be displayed #9

caizhuo opened this issue Jun 1, 2019 · 4 comments

Comments

@caizhuo
Copy link

caizhuo commented Jun 1, 2019

image

I used this example, but it didn't show up.

@tim5go
Copy link
Owner

tim5go commented Jun 3, 2019

@caizhuo
Which version of LTP are you using?
Did you get an error or some unexpected result?

@OnePunchMann
Copy link

i use the version 'ltp_data_v3.4.0', it didn't show up.

@tim5go
Copy link
Owner

tim5go commented Sep 11, 2019

@yulongleo
I was using LTP 3.3.1 when I wrote the code, better to stick with that version

@tim5go tim5go closed this as completed Sep 17, 2019
@linfeng-du
Copy link

linfeng-du commented Jan 27, 2021

@caizhuo Though its long closed... If you're using ltp_data_v3.4.0, you need to substract the arc.head by 1 cuz for arc.head, index 0 is occupied by the ROOT node. This won't cause errors cuz the ROOT node will only be linked once and is used in
root = [i for i, x in enumerate(arcs) if x.relation == 'HED']

E.g.
change
relations = [i for i, x in enumerate(arcs) if x.head == root and x.relation == 'COO']
to
relations = [i for i, x in enumerate(arcs) if x.head - 1 == root and x.relation == 'COO']

I'm getting the demo results and it seems using ltp_data_v3.4.0 could get more.
image

B.T.W. I render the unclosed issues are related to this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants