AI Zone Admin Forum Add your forum

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

How create dictionary files in portuguese to use in chatscript

Hello everybody!

I’d like to create the dictionary files in portuguese language to use in chatscript. I have the files that are based on princeton wordnet. Someone could tell me how I can create those files.



  [ # 1 ]

You cant readily. Ability to build a dictionary does not come with publicly released chatscript.
And it would generally need more than just the dictionary. You’d need stemming code to determine roots as well.
and concepts written in portugese instead of englis.


  [ # 2 ]

Thank you Bruce Wilcox for answering my question.

I have been following the topic “How to implement a Chatscript bot that talk Spanish” that Eduardo Bedoya created.
Portuguese is very similar to Spanhish and I know that I have to create concepts and the stemming in portuguese. But, like Eduardo Bedoya, I’d like to spell check and others things based in the dictionary.

I have the files based on princeton wordnet. So, could you create the dictionary files to chatscript?

Sorry for lost your time, I know that You are very busy.

Thank you so much.
Oberdan Alves

P.S. Sorry for my bad english.


  [ # 3 ]

What a pity that chatscript does not have a good support for other languages :(

Only english language has a good support.


  [ # 4 ]


As chatscript doesn’t have dictionary for portuguese. I am trying to make a table to conjugate verbs as a way to use tense in my bot.

I deleted the content of DICT\ENGLISH. And I created a table (RAWDATA\WORLDDATA\verbos.tbl) to do the conjugation as is in THE TABLE below.

I think the best way to do the verbs conjugation is to make a table. Make a dictionary is so hard.

My doubts are:

1. When I changed the order that I put the function ^addproperty it does not work, why? For example in the stretch of the table:

^canon(^pessoa1s ^canonical)
^addproperty(^pessoa1s VERB ^tempoverbal)


If I put the ^canon function first, the function ^addproperty does not work. It just work if it is the first function. Chatscript does not show any error when I compile. But, when I use :prepare word, I can not see any bit flag.

2. If I deleted all content of DICT\ENGLISH, why when I use :prepare “any word” chatscript show bit flags for the word like (~noun, ~noun_singular)?

:prepare kesoe9wfsfa

Original User Input: kesoe9wfsfa
Tokenized into: kesoe9wfsfa
Actual used input: kesoe9wfsfa

Xref: 1:kesoe9wfsfa
badparse Tagged POS 1 words: kesoe9wfsfa/unknown-word (Noun_singular)
  MainSentence:  PRESENT


1: kesoe9wfsfa (raw):  +~noun +~noun_singular +~normal_noun_bits +~noun_bits +~unknownword +kesoe9wfsfa //
1: unknown-word (canonical):  +unknown-word //



3. How can I rename bit flags? The function ^define show a error when I use. And I’d like use it in my patterns.

The content of a


concept: ~verbos_presente( VERBO_PRESENTE )
concept: ~verbos_passado( VERBO_PASSADO )

The error:

caneta: > :build 0
ChatScript Version 6.5 compiled May 7 2016 20:44:01

>>Reading folder RAWDATA/WORLDDATA/

——Reading file
*** Error- line 1 of
  FILE-1 Unknown top-level declaration ^define in RAWDATA/WORLDDATA/conceito_verbos.topReading concept ~verbos_presente
Reading concept ~verbos_passado

——Reading file verbos.tbl
Reading table tbl:addverbos


  line 1 of FILE-1 Unknown top-level declaration ^define in RAWDATA/WORLDDATA/
1 errors - press Enter to quit. Then fix and try again.


table: ^addverbos(^canonical ^tempoverbal ^pessoa1s ^pessoa2s ^pessoa3s ^pessoa1p ^pessoa2p ^pessoa3p)
^addproperty (^canonical VERB VERB_INFINITIVE)
^addproperty(^pessoa1s VERB ^tempoverbal)
^canon(^pessoa1s ^canonical)
^addproperty(^pessoa2s VERB ^tempoverbal)
^canon(^pessoa2s ^canonical)
^addproperty(^pessoa3s VERB ^tempoverbal)
^canon(^pessoa3s ^canonical)
^addproperty(^pessoa1p VERB ^tempoverbal)
^canon(^pessoa1p ^canonical)
^addproperty(^pessoa2p VERB ^tempoverbal)
^canon(^pessoa2p ^canonical)
^addproperty(^pessoa3p VERB ^tempoverbal)
^canon(^pessoa3p ^canonical)
  ser VERB_PRESENT sou es e somos sois sao
  ser VERB_PAST fui foste foi fomos fostes foram


  [ # 5 ]

Out of curiosity, why would you delete that file’s contents, rather than extract the list of words, have them translated into proper Portuguese, perform a simple replacement, then correct any errors? Granted, that sounds like a ton of work, and you would be right, but I would think it’s far less work than starting from scratch. Of course I’ve neither seen the contents of the DICT file in question, nor do I know Portuguese, so I could be completely wrong in my assumptions, but I still think it’s worth at least looking into. smile


  [ # 6 ]

Thank you Dave Morton for you answer!

But Portuguese is very different from english. I think that would be more easy to make a dictionary in portuguese rather than translate it.

And if I did this translation it wouldn’t solve my problem. Because the tenses of the verbs are made in chatscript hardcode, that is, I need do it manually anyway.


  [ # 7 ]

Ok, fair enough. I wish you great success with your efforts. smile


  [ # 8 ]

Thank you Dave Morton. But, would you know answer my questions?

Thanks a lot in advance!


  [ # 9 ]

I’m afraid that I do not. that’s a subject that is far deeper into the workings of ChatScript than I have ever gone. Bruce is the hands-down expert in this matter, so an answer will likely have to come from him. I could make a guess, but I already did that once in this thread, and it met with no success at all. cheese


  [ # 10 ]

Ok Dave Morton. No problem. wink


  [ # 11 ]
Oberdan Alves - Jul 9, 2016:

Ok Dave Morton. No problem. wink

Hi, I Try execute ChatScript = language-portuguese and receive in log error:

4 - called myexit at Fri Feb 15 00:37:35 2019
FATAL: dict changed after binary read+supplement

what setting do you use to start chatscript?


  login or register to react