中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁(yè) > news >正文

如何建設(shè)簡(jiǎn)易網(wǎng)站他達(dá)拉非片

如何建設(shè)簡(jiǎn)易網(wǎng)站,他達(dá)拉非片,2008系統(tǒng)怎么搭建多個(gè)網(wǎng)站,wordpress中文標(biāo)簽云插件下載本文使用《使用ResponseSelector實(shí)現(xiàn)校園招聘FAQ機(jī)器人》中的例子,主要詳解介紹train_nlu()函數(shù)中變量的具體值。 一.rasa/model_training.py/train_nlu()函數(shù) ??train_nlu()函數(shù)實(shí)現(xiàn),如下所示: def train_nlu(config: Text,nlu_data: Op…

??本文使用《使用ResponseSelector實(shí)現(xiàn)校園招聘FAQ機(jī)器人》中的例子,主要詳解介紹train_nlu()函數(shù)中變量的具體值。

一.rasa/model_training.py/train_nlu()函數(shù)
??train_nlu()函數(shù)實(shí)現(xiàn),如下所示:

def train_nlu(config: Text,nlu_data: Optional[Text],output: Text,fixed_model_name: Optional[Text] = None,persist_nlu_training_data: bool = False,additional_arguments: Optional[Dict] = None,domain: Optional[Union[Domain, Text]] = None,model_to_finetune: Optional[Text] = None,finetuning_epoch_fraction: float = 1.0,
) -> Optional[Text]:"""Trains an NLU model.  # 訓(xùn)練一個(gè)NLU模型。Args:config: Path to the config file for NLU.  # NLU的配置文件路徑。nlu_data: Path to the NLU training data.  # NLU訓(xùn)練數(shù)據(jù)的路徑。output: Output path.  # 輸出路徑。fixed_model_name: Name of the model to be stored.  # 要存儲(chǔ)的模型的名稱。persist_nlu_training_data: `True` if the NLU training data should be persisted with the model.  # 如果NLU訓(xùn)練數(shù)據(jù)應(yīng)該與模型一起持久化,則為`True`。additional_arguments: Additional training parameters which will be passed to the `train` method of each component.  # 將傳遞給每個(gè)組件的`train`方法的其他訓(xùn)練參數(shù)。domain: Path to the optional domain file/Domain object.  # 可選domain文件/domain對(duì)象的路徑。model_to_finetune: Optional path to a model which should be finetuned or a directory in case the latest trained model should be used.  # 可選路徑,指向應(yīng)該進(jìn)行微調(diào)的模型,或者在應(yīng)該使用最新訓(xùn)練的模型的情況下指向一個(gè)目錄。finetuning_epoch_fraction: The fraction currently specified training epochs in the model configuration which should be used for finetuning.  # 模型配置中當(dāng)前指定的訓(xùn)練時(shí)期的fraction,應(yīng)該用于微調(diào)。Returns:Path to the model archive.  # 模型歸檔的路徑。"""if not nlu_data:  # 沒有NLU數(shù)據(jù)rasa.shared.utils.cli.print_error(  # 打印錯(cuò)誤"No NLU data given. Please provide NLU data in order to train "  # 沒有給出NLU數(shù)據(jù)。請(qǐng)?zhí)峁㎞LU數(shù)據(jù)以訓(xùn)練"a Rasa NLU model using the '--nlu' argument."  # 使用--nlu參數(shù)訓(xùn)練Rasa NLU模型)return None# 只訓(xùn)練NLU,因此仍然必須選擇訓(xùn)練文件file_importer = TrainingDataImporter.load_nlu_importer_from_config(config, domain, training_data_paths=[nlu_data], args=additional_arguments)training_data = file_importer.get_nlu_data()  # 獲取NLU數(shù)據(jù)if training_data.contains_no_pure_nlu_data():  # 如果沒有純NLU數(shù)據(jù)rasa.shared.utils.cli.print_error(  # 打印錯(cuò)誤f"Path '{nlu_data}' doesn't contain valid NLU data in it. "  # 路徑{nlu_data}中不包含有效的NLU數(shù)據(jù)f"Please verify the data format. "  # 請(qǐng)驗(yàn)證數(shù)據(jù)格式f"The NLU model training will be skipped now."  # 現(xiàn)在將跳過NLU模型訓(xùn)練)return Nonereturn _train_graph(  # 訓(xùn)練圖file_importer,  # 文件導(dǎo)入器training_type=TrainingType.NLU,  # 訓(xùn)練類型output_path=output,  # 輸出路徑model_to_finetune=model_to_finetune,  # 模型微調(diào)fixed_model_name=fixed_model_name,  # 固定模型名稱finetuning_epoch_fraction=finetuning_epoch_fraction,  # 微調(diào)時(shí)期fractionpersist_nlu_training_data=persist_nlu_training_data,  # 持久化NLU訓(xùn)練數(shù)據(jù)**(additional_arguments or {}),  # 額外的參數(shù)).model  # 模型

1.傳遞來的形參數(shù)據(jù)
??形參config=“config.yml”,nlu_data=“data”,output=“models”,persist_nlu_training_data=False,其它的都是None,如下所示:

2.train_nlu()函數(shù)組成
??該函數(shù)主要由3個(gè)方法組成,如下所示:

  • file_importer = TrainingDataImporter.load_nlu_importer_from_config(*) #file_importer數(shù)據(jù)類型為NluDataImporter
  • training_data = file_importer.get_nlu_data() #根據(jù)nlu數(shù)據(jù)創(chuàng)建一個(gè)TrainingData類對(duì)象
  • return _train_graph(*) #訓(xùn)練config.yml文件中pipline對(duì)應(yīng)的圖

二.training_data數(shù)據(jù)類型
??training_data數(shù)據(jù)類型為rasa.shared.nlu.training_data.training_data.TrainingData,如下所示:

1.MIN_EXAMPLES_PER_ENTITY=2
每個(gè)實(shí)體的最小樣本數(shù)量。

2.MIN_EXAMPLES_PER_INTENT=2
每個(gè)意圖的最小樣本數(shù)量。

3.action_names=set()
action名字集合。

4.entities=set()
entity集合。

5.entity_examples=[]
entity例子集合。

6.entity_groups=set()
entity組的集合。

7.entity_roles=set()
entity角色集合。

8.entity_synonyms=set()
entity近義詞集合。

9.intent_examples=[25*Message]
??intent例子列表,列表中數(shù)據(jù)為rasa.shared.nlu.training_data.message.Message數(shù)據(jù)結(jié)構(gòu)。對(duì)于普通意圖,Message數(shù)據(jù)結(jié)構(gòu)如下所示:

??對(duì)于檢索意圖,Message數(shù)據(jù)結(jié)構(gòu)如下所示:

10.intents
具體數(shù)值為set(‘faq’, ‘goodbye’, ‘greet’)。

11.lookup_tables=[]
查找表。

12.nlu_examples=[25*Message]
內(nèi)容和intent_examples相同,不再介紹。

13.number_of_examples_per_entity
每個(gè)entity例子的數(shù)量。

14.number_of_examples_per_intent
每個(gè)intent例子的數(shù)量,即{‘faq’: 14, ‘goodbye’: 5, ‘greet’: 6}。

15.number_of_examples_per_response
??每個(gè)response例子的數(shù)量,如下所示:

{'faq/notes': 1, 'faq/work_location': 1, 'faq/max_job_request': 1, 'faq/audit': 1, 'faq/write_exam_participate': 1, 'faq/write_exam_location': 1, 'faq/write_exam_again': 1, 'faq/write_exam_with-out-offer': 1, 'faq/interview_arrangement': 1, 'faq/interview_times': 1, 'faq/interview_from': 1, 'faq/interview_clothing': 1, 'faq/interview_paperwork': 1, 'faq/interview_result': 1}  

16.regex_features=[]
正則特征。

17.response_examples=[14*Message]
??response例子,如下所示:

18.responses
??response例子,如下所示:

19.retrieval_intents=set(‘faq’)
檢索意圖。

20.training_examples=[25*Message]
內(nèi)容和intent_examples相同,不再介紹。

參考文獻(xiàn):
[1]https://github.com/RasaHQ/rasa
[2]rasa 3.2.10 NLU模塊的訓(xùn)練:https://zhuanlan.zhihu.com/p/574935615

http://www.risenshineclean.com/news/49748.html

相關(guān)文章:

  • 為什么做織夢(mèng)網(wǎng)站時(shí)圖片出不來網(wǎng)絡(luò)策劃書范文
  • 佛山網(wǎng)站推廣市場(chǎng)中級(jí)經(jīng)濟(jì)師考試
  • 阿里云空間如何安裝wordpressseo快速排名軟件
  • 優(yōu)酷wordpress建站教程百度引擎提交入口
  • icann官方網(wǎng)站常用的網(wǎng)絡(luò)營(yíng)銷方法
  • 新聞?lì)惥W(wǎng)站源碼windows 優(yōu)化大師
  • 深圳網(wǎng)絡(luò)優(yōu)化公司哈爾濱怎樣關(guān)鍵詞優(yōu)化
  • 如何建網(wǎng)站費(fèi)用多少武漢seo網(wǎng)站排名
  • 網(wǎng)站做seo推廣方案東莞網(wǎng)站營(yíng)銷策劃
  • 網(wǎng)絡(luò)營(yíng)銷的特征優(yōu)化大師使用方法
  • 珠海網(wǎng)站制作系統(tǒng)友情鏈接平臺(tái)站長(zhǎng)資源
  • 西寧平臺(tái)網(wǎng)站建設(shè)展示型網(wǎng)站設(shè)計(jì)公司
  • 警告 此服務(wù)器美國(guó)維護(hù)搜外seo視頻 網(wǎng)絡(luò)營(yíng)銷免費(fèi)視頻課程
  • 做網(wǎng)站前期費(fèi)用個(gè)人優(yōu)秀網(wǎng)頁(yè)設(shè)計(jì)
  • 公眾號(hào)怎么做微網(wǎng)站百度站長(zhǎng)工具驗(yàn)證
  • 網(wǎng)站注冊(cè)手機(jī)號(hào)安全嗎深圳網(wǎng)絡(luò)營(yíng)銷
  • 蘇州網(wǎng)站建設(shè)公司電話百度百科詞條創(chuàng)建入口
  • 六安網(wǎng)站推廣獲客appseo搜狗
  • 深圳手機(jī)網(wǎng)站開發(fā)溫嶺網(wǎng)絡(luò)推廣
  • 黨建設(shè)網(wǎng)站營(yíng)銷咨詢公司排名前十
  • 裝飾公司 網(wǎng)站模板網(wǎng)絡(luò)推廣中心
  • 南京平臺(tái)網(wǎng)站建設(shè)網(wǎng)站如何優(yōu)化一個(gè)關(guān)鍵詞
  • 怎么做網(wǎng)站營(yíng)銷策劃個(gè)人網(wǎng)站設(shè)計(jì)畢業(yè)論文
  • 福田公司簡(jiǎn)介網(wǎng)站seo排名培訓(xùn)
  • 設(shè)計(jì)電子商務(wù)網(wǎng)站建設(shè)方案互聯(lián)網(wǎng)推廣方式有哪些
  • 潛江公司做網(wǎng)站徐州網(wǎng)站優(yōu)化
  • 煙臺(tái) 網(wǎng)站建設(shè)多少錢永久免費(fèi)客服系統(tǒng)有哪些軟件
  • 互動(dòng)吧網(wǎng)站模板青島網(wǎng)絡(luò)推廣
  • 網(wǎng)站建設(shè)公司如何約客戶瀏覽器下載
  • 網(wǎng)站流程圖軟件大型網(wǎng)站seo課程