Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cadia-lvl/punctuation-prediction
Support tools for punctuation and boundary detection for ASR output.
https://github.com/cadia-lvl/punctuation-prediction
Last synced: 3 months ago
JSON representation
Support tools for punctuation and boundary detection for ASR output.
- Host: GitHub
- URL: https://github.com/cadia-lvl/punctuation-prediction
- Owner: cadia-lvl
- License: mit
- Created: 2020-01-13T15:09:12.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T04:07:50.000Z (almost 2 years ago)
- Last Synced: 2024-06-29T18:47:43.827Z (4 months ago)
- Language: Python
- Size: 234 KB
- Stars: 56
- Watchers: 9
- Forks: 20
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# punctuation-prediction
Support tools for punctuation prediction for ASR output.
Three models are given or pointed to; a BERT-based Transformer, a seq2seq Transformer (both use PyTorch) and a bidirectional RNN (Punctuator 2, www.github.com/ottokart/punctuator2)
in Tensorflow 2.
Additionally, the code to preprocess text for the use of these models is given in the folder `process`.The BERT based transformer is a token classifying transformer from https://github.com/huggingface/transformers, used here for punctuation prediction.
The sequnece to sequence transformer comes from https://github.com/pytorch/fairseq and is based on the transformer described in the paper Attention is all you need.
All we provide here for the transformers are 1) data preprocessing scripts, to get the data on the right format for these models for the task of punctuation prediction, and 2) run files, where these models are trained for punctuation prediction.## Requirements and Installation
- Python version >= 3.6
- An NVIDIA GPU and NCCL
- For HuggingFace's BERT based token classifier and the Fairseq sequence to sequence model: PyTorch version >= 1.4.0
- For Punctuator 2: TensorFlow 2.0
- For HuggingFace's transformer: seqeval and fastprogress as done below:
~~~~
pip install seqeval
pip install git+https://github.com/fastai/fastprogress.git
~~~~
Install Fairseq:
~~~~
pip install fairseq
~~~~
Installation with the HuggingFace submodule:
~~~~
git clone --recurse-submodules https://github.com/cadia-lvl/punctuation-prediction
cd transformers
pip install .
~~~~## Models
The models for punctuation prediction are downloaded automatically with the pip package (you can get more information about the package in the folder `punctuation_package`). Note that they are trained on **Icelandic** data. They are also directly accessible on the [Clarin webpage](https://repository.clarin.is/repository/xmlui/handle/20.500.12537/52).
## Licence
MIT LicenseCopyright (c) 2020 Language and Voice Lab
## Citation