Giter Site home page Giter Site logo

meulidfa-fanid's Introduction

MeuLidFa-FanId

苗栗話翻譯

苗栗話翻譯試做1021

遽遽做

安裝

相關連結

下載專案

git clone [email protected]:i3thuan5/MeuLidFa-FanId.git

若係無權,愛用ssh key代替密碼

  1. 產生ssh key
  2. rsa_id.pub傳去github

訓練

time dobi qionpu

定服務

docker-compose up --build

試翻譯

curl -i -X POST -H "Content-Type: application/json"  \
    -d '[
        {"src": "我 打 籃 球 時 手 扭 傷 , 醫 生 說 要 打 石 膏 。 ", "id": 1},
        {"src": "黃 槿 樹 的 葉 子 , 一 片 差 不 多 手 掌 一 般 大 。 ", "id": 1}
    ]' \
    "http://localhost:5000/translate"

結果

HTTP/1.1 200 OK
Content-Length: 620
Content-Type: application/json
Date: Fri, 10 Sep 2021 08:30:26 GMT
Server: waitress

[[{"n_best":1,"pred_score":-5.343369007110596,"src":"\u6211 \u6253 \u7c43 \u7403 \u6642 \u624b \u626d \u50b7 \uff0c \u91ab \u751f \u8aaa \u8981 \u6253 \u77f3 \u818f \u3002 ","tgt":"\ud840\ude8e \u6309 \u7c43 \u7403 \u6642 \u624b \uff0c \u5148 \u751f \u8b1b \u611b \u6253 \u77f3 \u81a0 \u3002 "},{"n_best":1,"pred_score":-10.280594825744629,"src":"\u9ec3 \u69ff \u6a39 \u7684 \u8449 \u5b50 \uff0c \u4e00 \u7247 \u5dee \u4e0d \u591a \u624b \u638c \u4e00 \u822c \u5927 \u3002 ","tgt":"\u9ec3 \u790e \u6a39 \u4ed4 \uff0c \u4e00 \u3f13 \u4ed4 \uff0c \u4e00 \u3f13 \u4ed4 \u8f03 \u6bcb \u591a \u624b \u5df4 \u4ed4 \u3002 "}]]

係UTF-16,到Unicode Converter做得看著

[[{"n_best":1,"pred_score":-5.343369007110596,"src":"我 打 籃 球 時 手 扭 傷 , 醫 生 說 要 打 石 膏 。 ","tgt":"𠊎 按 籃 球 時 手 , 先 生 講 愛 打 石 膠 。 "},{"n_best":1,"pred_score":-10.280594825744629,"src":"黃 槿 樹 的 葉 子 , 一 片 差 不 多 手 掌 一 般 大 。 ","tgt":"黃 礎 樹 仔 , 一 㼓 仔 , 一 㼓 仔 較 毋 多 手 巴 仔 。 "}]]

訓練

dobi.yaml:

alias=qionpu: # 全部
  tasks: [hazoi-ngiliau, don-ngiliau, zunpi-ngiliau, hiunlien, ]

  1. job=hazoi-ngiliau: # 下載語料
  2. job=don-ngiliau: # 斷詞斷字語料
  3. job=zunpi-ngiliau: # 準備語料
  4. job=hiunlien: # 訓練

1. job=hazoi-ngiliau: # 下載語料

time dobi hazoi-ngiliau

結果

1-ngienbun-ngiliau/
├── fa.txt
└── meu.txt

2. job=don-ngiliau: # 斷詞斷字語料

time dobi don-ngiliau

結果

2-doncii-ngiliau/
├── fa.train
├── fa.valid
├── meu.train
└── meu.valid

3. job=zunpi-ngiliau: # 準備語料

time dobi zunpi-ngiliau

結果

3-opennmt-data/
├── meufa.vocab.src.fa
└── meufa.vocab.tgt.meu

4. job=hiunlien: # 訓練

time dobi hiunlien

結果

4-opennmt-model/
├── fameu_step_1000.pt
├── fameu_step_10000.pt
├── fameu_step_10500.pt
├── fameu_step_11000.pt
...

meulidfa-fanid's People

Contributors

sih4sing5hong5 avatar swy641205 avatar u0758006 avatar nokosii avatar tsaiminglong 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.