Python access to AlchemyAPI for unstructured text analysis and natural language processing.
This is a Python implementation of the AlchemyAPI SDK.
To install this module, copy the alchemyapi.py file into your desired Python import directory. Three AlchemyAPI Python modules are supplied: 1. Version for Python 2.4.x (requires lxml) 2. Version for Python 2.5.x+ (supports all later 2.x versions, including 2.7.x) 3. Version for Python 3.x.x
Several code examples are included to illustrate using the AlchemyAPI for named entity extraction, text classification, language identification, and other tasks.
All code samples are within the “example” directory.
To run these code samples you must first edit the (example/api_key.txt) file, adding your assigned Orchestr8 API key.
- Entity Extraction: python entities.py
- Concept Tagging: python concepts.py
- Keyword Extraction: python keywords.py
- Text Categorization: python categories.py
- Language Identification: python language.py
- HTML Text Extraction: python text_extract.py
- HTML Structured Content Scraping: python constraint_queries.py
- Microformats Extraction: python microformats.py
- RSS / ATOM Feed Links Extraction: python feed_links.py
- Sentiment analysis example: python sentiment.py
- Relations extraction example: python relations.py
- Parameters Object example: python params_object.py
- Author extraction example: python author.py
- Targeted sentiment example: python targeted_sentiment.py
Python 2.4.x requires lxml:
lxml (available at: http://pypi.python.org/pypi/lxml )
COPYRIGHT AND LICENCE
Copyright (C) 2009-2013 Orchestr8, LLC.
This library is free software; you can redistribute it and/or modify it under the same terms as Python itself, either Python version 2.5 or, at your option, any later version of Python 2.5 you may have available.