Skip to content

Commit

Permalink
Update demo with Thai model
Browse files Browse the repository at this point in the history
  • Loading branch information
tushuhei committed Dec 18, 2023
1 parent d080306 commit ccd21c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion demo/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,19 @@
* limitations under the License.
*/

import { loadDefaultJapaneseParser, loadDefaultSimplifiedChineseParser, loadDefaultTraditionalChineseParser } from 'budoux';
import { loadDefaultJapaneseParser, loadDefaultSimplifiedChineseParser, loadDefaultTraditionalChineseParser, loadDefaultThaiParser } from 'budoux';

const parsers = new Map([
['ja', loadDefaultJapaneseParser()],
['zh-hans', loadDefaultSimplifiedChineseParser()],
['zh-hant', loadDefaultTraditionalChineseParser()],
['th', loadDefaultThaiParser()]
]);
const defaultInputs = new Map([
['ja', 'Google の使命は、世界中の情報を<strong>整理</strong>し、<em>世界中の人がアクセス</em>できて使えるようにすることです。'],
['zh-hans', '我们的使命是<strong>整合</strong>全球信息,<em>供大众使用</em>,让人人受益。'],
['zh-hant', '我們的使命是<strong>匯整</strong>全球資訊,<em>供大眾使用</em>,使人人受惠。'],
['th', 'พันธกิจของเราคือการจัดระเบียบข้อมูลในโลกนี้และทำให้เข้าถึงได้ง่ายในทุกที่และมีประโยชน์']
])
const inputTextElement = document.getElementById('input') as HTMLTextAreaElement;
const outputContainerElement = document.getElementById('output') as HTMLElement;
Expand Down
1 change: 1 addition & 0 deletions demo/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ <h1>BudouX 🍇</h1>
<option value="ja">Japanese</option>
<option value="zh-hans">Simplified Chinese</option>
<option value="zh-hant">Traditional Chinese</option>
<option value="th">Thai</option>
</select>
</p>
<textarea id="input"></textarea>
Expand Down

0 comments on commit ccd21c1

Please sign in to comment.