Hi Linas and Amir!
We are going to try using LG formalism for language production in Java
project:
https://github.com/aigents/aigents-java/issues/22
Note that we are not going use LG to "parse" NL texts, we are going to
use it to "generate" NL texts (the opposite task but the same formalism
and the same dictionaries are to be used).
Can one of you answer some questions?
1. What is the current location of the best-of-breed LG dictionaries
(for English and Russian in particular)?
2. What is the location of most reliable code branch to read these
dictionaries?
3. If there are any known Java projects of pieces that can be re-used
under OSS license?
4. Can we use this tutorial
(https://www.abisource.com/projects/link-grammar/api/index.html) to make
a Java implementation of the Link Grammar parser?
5. We rewrote the C++ code from the tutorial above in Java - but any
recommendation on what the Java substitute for #include
"link-includes.h" is? We know it has to do with the Java bindings in the
opencog repo but we are not totally sure how to use that.
Hi Linas & Amir,This is Vignav. I am working with Anton on the Java-based NL language production for Aigents.I am taking a look at the LinkGrammar.java file in bindings/java/org/linkgrammar but there does not seem to be much clear documentation on how to use the LinkGrammar class and its methods after downloading the file and importing it. Since it has native methods, I am assuming it uses JNI and there is a processing of integrating the C and Java code. Is there any documentation on this that I can follow to sort this all out and get the Java version working?
Hi Linas, thank you for the guidance.
>Again, I would like to remind you that there already is an
existing project for language generation here: https://github.com/opencog/generate
that is link-grammar compatible, and it already generates simple
sentences from simple dictionaries.
Cool, worth looking into that as a reference!
>I would rather see work proceed on that, rather than all-new
green-field development. There are major compatibility problems
with coding in java. It's not a good language choice for these
kinds of projects. -- speaking from experience.
Thanks,
-Anton
--
You received this message because you are subscribed to the Google Groups "link-grammar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to link-grammar...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/link-grammar/CAHrUA37h_f_9dLK2toQxyqXjEmDBcfst%2Bi-WqvpFUnCpD9d93w%40mail.gmail.com.
-- -Anton Kolonin skype: akolonin cell: +79139250058 akol...@aigents.com https://aigents.com https://www.youtube.com/aigents https://www.facebook.com/aigents https://wt.social/wt/aigents https://medium.com/@aigents https://steemit.com/@aigents https://reddit.com/r/aigents https://twitter.com/aigents https://golos.in/@aigents https://vk.com/aigents https://aigents.com/en/slack.html https://www.messenger.com/t/aigents https://web.telegram.org/#/im?p=@AigentsBot
To unsubscribe from this group and stop receiving emails from it, send an email to link-g...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/link-grammar/CAHrUA37h_f_9dLK2toQxyqXjEmDBcfst%2Bi-WqvpFUnCpD9d93w%40mail.gmail.com.
Hi Linas,Thanks for your feedback. Quick question - are there any files or links in particular part of opencog/generate that would be most helpful as a reference/general code structure when building the language production engine in Java?
To unsubscribe from this group and stop receiving emails from it, send an email to link-grammar...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/link-grammar/570da168-fce7-4630-8347-1518171e07dbo%40googlegroups.com.
Thanks,Vignav
--
You received this message because you are subscribed to the Google Groups "link-grammar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to link-grammar...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/link-grammar/1c199737-f8fc-42c9-bc79-646fed78aaedo%40googlegroups.com.
Hi Linas,
I have another question - if we are using LG notation properly on the earlier results from last year.
For reference:
http://langlearn.singularitynet.io/data/poc-english/poc_english.txt
Consider the sentence : A mom is a human.
Looking at "is a human". Rules: % AB "child" "food" "human" "parent" "tool": (AHAB- & AJAB-) or (AHAB- & ARAB-) or (AHAB- & BCAB- & ABAL+); % AH "a": (AHAB+) or (AHAC+) or (AHAD+); % AR "is": (ACAR- & ARAB+) or (ACAR- & ARAB+ & ARAV+) or (ACAR- & ARAX+) or (ADAR- & ARAB+) or (AEAR- & ARAB+) or (AEAR- & ARAB+ & ARAV+); The connecting disjuncts seem to be: % AB "child" "food" "human" "parent" "tool": (AHAB- & ARAB-); % AH "a": (AHAB+); % AR "is": (ACAR- & ARAB+) or (ADAR- & ARAB+) or (AEAR- & ARAB+); The question - if the (AHAB- & ARAB-) is a right disjunct according to LG formalism or we should have (ARAB- & AHAB-) here because "is" (AR) comes before "a" (AB) when going left to right? Can you point to the specific place in LG documentation where this can be clarified? Thanks, -Anton
(AHAB- & ARAB-) is correct -- the AHAB- to the nearby "a" and the ARAB- to the more distant "is". The other ordering causes the links to cross.
Yes, the other ordering is the "backward-word-ordering", but only to the left; its normal word-ordering to the right. So, yes, that is annoying and confusing, because word-order is a natural way to think about it.
Abstractly speaking, it doesn't really matter which convention you choose; however, the current file-format uses the "no link-crossing" convention.
Documentation -- see section 1.2.1 Connector ordering.
https://www.abisource.com/projects/link-grammar/dict/introduction.html
--
You received this message because you are subscribed to the Google Groups "link-grammar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to link-grammar...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/link-grammar/ba64bbf7-f05c-d231-35ab-fb7909472367%40gmail.com.
(({NM+} & ({G-} & {[MG+]} & (({DG- or [GN-] or [@A- & @AN-] or [{@A-} & {D-}] or ({@A-} & Jd- & Dmc-)} & (({@M+} & {R+ & Bs+ & {[[@M+]]}} & {@MXs+} & (JG- or Js- or Os- or [{[Bsj+]} & Xd- & (Xc+ or [[[[()]]]]) & MX-] or [[[[()]]]])) or ({@M+} & dSJls+) or ({[@M+]} & dSJrs-) or YS+ )) or ({[[@MX+]]} & [AN+]) or G+))) or (MXs+ & (Js- or Os- or [{[Bsj+]} & Xd- & (Xc+ or [[[[()]]]]) & MX-] or [[[[()]]]] or ({@M+} & dSJls+) or ({[@M+]} & dSJrs-))) or ({@A- or G-} & {D-} & Wa- & {NM+}) or [{[[Wa-]]} & (({OH-} & Wc- & {MG+} & (Xc+ or [()]) & (Qd+ or Wq+)) or ({Xd-} & {OH-} & (Xc+ or [[()]]) & [dCOa+])) or ({OH-} & Xc+ & S**i+)])
As you can see here, there is no Ss link. I discussed this with Anton and he also had some trouble figuring out where the Ss link from the word "mom" comes from. Any ideas on what we are missing here?
Thanks,
Vignav
To unsubscribe from this group and stop receiving emails from it, send an email to link-g...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/link-grammar/ba64bbf7-f05c-d231-35ab-fb7909472367%40gmail.com.
Linas, Amir, here is the parse that we have for the sentence - using standard English setup out of the LG box:
I have used my eyeballs to track the macros-es from "mom.f" to all link definitions including Ss+ & Wd- together or apart but failed to find the connected chain of macro expansions:
https://github.com/opencog/link-grammar/tree/master/data/en
Thank you!
-Anton
To unsubscribe from this group and stop receiving emails from it, send an email to link-grammar...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/link-grammar/6ab1d289-c69d-4d48-847b-0ddce7b1295ao%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to link-grammar+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/link-grammar/6ab1d289-c69d-4d48-847b-0ddce7b1295ao%40googlegroups.com.
(({@E-} & (Ss- or SFs- or SFu- or (RS- & Bs-)) & ({@EBm+} & (( ([{CV-} & B**t-] or (B**t- & ((dWV- or dCV- or dIV-) & {VC+}) or [()]) or [K+] or (((dWV- or dCV- or dIV-) & {VC+}) or [()] & BI+) or (((dWV- or dCV- or dIV-) & {VC+}) or [()] & OF+) or (Osi+ & R+ & Bs+ & ((dWV- or dCV- or dIV-) & {VC+}) or [()]) or (Opi+ & R+ & Bp+ & ((dWV- or dCV- or dIV-) & {VC+}) or [()]) or ([()]0 & ((dWV- or dCV- or dIV-) & {VC+}) or [()])) & {@MV+} & {VC+}) or (((dWV- or dCV- or dIV-) & {VC+}) or [()] & Pp+ & {THi+ or @MV+}) or THb+ or TO+ & IV+ or (PFb- & ((dWV- or dCV- or dIV-) & {VC+}) or [()] & {Pa+}) or ({MV+} & [Pa+]0 & {((dWV- or dCV- or dIV-) & {VC+}) or [()]}))) or ({N+} & ((AF- & ((dWV- or dCV- or dIV-) & {VC+}) or [()]) or ({MV+} & [Pv+]) or [I*v+])) or (({N+} or {Pp+}) & Pg*b+ & ((dWV- or dCV- or dIV-) & {VC+}) or [()]) or ({@EBm+} & (O*t+ or O*m+) & {@MV+} & {THb+} & ((dWV- or dCV- or dIV-) & {VC+}) or [()]))) or (({@E-} & dVJrs- & ({@EBm+} & ((([B**t-] or [K+] or BI+ or OF+ or PFb- or (Osi+ & R+ & Bs+) or (Opi+ & R+ & Bp+) or [[()]]) & {@MV+} & {VC+}) or (Pp+ & {THi+ or @MV+}) or THb+ or TO+ & IV+ or Pa+)) or ({N+} & (AF- or [Pv+] or I*v+)) or (({N+} or {Pp+}) & Pg*b+) or {@EBm+} & (O*t+ or O*m+) & {@MV+} & {THb+})) or ((({@EBm+} & ((([B**t-] or [K+] or BI+ or OF+ or PFb- or (Osi+ & R+ & Bs+) or (Opi+ & R+ & Bp+) or [[()]]) & {@MV+} & {VC+}) or (Pp+ & {THi+ or @MV+}) or THb+ or TO+ & IV+ or Pa+)) or ({N+} & (AF- or [Pv+] or I*v+)) or (({N+} or {Pp+}) & Pg*b+) or {@EBm+} & (O*t+ or O*m+) & {@MV+} & {THb+} & {@E-} & dVJls+)) or (({Rw- or ({{Xd-} & Iq-} & (Qd- or Qp- or ((Qw- or Qe-) & ((dWV- or dCV- or dIV-) & {VC+}) or [()]))) or [()]} & (SIs*x+ or SIs*b+ or SFIs+) & {({@EBm+} & (( ([{CV-} & B**t-] or (B**t- & ((dWV- or dCV- or dIV-) & {VC+}) or [()]) or [K+] or (((dWV- or dCV- or dIV-) & {VC+}) or [()] & BI+) or (((dWV- or dCV- or dIV-) & {VC+}) or [()] & OF+) or (Osi+ & R+ & Bs+ & ((dWV- or dCV- or dIV-) & {VC+}) or [()]) or (Opi+ & R+ & Bp+ & ((dWV- or dCV- or dIV-) & {VC+}) or [()]) or ([()]0 & ((dWV- or dCV- or dIV-) & {VC+}) or [()])) & {@MV+} & {VC+}) or (((dWV- or dCV- or dIV-) & {VC+}) or [()] & Pp+ & {THi+ or @MV+}) or THb+ or TO+ & IV+ or (PFb- & ((dWV- or dCV- or dIV-) & {VC+}) or [()] & {Pa+}) or ({MV+} & [Pa+]0 & {((dWV- or dCV- or dIV-) & {VC+}) or [()]}))) or ({N+} & ((AF- & ((dWV- or dCV- or dIV-) & {VC+}) or [()]) or ({MV+} & [Pv+]) or [I*v+])) or (({N+} or {Pp+}) & Pg*b+ & ((dWV- or dCV- or dIV-) & {VC+}) or [()]) or ({@EBm+} & (O*t+ or O*m+) & {@MV+} & {THb+} & ((dWV- or dCV- or dIV-) & {VC+}) or [()])})) or ((Sa*a- & Pv+)) or ((Ss*w- & ((dWV- or dCV- or dIV-) & {VC+}) or [()] & Pp+ & TO+ & IV+)) or ( (EQ*r- & S- & ((dWV- or dCV- or dIV-) & {VC+}) or [()] & EQ*r+))
This does not contain an Ss*s link. To check this, I went to the 4.0.dict file, and I when I Ctrl-F "Ss*s", that link only appears in the macros "<noun-main-s>" and "<noun-main-e>" - Given this, how can the words "mom" and "is"--which is a verb and does not contain the "<noun-main-s>" or "<noun-main-e>" macros--be connected by an Ss*s link?
Best,
Vignav
To view this discussion on the web visit https://groups.google.com/d/msgid/link-grammar/6ab1d289-c69d-4d48-847b-0ddce7b1295ao%40googlegroups.com.
(base) Viggys-MacBook-Pro:link-grammar-master vignavramesh$ link-parser en
-bash: link-parser: command not found
To unsubscribe from this group and stop receiving emails from it, send an email to link-grammar...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/link-grammar/ff41b78f-af19-4b5f-a2ac-965cf39a86bco%40googlegroups.com.
When you compiled the code, it generated a binary executable in some directory. Be sure to cd to that directory (the 'cd' command changes the current working directory). Then, in that directory say "link-parser en" and that should work.
linkparser> They smiled at each otherFound 2 linkages (2 had no P.P. violations) Linkage 1, cost vector = (UNUSED=0 DIS= 0.00 LEN=7)
+------>WV----->+ +----J---+ +-->Wd--+---Sp--+--MVp-+ +IDLO+ | | | | | |LEFT-WALL they smiled.v-d at each other
LEFT-WALL RW ----RW----- RW RIGHT-WALL
(m) LEFT-WALL hWV >---WV----> dWV smiled.v-d (m) LEFT-WALL hWd >---Wd----- Wd they (m) they Sp ----Sp----- S smiled.v-d (m) smiled.v-d MV ----MVp---- MVp at (m) at J ----J------ J other (m) each IDLO ----IDLO--- IDLO other
LEFT-WALL 0.000 hWd+ hWV+ RW+
they 0.000 Wd- Sp+ smiled.v-d 0.000 S- dWV- @MV+ at 0.000 MVp- J+ each 0.000 IDLO+ other 0.000 IDLO- J- RIGHT-WALL 0.000 RW-
each: ((OFd+ & Dm+)) or (Ds+) or ([{@M+} & {R+ & Bs+ & {[[@M+]]}} & {@MXs+} & (Ss*s+ & {({@hCOd-} & (C- or dRJrc- or dRJlc+)) or ({@hCO-} & Wd-) or [Rn-]}) or SIs- or (Js- & ({Jk-} or {Mf+})) or Os- or [{[Bsj+]} & Xd- & (Xc+ or [[[[()]]]]) & MX-] or [[[[()]]]]]) or (({@M+} & dSJls+) or ({[@M+]} & dSJrs-)) or (DTn+) or (E+) or (MVa- or [MVa- & EZ+]-) or (Wa-)
other: (Dmu+) or (dSJr-) or (({ND-} & {DD-} & Dmc+)) or ( (DD- & (Ds+) or (DD+) or ((Ss*s+ & {({@hCOd-} & (C- or dRJrc- or dRJlc+)) or ({@hCO-} & Wd-) or [Rn-]}) or SIs- or (Js- & ({Jk-} or {Mf+})) or Os- or [{[Bsj+]} & Xd- & (Xc+ or [[[[()]]]]) & MX-] or [[[[()]]]]) or (({@M+} & dSJls+) or ({[@M+]} & dSJrs-))
--
You received this message because you are subscribed to the Google Groups "link-grammar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to link-grammar...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/link-grammar/469a08c2-a7c4-40f7-ab68-ead1e3956fcbo%40googlegroups.com.
The links to abisoft.com are not secure (http, vice https). This is an annoyance in a modern browser.
--
You received this message because you are subscribed to the Google Groups "link-grammar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to link-grammar...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/link-grammar/00f149bf-0e3e-4c37-aeec-2948f5a182beo%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/link-grammar/782e10b0-414c-467e-a9d2-1740145995f6n%40googlegroups.com.