bminixhofer / nlprule

A fast, low-resource Natural Language Processing and Text Correction library written in Rust.
Apache License 2.0
594 stars 39 forks source link

Support Rules written in Rust #75

Open shybyte opened 3 years ago

shybyte commented 3 years ago

Many useful LanguageTool rules are written in Java and not in the XML rule format (e.g. the A-Vs-AN rule which is kind of essential for me, because I always forget to write this correctly). It would be great if nlprule would allow to rewrite these rules in Rust.

bminixhofer commented 3 years ago

Hi, thanks for the issue!

This is a good point. I am not willing to port and maintain Java Rules myself at the moment, but it would be good to have this possibility.

This will actually be solved to some degree by modularization (#72), which will split nlprule into individual components (each implementing one of the traits Tokenize (text -> tokens), Transform (tokens -> tokens (e.g. chunker)) or Suggest (tokens -> suggestions)).

I'll make sure that the traits are public so that another crate could implement e.g. an nlprule Suggester with ported Java Rules from LT.

I unfortunately can't give an ETA on modularization since I'm quite busy right now, but it will be soon-ish.