Share via


Custom Input Scopes with Regular Expression

Custom Input Scopes with Regular Expression

Introduction to custom input scopes.

You can define custom input scopes by using language models composed of regular expressions for handwriting and assigning them to fields.

For example, if you are creating a database application for warehouse parts and wish users to be able to enter part numbers using the Tablet PC Input Panel's writing pad. If the part number syntax consists of three letters followed by four numbers followed by another letter (for example, ABC1234D the handwriting recognizer would have a difficult time recognizing such input because it is not defined in the language model. There is no pre-defined factoid that corresponds to such syntax, nor can Microsoft® include the syntax for every possible field an application might need. Handwriting regular expressions provide an easy way for applications to define their own language model for a particular special-use field.

When using the InputScope APIs or the Context Tagging Tool, you may not create Input Scopes with regular expressions that include the version 1 factoids. You must use the new input scopes enumerated values for this purpose. Also, when working in an ink-enabled application that uses the RecognizerContext's Factoid property, you may not use version 1 factoids in a regular expression.