Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
A natural language understanding system for English
|Type||Name||Latest commit message||Commit time|
|Failed to load latest commit information.|
**************** * Introduction * **************** Sparser is a architecture for analyzing English text. It handles text of any length and employs a fast, efficient, constant-time algorithm designed for use with semantic grammars. Sparser can use context-free and context-sensitive semantic grammar phrase-structure rules, along with syntactic rules that check for valid semantic relations before they complete. It provides hooks for regular-expression analysis, multi-words, and arbitrary state-based analyses. It has a rich representation of the structure of documents. Sparser comes 'out of the box' with just a minimal grammar of function words and access to grammar modules that have been developed for core notions like amounts and time, names and numbers. Several sublanguages have been extensively developed in conjunction with particular research projects including person-company-title, biology, and blocks world. The modules that make up the sublanguages under active development are grouped into predefined configurations described below in the 'configuration' section. There is extensive documentation for Sparser included with the code base. We regularly extend this documentation, especially with 'notes' that provide a guide that is very close to the implemenation. Sparser is written in Lisp, and until we restore some form of the interactive workbench it had on earlier versions of the Mac, extending Sparser's abilities and understanding its operation requires you to have a working knowledge of Lisp and are comforable reading code. The core set of Lisp-calls you need to explore what Sparser does are described below. ************************* * How to install & run * * Version of 5/23/16 * ************************* Thank you for downloading Sparser. This short guide will help you get everything up & running in no time. Installation & Setup ==================== After cloning Sparser, the toplevel of the sparser directory tree will have four immediate subdirectories: "Mumble", "Sparser", "util", and "test", as well as this README file, the LICENSE file, and the "sparser.asd" file which contains the Sparser ASDF system definitions for different configurations of the grammar, semantics, and runtime behavior. Loading Sparser ==================== You need to have a modern implementation of Common Lisp already installed. Sparser runs in SBCL (sbcl.org), Clozure (www.clozure.com) and Allegro (www.franz.com). We develop primarily on Intel-based Macs under OS X and Unix using SBCL almost exclusively. Sparser has been used with Windows in the past. Now that we are using ASDF for toplevel loading and Lisp pathnames for handling file compilation and module loading we don't expect that working in Windows would be problem, but as of this writing we have not actually tested it. 1. Setup ASDF You need is to have ASDF loaded and Sparser's location included in its source registry so that ASDF can locate the .asd file. This example assumes that your local copy of Sparser is at toplevel in your home directory (~/sparser/). (require :asdf) (asdf:initialize-source-registry '(:source-registry (:tree (:home "sparser")) :inherit-configuration)) That specification never changes so we include it as part of our Lisp init files. 1. Start Lisp. 2. Load Sparser using ASDF; e.g., run (asdf:load-system :sparser). 3. Switch over to the Sparser namespace by executing (in-package :sparser). 4. Test that Sparser is working properly & that it can parse a simple phrase. Execute (p "10 hours."). Note that right now you need to include the period. Your output should look something like this: ==================== ? (p "10 hours.") [10 hours] source-start e3 AMOUNT-OF-TIME 1 "10 hours" 3 period end-of-source :done-printing ==================== If so, congratulations -- Sparser is working. Look at the documentation in ~/sparser/Sparser/documentation/ to see how you can start writing your own grammars.