Droidtown / AItlas

AItlas is a knowledge graph designed to go with Loki NLU system.
MIT License
0 stars 1 forks source link

insert到intent的type是""or [] #5

Closed shendongCathy closed 1 year ago

shendongCathy commented 1 year ago

https://github.com/Droidtown/AItlas/blob/714be02bef66d8ecfa518fc147d2ac425dacc6d1/tools/naming.py#L24

這個y,再怎麼改他的type,insert句子進去都會變成

截圖 2023-07-26 12 05 45

如題,如圖,後來我用了"".join(y)也沒辦法 XD

Droidtown commented 1 year ago

24 行的問題,是由 15 行引起的 15 行的值,是 55 行傳入的 55 行是這個:

                insert_utt(utternace(txt, s)[i], danlen_1e)

那你要揭露 utterance(txt, s)[i] 是什麼,我才有辦法回答大概發生了什麼事。

shendongCathy commented 1 year ago

utterance(txt, s)[i]是call suspending1.txt檔的那個符合條件的句子,e.g.,一個entity,跑出的結果會是以下第二行

截圖 2023-07-26 18 31 50

看起來是一個句子,but其實是有九個字串,我怎麼join都沒辦法,也試過append.....

Droidtown commented 1 year ago

其實看不太懂,但通靈一猜…

"utterance":y

改成

"utterance":[y]

試試?

shendongCathy commented 1 year ago

Bravo,一猜就通~ 對耶!直接在外面包個[],就好了啊!我在那邊變來變去,"“.join() 啊, y.append()啊!不如你靈機一動。 Thanks a lot.