Giter VIP home page Giter VIP logo

flattn's Introduction

English 中文

FlatTN

This repository contains code accompanying the paper "AN END-TO-END CHINESE TEXT NORMALIZATION MODEL BASED ON RULE-GUIDED FLAT-LATTICE TRANSFORMER" which is submitted to ICASSP 2022.

Requirement

Python: 3.7.3
PyTorch: 1.2.0
FastNLP: 0.5.0
Numpy: 1.16.4

you can go here to know more about FastNLP.

Dataset download

Chinese Text Normalization Dataset can be available at https://www.data-baker.com/en/#/data/index/TNtts.

To browse the Chinese version of the download page, please click https://www.data-baker.com/data/index/TNtts.

Data preprocessing

The raw dataset in jsonl format are saved at : dataset/cleaned_dataset_by_myself/CN_TN_epoch-01-28645_2.jsonl

The raw dataset are in jsonl format as follows: image

Preprocessed data are saved at : dataset/cleaned_dataset_by_myself/shuffled_BMES

The proposed data are in BMES format as follows:

image

We divided data into traindevtest by 8:1:1.

You can also run our code to prepocess and divide the raw dataset again

python /dataset/cleaned_dataset_by_myself/get_json.py

You can run the following code to see the number of all NSW categories

python /dataset/cleaned_dataset_by_myself/sep_data.py

Training

Our code are in version V1, run training code

python /V1/flat_main.py --dataset databaker

Our proposed rule base are saved in a python file: /V1/add_rule.py

Flat-Lattice-Transformer参考链接

https://github.com/LeeSureman/Flat-Lattice-Transformer

flattn's People

Contributors

daiwenlin avatar

Forkers

johnsontsing

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.