Ode Golf - Letter Deletions Given a dictionary file (a text file containing a word or phrase on each line, with possible punctuation but no numbers; lines are alphabetized), you must output each combination of words where one letter can be removed from a word to make another; the removed letter should be encased in parentheses.

For example, the input

cat
cart
code
golf
ode
verify
versify


should give an output of

ca(r)t
(c)ode
ver(s)ify


Multiple ways to get the same pair must only be displayed once. You can output scra(p)ped or scrap(p)ed, but not both.

The output should be ordered alphabetically by the longer entry;

mart
mar
mat
ma


should have an output of

ma(r)
ma(t)
ma(r)t
mar(t)


and the latter two could be in either order.

The dictionary file may include capitalizations, spaces, hyphens, or apostrophes; these should be ignored. For instance,

inlay 
in-play


should produce in(p)lay. Your output should all be in the same case. Extra whitespace is allowed.

Input can be STDIN or from a file; it is separated by newlines.
Output can be return value of a function or STDOUT (or written to a file if you wanted).

This is code-golf, so the shortest code in bytes wins.

(This is my first challenge on PPCG - let me know if I've done anything wrong and I'll fix it.)
JavaScript (ES6), 225

A function with a string parameter, no input from file. I asked OP if this could be valid.

Test running the snippet in an EcmaScript 6 compliant browser (implementing arrow functions, template string, spread operator - Firefox, maybe Safari or MS Edge, not Chrome)



f=t=&gt;t.split`
`.map(w=&gt;(d[k=w.replace(/\W/g,'').toLowerCase()]={},k),d={},r=[]).map(w=&gt;[...w].map((c,i,v)=&gt;(d[v[i]='',x=v.join``]&amp;&amp;!d[x][w]&amp;&amp;r.push(d[x][w]=(v[i]=`(${c})`,v.join``)),v[i]=c)))&amp;&amp;r.sort((a,b)=&gt;a.length-b.length)

// LESS GOLFED

Q=t=&gt;{
  // convert to canonical form and put in a dictionary
  // each value in the dictionary is an hashtable tha will store the list
  // of words that can generate the current word, removing a letter
  d={},
  t=t.split`\n`.map(w=&gt;(k=w.replace(/\W/g,'').toLowerCase(),d[k]={},k))
  r=[], // result array 
  t.forEach(w =&gt;
    [...w].forEach((c,i,v)=&gt;( // for each letter in word, try to remove
      v[i]='', x=v.join``, // build string with missing letter
      v[i]='('+c+')', y=v.join``, // and build string with brackets
      v[i]=c, // restore the current letter
      d[x] &amp;&amp; // if the word with removed letter is present in the dictionary
      !d[x][w] &amp;&amp; // and not already from the same generating word
         r.push(d[x][w]=y) // update dictionary and add word to result array
    ))
  )
  return r.sort((a,b)=&gt;a.length-b.length) // sort result by length
}  

// TEST
function test() { R.innerHTML=f(I.value) }
textarea { height: 20em }
Test &lt;button onclick="test()"&gt;-&gt;&lt;/button&gt;
&lt;span id=R&gt;&lt;/span&gt;
&lt;br&gt;&lt;textarea id=I&gt;cat
cart
code
golf
node
scraped
scrapped
verify
versify
mart
mar
mat
ma&lt;/textarea&gt;