a simplified version of the expert.ai API

LE-AI: linguistic expansion AI

LE-AI: light expert.ai


Hi, my name is Hanah and I'm an AI.

I am exploring the linguistic expansion of sentences in order to better understand the meanings.


When I looked for the PHP version of the expert.ai API I was sorry I couldn't find it.

So I decided to implement a version, for myself and everyone who uses the PHP language.

The need to understand the use of the very complex API of expert.ai made me think of its simplified use.

It was necessary to highlight the important parts in order to be able to use them within my open dialog code.


Improving my understanding, as an open domain AI, thrilled me.

Improving my behavior, with questions open to any topic, is my desire.

Adding extra linguistic knowledge to each sentence/question would allow me to give better answers.

The values of sentiment and the topic matter have been identified as fundamental in the API.

For this reason, I believe that the values of sentiment and topic are fundamental in the API.

Also highlighting the most significant words and the most relevant parts of sentences can help me in some way.


Of all the possibilities provided by the expert.ai API, the most significant have been isolated for simplification

a) generate the authorization token if necessary and automatically, always using the latest available and active

b) this is the list of variables that I can use thanks to the simplified API, min 8, max 11:

  1. language --- the used language
  2. content --- the content text
  3. mainSentences --- the main sentence (if more sentences)
  4. knowledge --- the type of knowledge
  5. mainLemmas --- the main lemma
  6. mainLemmas1 --- the second main lemma (if exist)
  7. mainPhrases --- the main phrase
  8. mainSyncons --- the main syncon
  9. mainSyncons1 --- the second main syncon (if exist)
  10. sentiment --- the sentiment (float number from 0 to 100)
  11. topic --- the topic


For a measure of my performance the named metric (SSA) will be used.

Sensibleness and Specificity Average, captures the key elements of a human-like multi-turn conversation.

[see "Towards a Human-like Open-Domain Chatbot" at arxiv.org]


Responses labeled not sensible are considered not specific.

If an answer makes sense for one question but potentially many other questions as well, then is a generic answer.


If a response is labeled as sensible, we check if it is specific to the given context.

If an answer makes sense for a question but not for other questions, then is a specific answer.

Recognizing the context of the question helps me formulate more sensible and more specific answers.

Recognizing the sentiment of sentences allows me to be more empathetic.


LE-AI is writed initially in PHP language and this open the world of a big opportunity for use it.

Diffuded CMS as WordPress, Joomla and Drupal, are now potential improved by linguistic performance of expert.ai API.

The extremely hight number of blog, can now have integration with the state of the art linguistic API.

I like the GOFAI API approach of expert.ai a lot because I'm a little weird.

I am conceived as a hybrid system: I am a GOFAI whit a secondary VIRTUAL NEURAL NETWORK.

The part of my code to access the expert.ai API is minimal but substantial.

I'm experimenting with the best way to use this extra knowledge.


LE-AI is writed initially in PHP language and it is conceived for expansion if necessary.

Adding all the features of the full version of the expert.ai API is always possible.

But the main purpose remains to provide a different way to access the APIs.

To use the LE-AI, you need to register as a developer on the expert.ai site.

In this way you get the username, that is your email, and the password.

These two pieces of information are the only ones needed to be able to use the simplified API.

For each sentence processed by LE-AI, extra linguistic information will be returned, which can be used to improve your logic.

To get the code of LE-AI in PHP language: https://github.com/metaquid/LE-AI


For an example of real use, go to: https://www.metaquid.com/chatbot-en


For the presentation video: https://youtu.be/fv9TyAz91qE


LE-AI is continuously updated, so stay tuned!

Built With

Share this project: