SCM file: Beginners Info

45 views
Skip to first unread message

vishnup...@gmail.com

unread,
Aug 30, 2016, 6:29:49 PM8/30/16
to opencog


Hello All,

I have a text file "John.txt", which has  the following:

John eats apple.
Mary eats mango.
End.
Mike eats orange.


I have converted it into cff (which is in the form of xml, "John.xm"l)  by using "batch-process.sh"  and in turn converted  that into scm (John.scm) using ./cff-to-opencog.pl. Because when i straightly tried converting a text file into scheme file, i got only this:

(ReferenceLink (stv 1 1)
(DocumentNode "document@f313865f-35a5-48eb-8f56-92786a7a4d57")
(ListLink
)
)



I expected "John.scm" to be something  like this :
(EvaluationLink
   (PredicateNode "eat") 
    (ListLink 
        (VariableNode "John") 
        (ConceptNode “apple")
 ) 


(EvaluationLink
   (PredicateNode "eat") 
    (ListLink 
        (VariableNode "Mary") 
        (ConceptNode “mango")
 ) 

But the "John.scm" appears to be somewhat different.  Is this file making sense?  or should i make my own script instead of ./cff-to-opencog.pl
This question may sound stupid. But may help beginners.

(I have attached scm, txt and xml file for reference)

Any guidelines would be very helpful.


Thanks in advance
Vishnu



John.scm
John.txt
John.xml

AmeBel

unread,
Aug 30, 2016, 10:18:29 PM8/30/16
to opencog
Hi,

Yes, John.scm makes sense. That is the relex output. If you want the pattern you described, then you need to use relex2logic. See http://wiki.opencog.org/wikihome/index.php/Running_Relex2Logic_with_OpenCog ?

you will get

 (EvaluationLink                                                      
   (PredicateNode "eats@120c7dae-5ae2-49f0-a50c-85cecfe1c104")        
   (ListLink                                                          
      (ConceptNode "John@edc25b98-bb81-4916-badd-fd06b829c3c0")       
      (ConceptNode "apple@4ade504b-c8f1-41be-bec6-0186f1e81103")      
   )                                                                  
which is not the fully abstracted(aka normalized) version.

vishnup...@gmail.com

unread,
Aug 31, 2016, 3:45:07 AM8/31/16
to opencog
Thanks for the reply AmeBel!!

Linas Vepstas

unread,
Aug 31, 2016, 2:35:43 PM8/31/16
to opencog
cff-to-opencog.pl only runs the relex stages of the NLP processing.  It has only one purpose in life: to be able to parse large wikipedia or other texts, and save them to a file, so that you do NOT have to re-parse them later on.

It probably does not make sense for you to mess with cff-to-opencog.pl, because, at this point in time, it probably does not make sense for you to try to create huge, giant batches of parsed text.

The cff-to-opencog.pl was orignally created to do corpus linguistics -- to build up giant databases of statistics on various linguistic phenomena.  Unless you are also doing this, its kind-of pointless to mess with it.

--linas



--
You received this message because you are subscribed to the Google Groups "opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opencog+unsubscribe@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/0804f639-b951-4421-be6d-c42dec3d1d51%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages