0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Rasa

環境構築

pip install rasa 
pip install ginza ja-ginza
mkdir Rasa
cd Rasa
rasa init --no-prompt

日本語設定

config.yml
recipe: default.v1

assistant_id: placeholder_default

language: ja

pipeline:
  - name: SpacyNLP
    model: 'ja_ginza'
  - name: SpacyTokenizer
  - name: SpacyFeaturizer
  - name: SpacyEntityExtractor
  - name: RegexFeaturizer
  - name: LexicalSyntacticFeaturizer
  - name: CountVectorsFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: "char_wb"
    min_ngram: 1
    max_ngram: 4
  - name: DIETClassifier
    epochs: 100
  - name: EntitySynonymMapper
  - name: ResponseSelector
    epochs: 100
  - name: FallbackClassifier
    threshold: 0.7

policies:
  - name: MemoizationPolicy
  - name: RulePolicy
  - name: TEDPolicy
    max_history: 5
    epochs: 100

設定追加

domain.yml
「intents」に追加
nlu.yml
「intent」を追加、学習させる例文を「examples」に入れる (日本語でも英語でも可)
stories.yml
「rule」を追加、返答する内容等を「steps」に入れる

運用

訓練

rasa train

実行

rasa shell

参考文献

https://qiita.com/Zect/items/e341e43fa9cf98529942
https://tech-blog.optim.co.jp/entry/2021/11/17/100000

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?