   if !opts.compare then error "no compare propery provided"
   if !opts.to then error "no to propery provided"
 
-  src = opts.compare || ""
-  cmp = opts.to || ""
-  ngram_type = "list" # or "tree"
+  src = get_data opts.stringCompare, (opts.compare || "")
+  cmp = get_data opts.stringCompare, (opts.to || "")
   algorithm = opts.algorithm || "jaccard"
   language = opts.language || "js"
   compare = algorithms[algorithm].compare


  switch language
    when "js"
      src_t = js.normalize js.tokenize determine src
      cmp_t = js.normalize js.tokenize determine cmp
    when "coffee"
      src_t = coffee.normalize coffee.tokenize determine src
      cmp_t = coffee.normalize coffee.tokenize determine cmp

  a = generate_ngrams src_t, n_start, n_end
  b = generate_ngrams cmp_t, n_start, n_end

  tanimoto: require "./similar/tanimoto"
  experimental: require "./similar/experimental"

get_data = (is_string, value) ->
  if is_string then value
  else fs.readFileSync value, "utf-8"

generate_ngrams = (arr, start = 1, end = arr.length) ->
  if end > arr.length
