I imagine that this is just a simple o(1) lookup (Set and WeakMap in Javascript for example), and that it should be sufficiently fast to do this in real time even with many 1000’s of files, especially if you limit it to only work with words that has been completed.