gather and learn unknown words

maybe i’m in the wrong place for my question. But sometimes i would like to add some “misspelled” or better, unknown expressions to the spellchecker on my mac.
In an automated way, obviously.

I mean, tracking down unknown words in a document and adding these to the main dictionary to use with the text suite application spellcheckers. Is it possible or not ?


Here i wrote a simple service script, which i think, is nicely useful and isn’t connected with my question above.
Its task is collects unknown words for later reviewing: you’ve to highlight a word in a document and to choose the appropriate service menu entry.
would be nice to add the translation in a 2nd column in the output text (using tab)

on run {input, parameters}
	set theWord to input as text
	tell application "Dictionary"
		activate
		open location "dict://" & (theWord as string) with error reporting
	end tell
	--save vocables
	my write_voc(input)
	return input
end run

on write_voc(input)
	set the write_abc to ((path to documents folder) & "Wortschatz.txt" as text)
	try
		open for access file the write_abc with write permission
		write (input & tab & return as Unicode text) to file the write_abc starting at eof
		close access file the write_abc
	on error
		try
			close access file the write_abc
		end try
	end try
end write_voc