Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jianlins/fastcontext
FastContext is an optimized Java implementation of ConText algorithm (https://www.ncbi.nlm.nih.gov/pubmed/23920642).
https://github.com/jianlins/fastcontext
context-detection java nlp
Last synced: 9 days ago
JSON representation
FastContext is an optimized Java implementation of ConText algorithm (https://www.ncbi.nlm.nih.gov/pubmed/23920642).
- Host: GitHub
- URL: https://github.com/jianlins/fastcontext
- Owner: jianlins
- License: apache-2.0
- Created: 2017-04-23T20:50:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-10-19T20:48:11.000Z (about 3 years ago)
- Last Synced: 2023-12-15T13:42:45.333Z (11 months ago)
- Topics: context-detection, java, nlp
- Language: Java
- Size: 251 KB
- Stars: 11
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FastContext
FastContext is an optimized Java implementation of ConText algorithm (https://www.ncbi.nlm.nih.gov/pubmed/23920642). It runs two orders of magnitude faster and more accurate than previous two popluar implementations: [JavaConText](https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/negex/JavaConText.zip) and [GeneralConText](https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/negex/GeneralConText.Java.v.1.0_10272010.zip).
## Maven dependency set up
```xmledu.utah.bmi.nlp
fastcontext
1.3.1.9```
Note: the maven distribution doesn't include the context rule file, you can download it [here](https://github.com/jianlins/FastContext/blob/master/conf/context.csv) if needed.
## Quick start
```java
// Initiate FastContext
FastContext fc = new FastContext("conf/context.csv");
String inputString = "The patient denied any fever , although he complained some headache .";
ArrayList sent = SimpleParser.tokenizeOnWhitespaces(inputString);
LinkedHashMap matches = fc.getFullContextFeatures("Concept", sent, 4, 4, inputString);
// To find the context information of "fever"
```
For more detailed API uses, please refer to [TestFastContextAPIs.java](https://github.com/jianlins/FastContext/blob/master/src/test/java/edu/utah/bmi/nlp/fastcontext/TestFastContextAPIs.java)## Acknowledgement
Special thanks to Olga Patterson and Guy Divita for contributing rules as part of the context rule set.## Citation
If you are using FastContext within your research work, please cite the following publication:
```
Shi, Jianlin, and John F. Hurdle. “Trie-Based Rule Processing for Clinical NLP: A Use-Case Study of n-Trie, Making the ConText Algorithm More Efficient and Scalable.” Journal of Biomedical Informatics, August 6, 2018. https://doi.org/10.1016/j.jbi.2018.08.002.
```Full text are available at:
https://www.sciencedirect.com/science/article/pii/S1532046418301576Preprint:
https://arxiv.org/abs/1905.00079