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

correct_common_misspellings throws FileNotFoundError and incorrectly assumes resources are relative to transformation directory #319

Open
Saad-Mahamood opened this issue Oct 8, 2021 · 0 comments

Comments

@Saad-Mahamood
Copy link
Collaborator

These issues appear when trying to use this transformation outside of the root NL-Augumenter directory. For example in another sub-directory off the root directory. The fixes needed are the following:

  • Remove:
spell_corrections = os.path.join(
        "transformations", "correct_common_misspellings", "spell_corrections.json"
    )
  • Use file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'spell_corrections.json') to get a handle on the current path relative to transformation.py script file.
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