Giter Site home page Giter Site logo

ishine / punctuation-prediction Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cadia-lvl/punctuation-prediction

0.0 1.0 0.0 227 KB

Support tools for punctuation and boundary detection for ASR output.

License: MIT License

Python 72.73% Shell 22.90% Jupyter Notebook 4.37%

punctuation-prediction's Introduction

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.

Licence

MIT License

Copyright (c) 2020 Language and Voice Lab

Citation

punctuation-prediction's People

Contributors

helga-lvl avatar ingarun avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.