event-registry-python
event-registry-python copied to clipboard
Provided uri is not valid concept uri.
Hey, I am trying to get news with the Python API for a given company, using its concept uri. For many companies I have tried, the concept search worked, but for few companies I encountered the following error:
Provided uri is not valid concept uri.
For instance, for this company, I am running the following commands:
concept_uri = er.getConceptUri(conceptLabel='Amer International Group')
# the result is 'http://en.wikipedia.org/wiki/Amer_International_Group'
er.getConceptInfo(concept_uri)
This throws an error:
Out[13]: {'http://en.wikipedia.org/wiki/Amer_International_Group': {'error': "Provided uri ('http://en.wikipedia.org/wiki/Amer_International_Group') is not valid concept uri."}}
If I understand correctly, there are several legal entity types on Wikipedia for different types of organizations, so in order to cover these cases, should I use something like this?
concept_uri = er.getConceptUri(conceptLabel='Amer International Group', sources=['org', 'private', 'public', 'limited partnership'])
In the code documentation of the getConceptUri function I can only see this possible input for concept sources:
loc, org, wiki, person
Could you please let me know if these are the current types of sources or whether I can/should use other types of pages from Wikipedia? Thanks
Hi,
it's returning you the error because the getConceptInfo call is processed with a database that only has information about the concepts it has seen in the last month. The company that you are providing has no mentions in the articles from the last month and therefore the concept information can not be provided.
There are only 4 entity types in ER: org, person, loc and wiki (=non-entity). You can only use these when searching for concepts.
If you need info about the companies, then maybe a better approach might be to use the Wikipedia and wikidata APIs.
Best, Gregor
On Mon, Nov 30, 2020 at 11:57 AM Konstantina Lazaridou < [email protected]> wrote:
Hey, I am trying to get news with the Python API for a given company, using its concept uri. For many companies I have tried, the concept search worked, but for few companies I encountered the following error:
Provided uri is not valid concept uri.
For instance, for this https://en.wikipedia.org/wiki/Amer_International_Group company, I am running the following commands: concept_uri = er.getConceptUri(conceptLabel='Amer International Group')
the result is 'http://en.wikipedia.org/wiki/Amer_International_Group'
er.getConceptInfo(concept_uri) This throws an error:
Out[13]: {'http://en.wikipedia.org/wiki/Amer_International_Group': {'error': "Provided uri ('http://en.wikipedia.org/wiki/Amer_International_Group') is not valid concept uri."}}
If I understand correctly, there are several legal entity types on Wikipedia for different types of organizations, so in order to cover these cases, should I use something like this?
concept_uri = er.getConceptUri(conceptLabel='Amer International Group', sources=['org', 'private', 'public', 'limited partnership'])
In the code documentation of the getConceptUri function I can only see this possible input for concept sources: loc, org, wiki, person
Could you please let me know if these are the current types of sources or whether I can/should use other types of pages from Wikipedia? Thanks
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/EventRegistry/event-registry-python/issues/57, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGFVOVKZQHFK6OFJQGVQW3SSN3AZANCNFSM4UHM2NQA .
--
Gregor Leban
CEO & Co-founder of Event Registry http://eventregistry.org/
Phone: 00386-31-321-804 | Twitter https://twitter.com/Event_Registry | Facebook https://www.facebook.com/eventregistrysystem/ | blog https://medium.com/event-registry