Rasa NLU (entendimento da linguagem natural) é uma ferramenta para entender a semântica natural. Por exemplo, o site oficial é o seguinte:
"Estou procurando um restaurante mexicano no centro da cidade"
E retornar dados estruturados como:
intent: search_restaurant
entities:
- cuisine : Mexican
- location : center
O projeto original está na filial 0.2.7 e pode ser alterado livremente. A modificação desta versão é baseada na versão mais recente do RASA. O componente original em rasa_nlu_gao foi modificado e nenhuma nova adição foi feita. Além disso, as práticas anteriores são um pouco pesadas e não precisam ser modificadas no código -fonte da RASA. Você pode carregar diretamente o componente original como addon, herdar a versão mais recente do RASA e atualizá -lo em tempo real.
Os novos recursos adicionados atualmente são os seguintes (faça o download da mais recente versão Rasa-Nlu-Gao) (editar em 2019.06.24):
language: "zh"
pipeline:
- name: "JiebaTokenizer"
- name: "CountVectorsFeaturizer"
token_pattern: "(?u)bw+b"
- name: "EmbeddingIntentClassifier"
- name: "rasa_nlu_gao.extractors.bilstm_crf_entity_extractor.BilstmCRFEntityExtractor"
lr: 0.001
char_dim: 100
lstm_dim: 100
batches_per_epoch: 10
seg_dim: 20
num_segs: 4
batch_size: 200
tag_schema: "iobes"
model_type: "bilstm" # 模型支持两种idcnn膨胀卷积模型或bilstm双向lstm模型
clip: 5
optimizer: "adam"
dropout_keep: 0.5
steps_check: 100
language: "zh"
pipeline:
- name: "JiebaTokenizer"
- name: "CRFEntityExtractor"
- name: "rasa_nlu_gao.extractors.jieba_pseg_extractor.JiebaPsegExtractor"
part_of_speech: ["nr", "ns", "nt"]
- name: "CountVectorsFeaturizer"
OOV_token: oov
token_pattern: "(?u)bw+b"
- name: "EmbeddingIntentClassifier"
language: "zh"
pipeline:
- name: "JiebaTokenizer"
- name: "CRFEntityExtractor"
- name: "JiebaPsegExtractor"
- name: "CountVectorsFeaturizer"
OOV_token: oov
token_pattern: '(?u)bw+b'
- name: "EmbeddingIntentClassifier"
- name: "rasa_nlu_gao.classifiers.entity_edit_intent.EntityEditIntent"
entity: ["nr"]
intent: ["enter_data"]
min_confidence: 0
language: "zh"
pipeline:
- name: "JiebaTokenizer"
- name: "rasa_nlu_gao.featurizers.bert_vectors_featurizer.BertVectorsFeaturizer"
ip: '127.0.0.1'
port: 5555
port_out: 5556
show_server_config: True
timeout: 10000
- name: "EmbeddingIntentClassifier"
- name: "CRFEntityExtractor"
EmbeddingIntentClassifier dois componentes que usam tensorflow, são configurados da seguinte maneira (é claro, ner_bilstm_crf config_proto não pode ser configurado e o valor padrão utilizará todos os recursos): language: "zh"
pipeline:
- name: "JiebaTokenizer"
- name: "CountVectorsFeaturizer"
token_pattern: '(?u)bw+b'
- name: "EmbeddingIntentClassifier"
config_proto: {
"device_count": 4,
"inter_op_parallelism_threads": 0,
"intra_op_parallelism_threads": 0,
"allow_growth": True
}
- name: "rasa_nlu_gao.extractors.bilstm_crf_entity_extractor.BilstmCRFEntityExtractor"
config_proto: {
"device_count": 4,
"inter_op_parallelism_threads": 0,
"intra_op_parallelism_threads": 0,
"allow_growth": True
}
embedding_bert_intent_classifier foi adicionado e os arquivos de configuração correspondentes são os seguintes: language: "zh"
pipeline:
- name: "JiebaTokenizer"
- name: "rasa_nlu_gao.featurizers.bert_vectors_featurizer.BertVectorsFeaturizer"
ip: '127.0.0.1'
port: 5555
port_out: 5556
show_server_config: True
timeout: 10000
- name: "rasa_nlu_gao.classifiers.embedding_bert_intent_classifier.EmbeddingBertIntentClassifier"
- name: "CRFEntityExtractor"
intent_estimator_classifier_tensorflow_embedding_bert Classificador, e o arquivo de correspondência é como o FILHE é o FILLESTURTURTENSOFLEGROFLIGHT_BERTROWLEGROFLIGNION: e o arquivo de correspondência é como o FILHEs language: "zh"
pipeline:
- name: "JiebaTokenizer"
- name: "rasa_nlu_gao.featurizers.bert_vectors_featurizer.BertVectorsFeaturizer"
ip: '127.0.0.1'
port: 5555
port_out: 5556
show_server_config: True
timeout: 10000
- name: "rasa_nlu_gao.classifiers.embedding_bert_intent_estimator_classifier.EmbeddingBertIntentEstimatorClassifier"
- name: "SpacyNLP"
- name: "CRFEntityExtractor"
pip install rasa-nlu-gao
Para exemplos específicos, consulte RASA_CHATBOT_CN
Novelling de LiveTraitweb Whathnovel Omniparser Sexting Commitimp.