@taiwotman私はあなたが訓練したコーパスファイルを知らない。要するに、ベストマッチアルゴリズムはこのように動作します。ボットは、ボットを訓練したすべてのステートメントを繰り返します。
closest_match.confidence = 0
# Find the closest matching known statement
for statement in statement_list:
confidence = self.compare_statements(input_statement, statement)
if confidence > closest_match.confidence:
statement.confidence = confidence
closest_match = statement
会話ボットは、デフォルトの文の比較アルゴリズムを使用して、あなたの例ではlevenshtein_distance
で、シナリオはこの中で、この
confidence = self.compare_statements('What is ai?', 'what is ai')
ように見える自信が1.0で、あなたは答えArtificial Intelligence is the branch of engineering and science devoted to constructing machines that think.
を取得します
あなたはこのケースと混同していたと思います。チャッターボットdefault threshold values is 65%
。 高い信頼度を持つすべての声明の中でそれは応答としてなります。この自信で
confidence = self.compare_statements('What is ai?', 'What is a joke?')
を超える0.65で0.77であり、あなたが私はあなたがai conversations
他のあなたが正確な結果を得ることができ、あなたのボットを試みたと思うArtificial Intelligence is the branch of engineering and science devoted to constructing machines that think.
にお答えしてしまいます。
を使用して、信頼度を0.90に設定すると、より詳細な結果を得ることができます。
同じ答えが2番目の質問にも適用されます。
ご返信ありがとうございました。私はai.ymlファイルを使ってトレーニングを行った。このアルゴリズムを勉強して、48時間以内に帰ることを許可してください。あなたが話しているのは、[levenshtein_distance](https://github.com/gunthercox/ChatterBot/blob/master/chatterbot/comparisons.py#L35)に対する重量計算です。 –
'会話ボット= { '名称': 'テクニカルサポートボット' 'logic_adapters':[ { "import_path": "chatterbot.logic.BestMatch"、 "statement_comparison_function": "chatterbot.comparisons.levenshtein_distance"、 "response_selection_method": "chatterbot.response_selection.get_first_response" }、 { 'import_path': 'chatterbot.logic.LowConfidenceAdapter'、 'しきい値':0.90、 'default_responseの':「私は申し訳ありませんが、私理解していない。' }、 ]、 ' –