question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dashes in category/file names make retrieval difficult

See original GitHub issue

At the moment there are categories in corpora like “film-tv” and files like “materials/abridged-body-fluids” which cannot be accessed using the standard syntax of pycorpora.category_name.file_name['key'], because - is not a legal character in Python identifiers. I can work around this as follows: getattr(pycorpora, 'film-tv').tv_shows['tv_shows'] pycorpora.materials.get_file('abridged-body-fluids')['abridged body fluids'] However, this isn’t ideal and probably either pycorpora should perform these workarounds internally (translating - to _, for instance), or corpora should restrict category and file names to valid JS/Python/C (for example) identifiers. I’ve opened a similar issue in corpora: https://github.com/dariusk/corpora/issues/236.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
aparrishcommented, Nov 28, 2016

I merged a fix for this in #9 a few weeks ago, actually. It just hasn’t made it to PyPI yet. For now, you can take advantage of the fix by installing directly from github. I’ll leave this open until I have a chance to make a new release and close when the fix is generally available.

0reactions
dariuskcommented, Sep 25, 2017

Ok!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dashes in category/file names make retrieval in pycorpora ...
When using tools like pycorpora, these names cause problems because they prevent the user from retrieving files using standard syntax, such as ...
Read more >
Descriptiveness and proper name retrieval - PubMed
Cohen (1990) hypothesised that the retrieval of proper names is particularly difficult because proper names convey little information about their bearers' ...
Read more >
Hyphens (dashes) in Domain Name: Good or Bad? - Wiserbrand
Disadvantages of hyphenated domain names; Sub-pages and categorization; Conclusion. When you create an entirely new website, one of the first ...
Read more >
Memory (Encoding, Storage, Retrieval) - Noba Project
Psychologists often study recall by having participants study a list of pictures or words. Encoding in these situations is fairly straightforward. However, “ ......
Read more >
Using Dashes Correctly - University of Houston-Victoria
Create an em dash by typing two hyphens without spaces between the ... in the sentence to the list itself, making the list...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found