Code Monkey home page Code Monkey logo

vietnamese_word_seperate's Introduction

LSTM

Giới thiệu

LSTM là một loại mô hình thuộc kiến trúc RNN, mô hình này có thể học được những mối quan hệ lâu dài, được giới thiệu bởi Hochreiter & Schmidhuber và sau này thì sử dụng rỗng rãi trong những bài toán khác nhau về ngôn ngữ.

Mô tả bài toán

Để kiểm tra khả năng tách các từ dính liền với nhau của mạng LSTM, mình sử dụng bộ dữ liệu thu thập từ các trang báo mạng như Vnexpess, Vietnamnet, ... Sau đó, xóa tất cả các khoảng trắng, để nối các từ lại. Dữ liệu này dùng để mô hình học. Dữ liệu dùng để mình họa quá trình học cũng như các đặc trưng học được của LSTM.

Tiền xử lý

Dữ liệu thu thập được trên các báo mạng gần như chuẩn, do đó, mình chỉ remove các dấu câu. Toàn bộ câu chữ được giữ nguyên. Dữ liệu huấn luyện được thể hiện dưới bảng sau:

Input Output
riêngởxứlạnhkhôngbaogiờcóve riêng ở xứ lạnh không bao giờ có ve
trẻemtheongườilớnvuiđóntết trẻ em theo người lớn vui đón tết
bệnhnhânphảinằmđiềutrịcáchly bệnh nhân phải nằm điều trị cách ly

Mô hình

Mình sử dụng mô hình sequence2sequence truyền thống để giải quyết bài toán đã ra. Mô hình bao gồm một mạng LSTM encoder và LSTM decoder. Kết quả output của decoder được qua tầng Fully connected, sau đó qua softmax để tìm xác suất từ dự đoán. model

Dependences

  • Keras
  • Tensorflow
  • Anaconda 3.6

Train

Kết quả

References

Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural computation, 9(8), 1735-1780.

vietnamese_word_seperate's People

Contributors

pbcquoc avatar

Watchers

James Cloos avatar Trần Minh Tuấn 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.