Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
SRLanguageModeler ƒ/LMSample.h
// LMSample.h |
#define kPersonVerbNounPath 500 |
#define kMattPallakoff 1100 |
#define kBrentSchorsch 1101 |
#define kArloReeves 1102 |
#define kCoded 1200 |
#define kCrashed 1201 |
#define kDebugged 1202 |
#define kAllNight 1300 |
#define kTheExtension 1301 |
#define kHisEasterEgg 1302 |
// remember [the phrase] means "optional" so is equivalent to: (the phrase) {kSROptional=true} |
// remember [the phrase]* means "0 or more" so is equivalent to: (the phrase) {kSROptional=true; kSRRepeatable=true} |
// remember [the phrase]+ means "1 or more" so is equivalent to: (the phrase) {kSRRepeatable=true} |
/* |
<TopLM> = <Person Name> <verb> <noun> {kPersonVerbNounPath}; // set the refcon of the path to kPersonVerbNounPath |
<Person Name> = Matt [Pallakoff] {kMattPallakoff} | // set the refcon of the path to kMattPallakoff |
Brent [Schorsch]{kBrentSchorsch} | // set the refcon of the path to kBrentSchorsch |
Arlo [Reeves] {kArloReeves}; // set the refcon of the path to kArloReeves |
<verb> = coded [and coded] {kCoded} | // you can say "coded" OR "coded and coded" |
crashed [and crashed]* {kCrashed} | // you can say "crashed" PLUS "and crashed" zero or more times |
debugged [and debugged]+ {kDebugged}; // you can say "debuged" PLUS "and debugged" one or more times |
<noun> = all night {kAllNight} | |
the extension {kTheExtension} | |
his [massive]* easter egg {kHisEasterEgg}; |
*/ |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14