RainbowNLP (RNLP) is a framework for various natural language processing tasks including: supervised name entity recognition and relationship extraction.
RainbowNLP (RNLP) is based on Hibernate and can be easily configured to use different data source (e.g. mysql). Hibernate settings are in hibernate.cfg.xml, make sure to set connection.url, connection.username and connection.password correctly. Other application settings are in configuration.conf, make sure the paths are updated and exist.
The following instructions show how to use RNLP for different applications.
For relationship extraction, the system needs to load the text document and entities annotations first.
-
Load test/train documents into the framework by using "SimpleDocumentLoader" or create a new document loader by implementing "IDocumentAnalyzer" interface (for test/train sets).
-
Load annotations by creating instances of "Phrase" and "PhraseLink" and make sure to persist them with HibernateUtil (for test/train sets).
-
Create machine learning examples by creating Phrase/PhraseLink and MLExample objects (for test/train sets)
-
Calculate features for each machine learning example (MLExample objects)
-
Train a machine learning model with train examples.
-
evaluate model using test examples.
This is an example of temporal relationship extraction implementation used for I2B2 shared task submission (https://www.i2b2.org/NLP/TemporalRelations/) : https://github.com/ehsane/temporal-relation.git
Please cite the following publcation if you sue RNLP in your experiments:
Emadzadeh, E.; Jonnalagadda, S.; Gonzalez, G., "Evaluating Distributional Semantic and Feature Selection for Extracting Relationships from Biological Text," Machine Learning and Applications and Workshops (ICMLA), 2011 10th International Conference on , vol.2, no., pp.66,71, 18-21 Dec. 2011
Feel free to contact us with your question/comments: Ehsan Emadzadeh (eemadzadeh (at) gmail.com) Azadeh Nikfarjam (azadeh.nikfarjam (at) gmail.com)