CollectiWise / owlab

The first repository that we will track with CollectiWise
0 stars 0 forks source link

Integrate with OpenCog #3

Open ceo-4com opened 4 years ago

ceo-4com commented 4 years ago

We have to get the best, worst, expected points from OpenCog API, when we:

jac2130 commented 4 years ago

Yes well in order to get this we first need to put all of the data into the opencog system ....it will then calculate these and there is an API now that should be able to handle this, although there are likely or almost definitely a few minor changes that will be needed and we should collaborate on.

The Opencog API that we have built so far has the following functions and you can see how it is used as well, in the code underneath this line:

if name=="main"

in this file: https://bitbucket.org/collectiwise/flask-oc/src/master/py2scheme.py

You can see that in order to get worst case, expected and best cases you have to first put all related (connected) statements into OpenCog. We will need to insert the entire ConceptNet when we build ConceptNet we should also build the AtomSpace database which is a translation of our ConceptNet data into the Atomese format: https://wiki.opencog.org/w/Atomese

Also this python code might even be better to be used, depending on what we decide:

For persistence: https://github.com/opencog/atomspace/blob/master/opencog/persist/README Scheme Router

ceo-4com commented 4 years ago

Let's separate this job into stages.

  1. We get final open cog image with API and run it
  2. We will import all current data into open cog
  3. We will call Open Cog each time when we create smth or need to get the data
ceo-4com commented 4 years ago

For 1 - @jac2130 share the current image so we can run it

ceo-4com commented 4 years ago

Also, we need next endpoints and parameters description with examples, you can put it into the doc:

  1. Create concept (user or any other concept) - you have to check duplicates and give us error if concept exists (coz it have to be unique) --Done

  2. Create relation --Done

  3. Create predicate --Done

  4. Create relationship --Done

  5. Get relationship weight --Done

  6. Change relationship weight --Done

  7. Create attribute --Done

  8. Get attribute weight --Done

  9. Change attribute weight --Done

  10. Create implication

  11. Get implication weight

  12. Change implication weight

jac2130 commented 4 years ago

Functions I've built and (in the case of implication, I'm still working on): with names of things: (uri==uri string == id string)

1) find_users (GET):

2) create_user (POST):

3) find_synonyms (GET):

4) create_concept (POST):

5) create_predicate (POST):

6) create_relation (POST):

7) create_relationship (POST)

8) create_attribute (POST)

9) create_implication (POST)

10) change_weight_attribute (POST)

12) change_weight_implication (POST)

*****WARNING! THE get_weight functions are different in that they don't take a user_id!

13) get_weight_attribute (GET)

14) get_weight_relationship (GET)

15) get_weight_implication (GET)

16) get_points (GET)

17) lookup_exp_attribute (GET)

18) lookup_exp_relationship (GET)

19) lookup_exp_implication (GET)

20) get_user_points (GET)