
I need someone to code a short program for use on a Mac OS X (Leopard) that, in essence, takes as input a file containing a list of English words, and produces as output a file containing the words plus definitions, as extracted from any good dictionary. Though Haskell might not be the ideal language for this project, the utility is almost trivial, I'm a fan of Haskell, and would like to support the community. Those interested should email me at rj248842@hotmail.com. The specs are: 1. Takes as input a .txt file containing lines delimited by newline characters, with each line containing either no characters, an English word or phrase, or a comment (denoted by, for example, "--"). Thus, the input file might look like: -- Comment 1frustum bon mot -- Comment 2octagon rectangle 2. Produces as output a file (.txt, .rtf, or .docx format) containing the comments, the words or phrases (in bold), and their definitions, using either the dictionary (New Oxford American Dictionary, "NOAD") bundled with OS X or some credible online dictionary (such as merriam-webster.com) for words whose definitions aren't found in the NOAD. For example, given the above input file, the output file would be: -- Comment 1frustum |ˈfrəstəm| noun ( pl. -ta |-tə| or -tums ) Geometry the portion of a cone or pyramid that remains after its upper part has been cut off by a plane parallel to its base, or that is intercepted between two such planes. ORIGIN mid 17th cent.: from Latin, ‘piece cut off.’ bon mot |ˈbän ˈmō; ˌbô n ˈmō| noun ( pl. bons mots pronunc. same or |ˈmōz|) a witty remark. ORIGIN mid 18th cent.: French, literally ‘good word.’ -- Comment 2 octagon |ˈäktəˌgän; -gən| noun a plane figure with eight straight sides and eight angles. • an object or building with a plan or cross section of this shape. DERIVATIVES octagonal |äkˈtagənl| |ɑkˈtøgənl| |-ˈtag(ə)n(ə)l| adjective octagonally |äkˈtagənəlē| |ɑkˈtøgənəli| |ɑkˈtøgənli| |-ˈtag(ə)n(ə)li| adverbORIGIN late 16th cent.: via Latin from Greek octagōnos ‘eight-angled.’ rectangle |ˈrekˌta ng gəl|noun a plane figure with four straight sides and four right angles, esp. one with unequal adjacent sides, in contrast to a square. ORIGIN late 16th cent.: from medieval Latin rectangulum, from late Latin rectiangulum, based on Latin rectus ‘straight’ + angulus ‘an angle.’ I've attached a (zipped) AppleScript--it's just a few lines--and Automator workflow that work ok using Automator's "Get Definition of a Word" action. It took about fifteen minutes to write, but for some reason, that action doesn't extract the entire definition from the dictionary. If it would save time, you could work off of that code and deliver an AppleScript solution, or you could write Haskell code. _________________________________________________________________ Rediscover Hotmail®: Now available on your iPhone or BlackBerry http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Mob...