KorrBot

  • 58 Replies
  • 1348 Views
*

korrelan

  • Trusty Member
  • *********
  • Terminator
  • *
  • 905
  • Look into my eyes! WOAH!
    • Google +
KorrBot
« on: April 13, 2018, 12:00:16 pm »
I've not had much experience with NLP, Chatbots, Json, etc so there is obviously a gap in my experience/ knowledge.

As side project I've took a few hours to write a simple chatbot engine/ parser.

The bot uses sentence templates, a dictionary and mostly simple substitution and searches.

The bot can learn simple Json triples and also apply simple inference rules, so it knows birds can fly because birds have wings and wings can fly, etc

I've got an idea how to add conversation goals, moods and a personality etc...

Example conversation... so far lol

Code: [Select]
U: what is a dog
B: i'm not sure what is a dog

U: what is a cat
B: i'm not sure what is a cat

U: can birds fly
B: i'm not sure

U: can a bird fly
B: no a bird can not fly you dumb ass.

U: can a cat fly
B: no a cat can not fly you dumb ass.

U: does a dog have legs
B: i'm not sure

U: does a cat have feet
B: i don't know

U: does korrelan own a car
B: i'm not sure

U: my name is korrelan **Begin Learning**
B: good to know.

U: a bird is a animal
B: good to know... tell me more.

U: a bird has wings
B: ok... what else should i know?

U: korrelan is a human
B: you don't say.

U: korrelan is a male
B: you don't say.

U: a male is a human
B: good to know... tell me more.

U: male is a sex
B: you don't say.

U: wings can fly
B: ok I understand

U: wings can fly
B: ok I understand

U: a human has legs
B: ok... what else should i know?

U: feet can walk
B: ok I understand... tell me more.

U: legs have feet
B: cheers for the information.

U: a dog has legs
B: ok... what else should i know?

U: a cat has legs
B: ok... what else should i know?

U: a dog is a animal
B: good to know... tell me more.

U: a cat is a animal
B: good to know... tell me more.

U: do you know korrelan is a mammal
U: korrelan owns a car
B: sweet... tell me more.

U: a plane has wings **Stop Learning**
B: ok... what else should i know?

U: what is a dog
B: a dog is a animal

U: what is a cat
B: a cat is a animal

U: can birds fly
B: yes birds can fly

U: can a bird fly
B: yes a bird can fly

U: can a cat fly
B: no a cat can not fly you dumb ass.

U: does a dog have legs
B: yes a dog does have legs

U: does a cat have feet
B: yes a cat does have feet

U: does korrelan own a car
B: of course korrelan has a car

U: what colour is the car
B: i'm not sure. what colour is the car?

U: the car is green
B: green is a nice colour.

U: what colour is the car
B: the car is green

U: what colour is the sky
B: i'm not sure. what colour is the sky?

U: the sky is blue
B: blue is a nice colour.

U: what colour is the sky
B: the sky is blue

U: can korrelan walk
B: yes korrelan can walk

U: can a dog walk
B: yes a dog can walk

U: can a dog fly
B: no a dog can not fly you dumb ass.

U: do humans have legs
B: yes a human does have legs

U: where is the tv
B: i'm not sure. where is the tv?

U: the tv is in the lounge
B: the lounge is the best place for it.

U: where is the computer
B: i'm not sure. where is the computer?

U: the computer is in the office
B: the office is the best place for it.

U: where is the tv
B: the tv is in the lounge

U: where is the computer
B: the computer is in the office

U: tell me about albert
B: i don't know who albert is

U: albert is a scientist
B: you don't say.

U: tell me about albert
B: albert is a scientist

U: tell me about korrelan
B: korrelan is a human




Haha... loads of fun...

Ed: What idiot invented the English language?... it's so contrived lol.

 :)
« Last Edit: April 13, 2018, 03:20:09 pm by korrelan »
It thunk... therefore it is!

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ***********
  • Eve
  • *
  • 1452
  • First it wiggles, then it is rewarded.
    • Enter Lair
Re: KorrBot
« Reply #1 on: April 13, 2018, 02:36:26 pm »
Korrelan suddenly realized he was missing something is all this is about haha :D

You're closer than ever now "korr".
Emergent

*

korrelan

  • Trusty Member
  • *********
  • Terminator
  • *
  • 905
  • Look into my eyes! WOAH!
    • Google +
Re: KorrBot
« Reply #2 on: April 13, 2018, 03:08:46 pm »
Nah!... just a fun distraction from my main project... to help keep me sane.

 :)
It thunk... therefore it is!

*

ivan.moony

  • Trusty Member
  • *********
  • Terminator
  • *
  • 948
    • Structured Type System
Re: KorrBot
« Reply #3 on: April 13, 2018, 03:10:23 pm »
Quote
What idiot invented the English language?... it's so contrived lol.

It was invented a million years ago, and still we are using, more or less the same version of it. Is it that hard to think of something better?
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6345
  • Mostly Harmless
Re: KorrBot
« Reply #4 on: April 13, 2018, 03:21:05 pm »
That's really good Korrelan  O0

I have to point out that the coloured words are just the code prettifier picking up common programming words. I'll have to look at that again sometime.

Chatbot making is a lot of fun I agree.  I look forward to seeing what more you can do :)

*

korrelan

  • Trusty Member
  • *********
  • Terminator
  • *
  • 905
  • Look into my eyes! WOAH!
    • Google +
Re: KorrBot
« Reply #5 on: April 13, 2018, 03:44:47 pm »
@Ivan

I hear Elvish is pretty hard to learn lol.

@Freddy

Perhaps I shouldn't have used the 'code' identifier? I didn't want a huge list to be shown.

Quote
I look forward to seeing what more you can do

Cheers Freddy, who would have thought there were so many ways of asking the same questions lol.

Hmmm... voice/ phoneme/ face/ object recognition perhaps lol.

 :)
It thunk... therefore it is!

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ***********
  • Eve
  • *
  • 1452
  • First it wiggles, then it is rewarded.
    • Enter Lair
Re: KorrBot
« Reply #6 on: April 13, 2018, 03:54:58 pm »
Make it talk on its own, and what it wants most atm. And make it ask/talk to itself.

I thought the colored words were the predicate/verb. No keep it?? XD I liked that.

I could say ivan's sentence "Is it that hard to think of something better?" as "Imagine something better. Hard?" but even that leaves out things you wanted to say. English is perfect, so is other languages out there. They are modernized I think. Just look at my sentences. Hard to minimize that.

:D I bet either this will become something or his main project will utilize this.
Emergent

*

WriterOfMinds

  • Trusty Member
  • ****
  • Electric Dreamer
  • *
  • 100
    • WriterOfMinds Blog
Re: KorrBot
« Reply #7 on: April 13, 2018, 04:21:25 pm »
U: the car is green
B: green is a nice colour.

U: what colour is the car
B: the car is green

Does KorrBot know that "the car" here is korrelan's car that was previously referred to, or will it think that any car is green now?
(I actually can't remember at the moment what I've got Acuitas doing with stuff like this, but I think he just balks at anything marked with "the" and doesn't learn facts about it.)

The English language is only about 2000 years old, by the way (and that includes Old English, which is so different from modern English that you have to translate it for today's readers).  Attempts have been made to invent an idealized language (see: Esperanto, Lojban), but none of them have been accepted for common use.

*

Don Patrick

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 435
    • Artificial Detective
Re: KorrBot
« Reply #8 on: April 13, 2018, 04:58:39 pm »
You make it look so easy, Korrelan. :)
Yes, English is horrible. I chose to work in English instead of my native language because I was taught English had very strict and consistent grammar. They lied.
Personal project: NLP -> learning -> knowledge -> logical inference -> A.I.

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • ***********
  • Eve
  • *
  • 1452
  • First it wiggles, then it is rewarded.
    • Enter Lair
Re: KorrBot
« Reply #9 on: April 13, 2018, 05:20:23 pm »
I only speak English but I'd say English is strict and consistent.

Actually English has big capability to go deep and complex......you don't want simple wimple. But if you do then you can using English. Use Simple English or your own wikidata logic.
Emergent

*

korrelan

  • Trusty Member
  • *********
  • Terminator
  • *
  • 905
  • Look into my eyes! WOAH!
    • Google +
Re: KorrBot
« Reply #10 on: April 13, 2018, 06:10:30 pm »
@WOM

Hehe… no the bot as no idea at this point, it just knows a car is green.  I’m writing the code to recognise ‘ownership’ etc now. So…

korrelans car is green… should create…

1   korrelan-subject-car
2   1-colour-green
3   1-model-tesla
4   korrlean-wishes-he owned a tesla

Where the second triple relates to the index of the first… hopefully, still considering the possibilities. 

I’m really not used to this type of coding… enjoying it though,

@Don

I can see some complicated coding arising…

Korrelan owns a imaginary green tesla with a red roof and three wheels… hmmm lol

 :)
It thunk... therefore it is!

*

ivan.moony

  • Trusty Member
  • *********
  • Terminator
  • *
  • 948
    • Structured Type System
Re: KorrBot
« Reply #11 on: April 13, 2018, 06:25:59 pm »
We can try talking in assembler :)

Latin is older than English, yet it has almost the same structure (although Latin has a noun declination, which I never liked). Croatian also doesn't differ from English much. German is in the same wine with English, so it is more similar to English. I suspect that almost all natural languages have same types of words, which are only pronounced and sequenced in a different way. There are always subjects, predicates, objects, adjectives, prepositions, adverbs... Like all the language creators was in the collar between themselves. It is a real mystery, I have to admit. And I bet it wasn't easy to pick a grammar that is enough expressive to describe things we want to articulate. Turning centuries probably did the most of the job, but still, there is amazing similarity between spoken languages.

It is possible that when one language introduced a cool expression advance, other languages copied it too. Starting from subject-predicate combination of our ancestors, it may be that all the languages introduced whatever new cool combination was invented in each of them.
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

korrelan

  • Trusty Member
  • *********
  • Terminator
  • *
  • 905
  • Look into my eyes! WOAH!
    • Google +
Re: KorrBot
« Reply #12 on: April 13, 2018, 07:59:52 pm »
@ivan

Or... That all languages are somehow an expression/ linked to the universal 'logic' functioning of the human brain. The language commonalities were forced to arise, like all programming languages have similarities because of the computers binary logic.

 :)
« Last Edit: April 13, 2018, 09:03:37 pm by korrelan »
It thunk... therefore it is!

*

ivan.moony

  • Trusty Member
  • *********
  • Terminator
  • *
  • 948
    • Structured Type System
Re: KorrBot
« Reply #13 on: April 13, 2018, 08:16:44 pm »
Well, an instinct has to have some means to be passed over generations. Maybe you are right that metalanguage of instinct is what influences spoken language creation. And that is the thing that I find as an important part of an artificial neural network: a language it operates on.
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

korrelan

  • Trusty Member
  • *********
  • Terminator
  • *
  • 905
  • Look into my eyes! WOAH!
    • Google +
Re: KorrBot
« Reply #14 on: April 13, 2018, 08:46:03 pm »
Just as all machine programming languages can be traced back through several levels of abstraction to the base binary code, ultimately all human languages can be traced back to our neural code.

This is why we struggle to code AI's using high level languages, they lack the resolution/ tools/ finesse they are high level human designed constructs.

This is one of the reasons why I chose my neuromorphic approach for creating my AGI, I get to program using base human neural code.

 :)
It thunk... therefore it is!