Giter VIP home page Giter VIP logo

accent_vietnamese's Introduction

Giới thiệu

Mã nguồn này được phát triển dựa trên bài viết tại đây. So với bài viết trên, tác giả đã thay đổi:

  • Sử dụng dữ liệu từ wiki + báo cáo y tế.
  • Thêm metric + code test.
  • Thêm code tiền/hậu xử lý cho chuỗi đầu vào.
  • Khảo sất độ chính xác model và tốc độ với các tham số khác nhau.

Tiền xử lý

Ở đây chúng ta không dùng tokenizer tạo từ các tập data trên mà dùng word list từ vietnamese-wordlist để tạo bộ tokenizer bằng cách split các từ trong word list và chọn lại các từ đơn. Các từ không nằm trong word list sẽ được gán thành 'unknown'. Điều này làm giảm đi rất nhiều kích thước model và làm tăng độ chính xác.

Model

Triển khai model 2grams và 3grams.

Train model

python train.py train.tone 2gram_model.pkl --ngram 2
python train.py train.tone 3gram_model.pkl --ngram 3

Test model

python test_2gram.py val.notone val.tone 2gram_model.pkl
python test_3gram.py val.notone val.tone 3gram_model.pkl

Kết quả

ngram nbeam val_score runtime(500 sen) test_score model_size
2gram 1 0.8231 8.5 41Mb
2 0.8905 14.65
3 0.9138 15
4 0.9216 16.5
5 0.9258 18.3 0.9221
6 0.9273 18.5
7 0.9282 18.9
3gram 1 0.8840 9 441Mb
2 0.9128 15.5
3 0.9309 14.35
4 0.9369 19.5
5 0.9411 25.5 0.9401
6 0.9438 26.5
7 0.9453 31.9

result

accent_vietnamese's People

Contributors

phidch avatar

Watchers

 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.