Dictionary API or Library
Ruby-WordNet sounds like it does what you're looking for:
Ruby-WordNet is a Ruby interface to
the WordNet® Lexical Database. WordNet
is an online lexical reference system
whose design is inspired by current
psycholinguistic theories of human
lexical memory. English nouns, verbs,
adjectives and adverbs are organized
into synonym sets, each representing
one underlying lexical concept.
Different relations link the synonym
sets.
Python module with access to english dictionaries including definitions of words
Wordnik seems to have quite a nice API, and a nice-looking Python module too. It has definitions, example sentences, etc. so you should be covered. It does also have common words like "how", "should", and "could."
C++ dictionary API
You can use aonaware APIs. (http://services.aonaware.com/DictService/DictService.asmx). I dont know the cost though.
Dictionary API (lexical)
Grab the flat text file from an open source spellchecker like ASpell (http://aspell.net/) and load it into a List or whatever structure you like.
for example,
List<string> words = System.IO.File.ReadAllText("MyWords.txt").Split(new string[]{Environment.NewLine}).ToList();
// C# 3.0 (LINQ) example:
// get all words of length 5:
from word in words where word.length==5 select word
// get partial matches on "foo"
from word in words where word.Contains("foo") select word
// C# 2.0 example:
// get all words of length 5:
words.FindAll(delegate(string s) { return s.Length == 5; });
// get partial matches on "foo"
words.FindAll(delegate(string s) { return s.Contains("foo"); });
Related Topics
Zlib in Ruby to Uncompress .Gz
Override Ruby Constant in Subclass So Inherited Methods Use New Constant Instead of the Old
Ruby Backslash to Continue String on a New Line
Ruby: Split String at Character, Counting from the Right Side
Setter Method (Assignment) with Multiple Arguments
Problem with Quantifiers and Look-Behind
Ruby: Intersection Between Two Ranges
Ruby Gem Dependencies on Offline Server
How to Validate Xhtml with Nokogiri
Add Image to Layout in Ruby on Rails
Keep Getting Oauth::Unauthorized Error When Using Oauth and Twitter Ruby Gems
How to Integrate Paypal with Ruby on Rails
To Change Directory Inside a Ruby Script
Rails - Rspec - Difference Between "Let" and "Let!"
Rails 3.2 'Link_To' (In Email) with 'Method: :Put' Still Producing Get Request