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

Export the results as DataFrame #65

Open
davidsbatista opened this issue May 18, 2023 · 0 comments
Open

Export the results as DataFrame #65

davidsbatista opened this issue May 18, 2023 · 0 comments
Assignees

Comments

@davidsbatista
Copy link
Collaborator

On this blog post about NER evaluation, the author uses nervaluate, and also shows with a snippet of code how to quickly pack the results from a dictionary to a DataFrame:

from collections import defaultdict

def flip_nested_dict(dd):
    result = defaultdict(dict)
    for k1, d in dd.items():
        for k2, v in d.items():
            result[k2][k1] = v
    return dict(result)

I will add this as yet another format to export the results from the Evaluator.

@davidsbatista davidsbatista self-assigned this May 18, 2023
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

1 participant