Isännöi omaa bottialustaasi Bot Libre Enterprise Bot Platformin avulla
Bot Libre Dev

Knowledge

tekijä dpiaggesi Lähetetty Sep 5 2016, 10:22

Hello, I'm new to this... I've been playing with the scripts for a while... i was wondering if it's possible to re-write the 'knowledge base' to match another language... Italian in my case... is it possible to rewrite the 'base concept'? I understand is a pretty heavy job... but I would like to try if it's possible...

I couldn't understand the 'knowledge' structure... i mean... what are the 'primitive' types when i query the DB? that's the primal data items i need to start from?

Any hints are appreciated.

Thank you

Daniel


by admin posted Sep 5 2016, 18:12
There is nothing language specific in the knowledge base. Some of the bootstrap scripts are English specific, but the knowledge is language independent.

The bot's knowledge generally separates the words from their meanings. So you could give the same meaning multiple different words in different languages.

If you are just training your bot using questions and responses, then your questions and answer can be in any language.

For the bootstrap scripts, you could try to rewrite these for other languages. For the most part it would just involve changing the "pattern" and "template" text from English to the other language.

Is there a specific script that you are interested in?

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1723, today: 1, week: 3, month: 6

by dpiaggesi posted Sep 6 2016, 3:25

Oh no thanks, I think i will slowly rewrite the scripts that i need... sorry to bother you... would like to ask another question about the knowledge base :)

I'm looking at the primitives... for example let's take the "why" primitive... looking at its associations i see a bunch of #word and an #instantiation... the #words seems language specific...

I see as targets "WHY" "why" "Why"... so I should associate other items of type #word but with targets like "translation of why in my language", shouldn't I?


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1757, today: 1, week: 3, month: 4

by Paphus posted Sep 6 2016, 7:22
Yes, the #word relationships are language specific.
You could change the #word of any primitive to one from your language. Also set the #meaning of your word back to the primitive.

You could create a response list file that does this that uses the "script:" token.

i.e.
script: #why.word = "perché"; "perché".meaning = #why;
script: #where.word = "dove"; "dove".meaning = #where;

The primitives are just symbols, you can create your own primitive to define any unique object. Some of the primitives are used internally, such as #instantiation and #word, some are used by various scripts, and you can create your own to use in your own scripts.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1704, today: 1, week: 2, month: 3

by dpiaggesi posted Sep 6 2016, 8:31

oh okay, now I understand... you said that it wasn't language specific because the #word relationships aren't used by the engine itself but by the various scripts loaded on the bot... right?

Thank you very much for the explaination and keep up the good work!

Daniel 


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1660, today: 1, week: 2, month: 3

by Paphus posted Sep 6 2016, 9:40
The #word relationships are used to convert an object to text.

Bot Libre is object based, not text based, so instead of using text for data you can use objects.

For example this code,

#self.father = "Jon Smith Sr.";

This is using text as the data, it could be used in a Pattern/Template like this,

Pattern("Who is your father?")
Template("My father is {#self.father}")

so asking the bot "Who is your father?" would result in "My father is Jon Smith Sr."

But you can also instead use an object as the data.

#self.father = new Person();
#self.father.word =+ "Jon";
#self.father.word =+ "Jon Smith";
#self.father.word =+ "Jon Smith Sr.";
#self.father.child = #self;

Then the same Pattern/Template would use the #word relationship to print the Person object. You can have multiple #word relationships for an object, and the bot will pick the one that fits best with the context.

Objects can also have a #name relationship, #name will be used to print an object first, then #word if no name.

This is only relevant for Templates and Self scripts.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1647, today: 1, week: 2, month: 3

Id: 13929473
Lähetetty: Sep 5 2016, 10:22
Vastaukset: 5
Näkymät: 1891, Tänään: 1, Viikolla: 2, Kuukausi: 3
0 0 0.0/5