digraphs-with-text icon indicating copy to clipboard operation
digraphs-with-text copied to clipboard

Other extant, integrable representation schemes

Open robclouth opened this issue 6 years ago • 12 comments

Hey Jeffrey. I'm super interested semantically represented notes and I really like this project. Another project came to mind: Abstract Meaning Representation. Have you checked it out? Basically, I really want a note-taking service that semantically parses your text as you type, into an AMR graph. AMR graphs are frame-based and thus are N-ary, similar to your RSLTs. The challenge is how to accurately parse arbitrary natural language into the graphs. A way to side-step that issue is to use a language like Hash to give the parser more information to resolve ambiguities. Or have a semi-automated "sense-checker" system that underlines parts of the text with a squiggly line if it isn't sure what it means. Then you can manually select the meaning, or change the AMR in the UI.

Anyway, if you want a proper chat about this stuff at some point, let me know! It's fascinating.

robclouth avatar Dec 05 '17 18:12 robclouth

Absolutely! A hybrid system, automatically parsed except where it's unsure, would be ideal.

I just moved to Bogota and took a new job, so I'm a little strapped for bandwidth right now, but I will respond more fully as soon as I can.

JeffreyBenjaminBrown avatar Dec 05 '17 18:12 JeffreyBenjaminBrown

Great! Well, let me know and let's talk this through. I've also been researching graph embedding. The idea is to have a system that converts your text into a graph like as I said above, then embed that graph in some continuous latent space which can suggest 'completions' to the note, or similar ideas. Like how with word embeddings you can do vector maths on the meaning of words (King - Man + Woman = Queen), with embedded graphs you could do the same thing but with whole graphs, i.e. whole ideas. Check out this paper for the SOTA in knowledge graph embedding.

robclouth avatar Dec 05 '17 23:12 robclouth

@robclouth @JeffreyBenjaminBrown

https://chrisdone.com/posts/attempto-controlled-english

mrkgnao avatar Feb 02 '18 15:02 mrkgnao

I'm just getting to the wikipedia article now. This looks amazing; thanks!

JeffreyBenjaminBrown avatar Feb 03 '18 02:02 JeffreyBenjaminBrown

You might find these of interest for this topic as well:

https://en.wikipedia.org/wiki/Topic_map#RDF%20relationship

This could interact with the following:

https://en.wikipedia.org/wiki/Semantics_of_Business_Vocabulary_and_Business_Rules

The Wikipedia article about the latter one distorts what it's about quite severely, so I'd recommend reading the spec directly instead:

https://www.omg.org/spec/SBVR/

The PDF for v1.4 (as of this writing the latest) is here, the above page also links to the Appendices etc.:

https://www.omg.org/spec/SBVR/1.4/PDF

The interaction could work via this:

https://en.wikipedia.org/wiki/Ontology_Definition_MetaModel

See also here for more controlled languages besides Attempto and SBVBR:

https://en.wikipedia.org/wiki/Controlled_natural_language

https://en.wikipedia.org/wiki/List_of_constructed_languages#Knowledge_representation

See also: https://en.wikipedia.org/wiki/Natural_semantic_metalanguage

no-identd avatar May 10 '18 02:05 no-identd

Thanks! While we're on the subject of things that would be fun to integrate:

There's a Datalog-on-steroids library available now for Haskell called Dyna that I would like to rewrite the RSLT in. Dyna could handle a lot of the wheels I was reinventing; the codebase would shrink from its already-small 1000 lines to much less. (Barring some unforeseen big change in my life, I don't expect to have time to do serious work with this project again for many months; if anybody else wants to take a stab I would be thrilled.)

Alternatively, there's something called HyperGraphDB that's probably faster, although its query language is less expressive (and there's no native Haskell implementation). The mathematical definition of a hypergraph is much less expressive than an RSLT, but if I understand HyperGraphDB correclty, it is equal in expressive power to the RSLT.

Note that the expressivity of the language for querying is distinct from the expressivity of the representation. I can't imagine wanting a more flexible representation than RSLT|Hash, but there exist queries expressible in Dyna that neither Hash nor HyperGraphDB can express.

JeffreyBenjaminBrown avatar May 10 '18 03:05 JeffreyBenjaminBrown

there exist queries expressible in Dyna that neither Hash nor HyperGraphDB can express

Do you have any minimal example of such a query?

Also, for an "automatically parsed except where it's unsure" hybrid system, you might want a multi word expression tokenizer such as this one:

https://github.com/jakerylandwilliams/partitioner

But using that from Haskell would seem like a PITA, at least in the current state of it.

no-identd avatar Dec 12 '18 11:12 no-identd

Another thing perhaps mention-worthy, besides the things already mentioned here and in #11: N-Quads, originally invented by @sbp:

https://web.archive.org/web/20130707164712/http://lists.w3.org:80/Archives/Public/www-rdf-logic/2001Aug/0007.html

[The mentioned-there N-Pents never manifested.]

I've only found one bigger project so far seriously using N-Quads, namely, @huygensing's https://github.com/huygensing/timbuctoo

no-identd avatar Dec 12 '18 16:12 no-identd

Do you have any minimal example of such a query?

I can go one better than that! Here's an improved query language: https://www.reddit.com/r/haskell/comments/ag6lpv/an_edsl_for_logical_search_over_arbitrary_spaces/

I wanted queries to be like statements in math: "Find me all x such that there exists some y such that for every z satisfying the relation f(x,z), the relation g(y,z) holds as well." Now they can be.

All I've got left to do now is hook the RSLT into that query language, and rewrite Hash to be compatible, and provide a GUI ... so maybe that'll work by the end of this year. (Ideally I'd like to write all the non-GUI code in Mercury, so that I can use Mercury's magical ability to detect recurrent relations, but that can wait.)

JeffreyBenjaminBrown avatar Jan 15 '19 22:01 JeffreyBenjaminBrown

The link in the reddit thread seems dead, so:

https://github.com/JeffreyBenjaminBrown/rslt-haskell

no-identd avatar Feb 04 '19 01:02 no-identd

I changed its name again. It works now. https://github.com/JeffreyBenjaminBrown/hode

JeffreyBenjaminBrown avatar Apr 06 '19 13:04 JeffreyBenjaminBrown

Now Hode has a couple short video tutorials, mentioned in the README. https://github.com/JeffreyBenjaminBrown/hode

JeffreyBenjaminBrown avatar Apr 14 '19 05:04 JeffreyBenjaminBrown