packages feed

thimk-0.3: thimk-makedb.hs

--- Spelling word suggestion tool
--- Copyright © 2008 Bart Massey
--- ALL RIGHTS RESERVED

--- This software is licensed under the "3-clause ('new')
--- BSD License".  Please see the file COPYING provided with
--- this distribution for license terms.

--- Create the phonetic code database optionally used by "thimk"

import Text.PhoneticCode.Soundex
import Text.PhoneticCode.Phonix

import System.Console.ParseArgs

import PCDB

data ArgIndex = ArgDict
                deriving (Eq, Ord, Show)

argd = [ Arg { argIndex = ArgDict,
               argName = Nothing,
               argAbbr = Nothing,
               argData = argDataDefaulted "path"
                                          ArgtypeString
                                          defaultDictionaryForDB,
               argDesc = "Dictionary file to index" } ]

main = do
  args <- parseArgsIO ArgsComplete argd
  createDB (getRequiredArg args ArgDict)