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

No same-as edges in example for docamr #55

Open
aolney opened this issue Jan 5, 2024 · 1 comment
Open

No same-as edges in example for docamr #55

aolney opened this issue Jan 5, 2024 · 1 comment

Comments

@aolney
Copy link

aolney commented Jan 5, 2024

Running the example docamr code below does not give same-as edges for coreference:

from transition_amr_parser.parse import AMRParser

# Download and save the docamr model to cache
parser = AMRParser.from_pretrained('doc-sen-conll-amr-seed42')

# Sentences in the doc
doc = ["Hailey likes to travel." ,"She is going to London tomorrow.", "She will walk to Big Ben when she goes to London."]

# tokenize sentences if not already tokenized
tok_sentences = []
for sen in doc:
    tokens, positions = parser.tokenize(sen)
    tok_sentences.append(tokens)

# parse docs takes a list of docs as input
annotations, machines = parser.parse_docs([tok_sentences])

# Print Penman notation
print(annotations[0])

# Print Penman notation without JAMR, with ISI
amr = machines[0].get_amr()
print(amr.to_penman(jamr=False, isi=True))

# Plot the graph (requires matplotlib)
amr.plot()

Instead I get a warning for disconnected graphs and this output:
image

@Bryan-Stearns
Copy link

I have this same issue. I also tried other sentences, like ["I held my son.", "He is 3 months old."]. In that instance, the sentences were united under the "multi-sentence" node, but that was the only union. There was no link across sentences at all, no "same-as" edges.

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

2 participants