A .Net port of https://github.com/MashaPo/russtress
Description from oiriginal repo:
The tool based on LSTM predicts stress position in each word in russian text depending on the word context. For more details about the tool see «Automated Word Stress Detection in Russian», EMNLP-2017, Copenhagen, Denmark.
Neural network model is converted from original Keras/TF model with keras2onnx, see conversion script. Inference run by ONNX Runtime.
Simplified and streamlined pre- and post-processing code.
using RusstressNet;
using (AccentModel model = new AccentModel())
{
string accentedText = model.SetAccentForText(text));
}
Also see console model executor.
After creation, instances of AccentModel
are thread-safe (because ONNX InferrenseSession is thread-safe), so you generally need a single instance of it.