https://github.com/allenai/ml
Re-usable low-level ML components
https://github.com/allenai/ml
crf java lombok
Last synced: 9 months ago
JSON representation
Re-usable low-level ML components
- Host: GitHub
- URL: https://github.com/allenai/ml
- Owner: allenai
- License: apache-2.0
- Created: 2015-05-05T17:05:28.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-10-31T21:34:54.000Z (over 7 years ago)
- Last Synced: 2024-04-14T07:49:58.946Z (about 2 years ago)
- Topics: crf, java, lombok
- Language: Java
- Size: 2 MB
- Stars: 10
- Watchers: 66
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ML Components
Repository for low-level production-grade ML inference. The current motivating example is the CRF inference component which is used in the AI2 fork of Grobid and Science Parse. It's currently 100% Java, but can also have Scala too.
## Getting Started
This project is currently Java 8 built with `gradle`. To install `gradle` simply install via `brew install gradle` via [Homebrew](http://brew.sh). Then if you can do:
```bash
> gradle test # Run unit tests
> gradle idea # Generate IntelliJ project
```
## Project Conventions
### Documentation
You can use Markdown in your Javadoc using [Pegdown](https://github.com/sirthias/pegdown).
### Test Coverage
You can run `gradle jacoco` and this will produce a testing report.
```bash
> gradle jacoco
> open build/reports/jacoco/test/html/index.html
```
### Benchmark Tests
```bash
> gradle jmh
> open build/reports/jmh/results.txt
```
### Lombok
This project uses [Lombok](https://projectlombok.org) which requires you to enable annotation processing inside of an IDE.
[Here](https://plugins.jetbrains.com/plugin/6317) is the IntelliJ plugin and you'll need to enable annotation processing (instructions [here](https://www.jetbrains.com/idea/help/configuring-annotation-processing.html)).
Lombok has a lot of useful annotations that give you some of the nice things in Scala:
* `val` is equivalent to `final` and the right-hand-side class. It gives you type-inference via some tricks
* Checkout [`@Data`](https://projectlombok.org/features/Data.html)
### Efficient Primitive Collections
Using [GSCollections](https://github.com/goldmansachs/gs-collections) which has been found as efficient as the best libraries across a wide-range of tasks (in particular way faster than [trove](http://trove.starlight-systems.com)).