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

Use c-amr with gold relation and concept labels #11

Open
silvianacmp opened this issue Jul 27, 2017 · 2 comments
Open

Use c-amr with gold relation and concept labels #11

silvianacmp opened this issue Jul 27, 2017 · 2 comments

Comments

@silvianacmp
Copy link

Hello,

I have a use-case in which I would like to evaluate the performance of c-amr using smatch, but when predicting the AMR using gold standard labels for the relations and concepts. I have seen that you have reported such results in the paper explaining your solution so I was wondering whether it is possible to do this using the code publicly available in this repository. Thank you!

@Juicechuan
Copy link
Member

Hi,

I don't have a function to do that in the current version. But you can try tweaking it bit by modifying the evaluate function in graphstate.py:

    def evaluate(self):
        num_correct_arcs = .0
        num_correct_labeled_arcs = .0

        parsed_tuples = self.A.tuples()
        ....
        num_parsed_arcs = len(parsed_tuples)
        gold_tuples = self.gold_graph.tuples()
        num_gold_arcs = len(gold_tuples)

        num_correct_tags = .0
        num_parsed_tags = .0
        num_gold_tags = .0
        visited_nodes = set()
        for t_tuple in parsed_tuples:
            p,c = t_tuple
            p_p,c_p = p,c
            # comparing for evaluating
            ....

where this function is basically doing evaluation by comparing each concept and relation, you can just assign the gold concept and relation to the parsed graph.

@zy-zhangying
Copy link

Have you solved this problem?

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

3 participants