AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Chinese character output possible?
 
 

My little requirement is that CS can shoot Chinese characters in its output. I read some threads and notice that Bruce advised the server can process multi-byte characters alright, though the C++ console can’t display them.

However my test turned out to be disappointing. In a setup of simply sending “:do chinese-string” thru a socket volley with SC server, the Chinese string is echoed as a serious of ? characters as depicted in the attached screen shot - the last line is the correct hex string of the 5 double-byte Chinese characters, while the two lines above it are the actual CS response in string and hex formats respectively.

Is there any way I can make CS output Chinese? Many thanks.

Image Attachments
Testing_screen.png
 

 
  [ # 1 ]

So I copied some chinese into a text file and saved it as utf8 and then did :source on it.
The output in the log file was this:
Respond: user:chinese bot:genie ip: () 1   :do 解釋內文之英文單字均可再點入查詢 ==> 解釋內文之英文單字均可再點入查詢  When:May04’15-07:57:20 Why:

Ergo your input probably was not utf8.

 

 
  [ # 2 ]

Hi Bruce,

Thank you for such prompt assist again. Yes, my input is something like double-byte Big5 coding.

So cool to see CS supports utf8 and prints out that sound and beautiful Chinese string in your sample. Two thumbs up again to the awesome CS!

 

 
  [ # 3 ]

Hi Bruce,

I’m very new here.
I’d like to implement Chinese bot; according to your saying that “you have to define new concept sets” for a foreign language. But I’ve change the concept file, and rebuild Harry. I can’t use the concept I’ve changed.

If I define canonical forms (LIVEDATA/canonical file), how could I use it in Harry?

 

 
  [ # 4 ]

Changing a concept suggested you edited something in rawdata, which is built using :build 0
Defining a new concept in Harry would make it compile with harry, eg

concept: ~myvehicles( ~vehicles extravehicle)
allows you to use all of vehicles and extend it and if that concept is in a harry file, rebuild with :build Harry

Canonical forms will do you no good in chinese, because they get used with the pos-tagger for english, which you wont want to use.

 

 
  login or register to react