コード例 #1
0
def test_entity_train(name):
    chubot = ChuBotBrain(name, language='vi')
    chubot.load_data(
        "/media/nvidia/ssd/catkin_ws/src/chu_bot_source/chubot/usingdata/full_train.json"
    )
    # chubot.load_data("usingdata/vi_nlu_ask_way.json")
    meta = chubot.train_nercrf()
コード例 #2
0
def test_nercrf():
    nludatafile = "/media/nvidia/ssd/catkin_ws/src/chu_bot_source/chubot/data/nlu_greet.json"

    chubot = ChuBotBrain("greet_en", language='en')
    chubot.load_data(nludatafile)

    meta = chubot.train_nercrf()
    print(meta)

    inmessage = "a bird and a dog"

    tagged_entities = chubot.predict_entity(inmessage)

    print(tagged_entities)
コード例 #3
0
def test_entity_train(name):
    chubot = ChuBotBrain(name, language='vi')
    chubot.load_data("usingdata/full_train.json")
    # chubot.load_data("usingdata/vi_nlu_ask_way.json")
    meta = chubot.train_nercrf()