Model Overview This is an xlm roberta fine tuned to restore punctuation, true case (capitalize), and detect sentence boundaries (full stops) in 47 languages. Usage If you want to just play with the model, the widget on this page will suffice. To use the model offline, the following snippets show how to use the model both with a wrapper (that I wrote, available from PyPI ) and manual usuage (using the ONNX and SentencePiece models in this repo). Usage via punctuators package Click to see usage with wrappers The easiest way to use this model is to install punctuators: But this is just an ONNX and SentencePiece model, so you may run it as you wish. The input to the punctuators API is a list (batch) of strings. Each string will be punctuated, true cased, and segmented on predicted full stops. The output will therefore be a list of list of strings: one list of segmented sentences per input text. To disable full stops, use m.infer(texts, apply sbd=False) . The output will then be a list of strings: one punctuated, true cased string per input text. Example Usage Expected output Manual Usage If you want to use the ONNX and SP models without wrappers, see the following example. Click to see…
We use cookies for essential functionality and analytics. You can accept or reject analytics cookies.Cookie policy