Git Product home page Git Product logo

boydcut's Introduction

BoydCut: Thai Sentence Segmenter

Bidirectional LSTM-CNN Model for Thai Sentence Segmenter

Development Status

This project is the part of my Thesis in Master's degree at Big Data Engineering, CITE, Dhurakij Pundij University https://cite.dpu.ac.th/bigdata/

My Advisor

  • Asst. Prof. Dr. Duangjai Jitkongchuen
  • Asst. Prof. Dr. Peerasak Intarapaiboon

Requirements

  • Tensorflow 2.0+
  • Python 3.6.x
  • pip install -r requirements

if pip install -r requirements not work please follow Installation steps

Installation steps

  • pip install numpy pandas tensorflow
  • pip install deepcut
  • pip install pythainlp

How to use and Examples

!pip install BoydCut==1.0.0
from BoydCut.utility import *
import tensorflow as tf
import pythainlp
import os

import numpy as np
import pandas as pd

boydcut = BoydCut()
sent_ls = boydcut.sentenize("ประเทศฝรั่งเศสแผ่นดินใหญ่ทอดตัวตั้งแต่ทะเลเมดิเตอร์\
                                        เรเนียนจนถึงช่องแคบอังกฤษและทะเลเหนือ")
for sent in sent_ls:
    print(sent)

> <B-CLS>ประเทศฝรั่งเศส|แผ่นดิน|ใหญ่|ทอด|ตัว|ตั้งแต่|ทะเลเมดิเตอร์เรเนียน|จนถึง|ช่อง|แคบ<E-CLS>
> <B-CLS>อังกฤษ|และ|ทะเล|เหนือ<E-CLS>


boydcut = BoydCut()
sent_ls = boydcut.sentenize(['ประเทศฝรั่งเศส','แผ่นดิน','ใหญ่','ทอดตัว','ตั้งแต่',
                            'ทะเลเมดิเตอร์เรเนียน','จนถึง','ช่อง','แคบ',
                            'อังกฤษ','และ','ทะเล','เหนือ'], _tokenize=False)
for sent in sent_ls:
    print(sent)

> <B-CLS>ประเทศฝรั่งเศส|แผ่นดิน|ใหญ่|ทอด|ตัว|ตั้งแต่|ทะเลเมดิเตอร์เรเนียน|จนถึง|ช่อง|แคบ<E-CLS>
> <B-CLS>อังกฤษ|และ|ทะเล|เหนือ<E-CLS>

Limitation

  • Document feeding is not available yet !
  • Max Word for feeding: 200 words / paragraph
  • Please use "\n" for decrease size of paragraph
  • Results: [sentence1, sentence2, sentence3,..., sentenceN]

Dependency

  • POS apply pythainlp.tag.pos_tag(_sentence_ls, corpus="orchid")
  • Tokenization apply pythainlp.tokenize.word_tokenize(_text_ls, engine="deepcut")

Contributor

Sorratat Sirirattanajakarin (Boyd)

License and reference

Please make sure to cite the paper if you use BoydCut for your research ^^:

BoydCut: Bidirectional LSTM-CNN Model for Thai Sentence Segmenter S. Sirirattanajakarin, D. Jitkongchuen, P. Intarapaiboon 2020 1st International Conference on Big Data Analytics and Practices (IBDAP)

boydcut's People

Contributors

bact avatar bigdatarpg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

boydcut's Issues

No matching distribution found for mkl-fft==1.1.0

ตอนสั่ง pip install -r requirements.txt จะได้ error แบบนี้

Collecting mkl-fft==1.1.0 (from -r requirements.txt (line 23))
  Could not find a version that satisfies the requirement mkl-fft==1.1.0 (from -r requirements.txt (line 23)) (from versions: )
No matching distribution found for mkl-fft==1.1.0 (from -r requirements.txt (line 23))

ดูจาก history ของแพคเกจ mkl-fft ไม่มีเวอร์ชั่น 1.1.0 เดาว่า author เค้าทำแล้วยังไม่ได้ release เข้า PyPI?

ไม่แน่ใจว่าถ้าเปลี่ยนไปใช้ดึงจาก Git repository โปรแกรมจะทำงานได้เหมือนเดิมเปล่า ยังไม่ได้ลองครับผม >_<

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.