Expand
Minimize

Sample Dictionary Service Client Application

A sample command line application, illustrating how to call the DictService Dictionary Web Service from C# is available for download.

DictServiceSample.zip (42KB)

Source code suitable for use with Microsoft Visual Studio 2008 is included

Application Usage

Usage: DictServiceSample.exe <subcommand> [args]

Possible subcommands:

dictionarylist
Show a list of all available dictionaries
define word [/dict:dictionary]
Define the word, optionally showing results for the specified dictionary only
serverinfo
display remote server information
dictionaryinfo dictionary
display detailed dictionary information
strategylist
show a list of all available strategies for matching words
match word strategy [/dict:dictionary]
show all word matches using the given strategy, optionally showing results for the specified dictionary only

Common subcommands:

/proxy:value
/proxyusername:value
/proxypassword:value
/proxydomain:value
Set proxy URL and optional authentication methods, for when behind a corporate firewall

Examples:

  • Give all definitions of hello from all dictionaries
              DictServiceSample.exe define hello
              From The Collaborative International Dictionary of English v.0.48:
              Hello \Hel*lo"\, interj. & n.
              An exclamation used as a greeting, to call attention, as an
              exclamation of surprise, or to encourage one. This variant of
              ...
            
  • Show dictionary list
              DictServiceSample.exe dictionarylist
              gcide : The Collaborative International Dictionary of English v.0.48
              wn : WordNet (r) 2.0
              moby-thes : Moby Thesaurus II by Grady Ward, 1.0
              elements : Elements database 20001107
              ...
            
  • Get detailed dictionary information
              DictServiceSample.exe dictionaryinfo wn
              ============ wn ============
              00-database-info
              This file was converted from the original database on:
              ...
            
  • Show the list of matching strategies
              DictServiceSample.exe strategylist
              exact : Match headwords exactly
              prefix : Match prefixes
              ...
            
  • Match ‘for’ using the prefix strategy, and limit results to the WordNet dictionary
              DictServiceSample.exe match for prefix /dict:wn
              wn : for 24 hours
              wn : for a bargain price
              ...
            

©2011 Contact