泰语文本生成器库

ttg的Python项目详细描述


泰语文本生成器

[Open In Colab](https://colab.research.google.com/drive/1X6D8J0sWNi8UgJi7Hk5YL4FqepZ7laxS?usp=sharing]

泰语文本生成器

安装

pip install ttg

如果要使用thai2fit,可以安装:

^{pr2}$

示例

fromthaitextgeneratorimport*a=Unigram()print(a.gen_sentence(N=10))b=Bigram()print(b.gen_sentence(start_seq="คน",N=10))c=Tigram()c.gen_sentence(N=10,start_seq=("คน","ดี"))# Thai2Fitfromthaitextgenerator.thai2fitimportgen_sentencegen_sentence()

文件

N-克

import

fromthaitextgeneratorimport*

统一语法

我们支持语料库

  • TNC:泰国国家语料库(默认)
  • 泰语教科书语料库
  • 奥斯卡:开放超大型爬行年鉴语料库
Unigram(name="tnc or tcc or oscar")Unigram().gen_sentence(N:int=3,prob:float=0.001,start_seq:str=None,output_str:bool=True,duplicate:bool=False)

双目图

我们支持语料库

  • TNC:泰国国家语料库(默认)
Bigram(name="tnc")Bigram().gen_sentence(N:int=4,prob:float=0.001,start_seq:str=None,output_str:bool=True,duplicate:bool=False)

钨极氩弧焊

我们支持语料库

  • TNC:泰国国家语料库(默认)
Tigram(name="tnc")Bigram().gen_sentence(N:int=4,prob:float=0.001,start_seq:tuple=None,output_str:bool=True,duplicate:bool=False)

Thai2Fit

# Thai2Fitfromthaitextgenerator.thai2fitimportgen_sentenceen_sentence(N:int=4,prob:float=0.001,start_seq:str=None,output_str:bool=True)

许可证

   Copyright 2020 Wannaphong Phatthiyaphaibun

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java为什么程序显示空结果?   java应用程序在测试设备上调试时工作正常,但在发布版apk中没有,它没有获得post。来自firebase的类变量   java Android:从主活动按钮确定在listview中选中哪个复选框   在Spring中添加@OneToOne注释时启动ApplicationContext时发生java错误   用JAVA Android实现矩阵计算的最快方法   SpringJava语义有没有更好的编写方法?   java从hashmap中减去两个值后返回最小差值的键?   Java中的静态初始化顺序:Netty 4.0.7的例外   java如何检查用户输入是否为字符串   循环Java计数单词索引   java如何使用以下代码将视频流传输到Android异步Http服务器?   java如何在jtable的所有行中循环   java如何使用maven将unicode插入mysql   java使用安卓加速远程数据检索   java试图模拟麦克风(javax.sound.sampled)   swing SwingWorker从不归还任何东西?(爪哇)   首次在Android Studio上未加载java LibGDX文件   java如何在多个Mysql服务器上设置限制和偏移?   如何防止从java连接到mongodb时登录控制台?