Provides access to all webLyzard Web services through a Python and Java library.
Full Documentation is available at
- Python: http://weblyzard-api.readthedocs.org/en/latest/
- Javadoc: http://javadoc.io/doc/com.weblyzard.api/weblyzard-api/0.2.1.4
The API needs to know the URL, user and password used for the Web service. These data may be
- passed by a client at class initialization, or
- automatically set by the means of the following environment variables:
WEBLYZARD_API_URL
WEBLYZARD_API_USER
WEBLYZARD_API_PASS
OGER_API_URL
this is also the preferred way for running unit tests.
The preferred way for setting these variables is using .bash_profile
.
export WEBLYZARD_API_URL="https://noah.semanticlab.net/ws"
export WEBLYZARD_API_USER="user"
export WEBLYZARD_API_PASS="pass"
export OGER_API_URL="oger_api_url"
Do not set WEBLYZARD_API_USER
and WEBLYZARD_API_PASS
if your Web service does not require authentication.
If you have already set the variables using .bash_profile
, when you run a script from the command line is also recommended to use:
source ~/.bash_profile
To run the unit tests in eclipse, the environment variables have to be set in the runtime configuration:
The following interfaces are currently available for weblyzard_api
:
- domain specificity: document relevance in regard of a particular domain)
- FlowClient: the webLyzard document API
- GenericAnnotationClient: all Web services implementing the
AnnotationService
interfaces - Jeremia: text pre-processing (pos tagger, dependency parser, sentence splitter, languag detection)
- Jairo: Semantic enrichment
- Jesaja: keyword extraction
- Joel: keyword and document clustering
- John Doe: anonymization service
- Joseph: text classification
- OpenRDF: access OpenRDF linked open data repositories
- Recognize: named entity recognition
- Sentiment Analysis:
The following two dependencies might need to be installed manually: libxml and libxslt.
weblyzard_api/tests/python/client$ python test_jeremia.py "Ehre sei Gott!"
Example scripts are available in the example
directory.
examples/keywords/compute-keywords.py
- example keywords and pre-processing script.
- Required documentation for public methods
- docstring explaining what the method does
- a unit test demonstrating the method's usage in the wild.
- commits must pass all unit tests
- verify code quality for merge requests (
mvn sonar:sonar
)
To activate the java client debugging (logging requests / responses etc) set the environment variable ENV_WEBLYZARD_API_DEBUG to true:
export WEBLYZARD_API_DEBUG="true"
Deploy to the private semanticlab maven repository:
mvn deploy -Denvironment=semanticlab
The environment semanticlab is set as the default maven environment, so running
mvn deploy
deploys to the private semanticlab repository.
Deploying to the public mavencentral:
mvn deploy -Denvironment=mavencentral
Please refer to the releases page.