Monrai Blog

News about Cypher, Semantic Web, Natural Language Processing, and Computational Linguistics

Thursday, August 10, 2006

Release 0.7.0

A new release of Cypher is available. This is a feature enhancement release. Now Cypher can generate the integer representation of any arbitrary natural language number:

Version 0.7.0

Enhancements: from 0.6.9

-- added new NumberTranscoder_LITERAL; allows natural language numbers to generate integer representation, the integer is wrapped in RDF literals of type xsd:nonNegativeInteger and xsd:NegativeInteger, making it consumable for semantic web applications.

-- added new number pattern grammar example to exploit number transcoder

There are also a couple of new grammar definition files which cover natural language numbers in English e.g. Five hundred twenty eight million five. But extending them to cover numbers in other languages shouldn't be a problem. The extended example dataset covers numbers up to tresrigintillion (10^102 I think, but correct me if I'm wrong). Sense so many people have been waiting for an online demo, I plan to set up the number transcoder as an intermediate online demo, especially since the input set in this case is finite.

I will post a more detailed explanation of the new dataset most likely in an article to be posted on the main Monrai website. In the meantime, try starting Cypher and entering: Your Name is some long number, for example Chris is twenty two thousand forty nine. Then look at the output file. There should be a owl:sameAs triple near the top, and one object should be the number you said. The BE verb is set to output an owl:sameAs triple, but you can easily change it to set the subject's age ( e.g. myonto:age). Also, conjunctions are not covered by the number patterns I wrote, so nine hundred and two won't match, but nine hundred two will match. I leave as an exercises for the user, the task of extending the example number pattern grammar to cover conjunctions.

Natural language numbers are normally spoken as opposed to written/typed, so speech recognition systems are probably a more appropriate usecase for this dataset.

Have fun!

2 Comments:

Blogger Sherman Monroe said...

The output below was generated by Cypher for the input: Tom is seventeen billion two hundred thirty eight million five hundred twenty nine thousand four hundred five

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:dc10="http://purl.org/rss/1.0/#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema-datatypes#"
xmlns:demo="http://monrai.com/ns/demo#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:dc11="http://purl.org/rss/1.1/#"
xmlns:mso="http://mso.monrai.com#">
<!-- This scheme was generated by FrameFactory.transferSyntaxOutputResults()
Date: Thu Aug 10 17:36:04 CDT 2006
User: smonroe
Base URL: http://mso.monrai.com# -->
<rdf:Description rdf:about="http://mso.monrai.com#TJeffreyHanks-Actor">
rdf:datatype="http://www.w3.org/2001/XMLSchema-datatypes#nonNegativeInteger">
17238529405</owl:sameAs>
</rdf:Description><rdf:Description
rdf:about="http://mso.monrai.com#triple10000051155249364515">
<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"/>
<rdfs:label>Be (owl:sameAs Triples)</rdfs:label>
<rdf:subject rdf:resource="http://mso.monrai.com#TJeffreyHanks-Actor"/>
<rdf:predicate rdf:resource="http://www.w3.org/2002/07/owl#sameAs"/>
<rdf:object
rdf:datatype="xsd#nonNegativeInteger">17238529405
</rdf:object>

</rdf:Description><rdf:Description
rdf:about="http://mso.monrai.com#TJeffreyHanks-Actor">
<owl:sameAs rdf:resource="http://mso.monrai.com#TJeffreyHanks-Actor"/>
<rdfs:label xml:lang="en">Tom</rdfs:label>
</rdf:Description><rdf:Description
rdf:about="http://mso.monrai.com#triple10000051155249364515">
<owl:sameAs rdf:resource="http://mso.monrai.com#triple10000051155249364515"/>
<rdfs:label xml:lang="en">Tom is seventeen billion two hundred thirty eight million five
hundred twenty nine thousand four hundred five</rdfs:label>
</rdf:Description></rdf:RDF>

Try testing it for yourself.

5:52 PM  
Blogger Sherman Monroe said...

Here is an application at Standford which does integer to English number. The default package only goes as high as 99. However, I been hard pressed to find software which does it in reverse, natural language number to integer.

6:05 AM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home