dbpedia-spotlight/dbpedia-spotlight — pull request #284 by tgalery (2014-04-08 17:05:58+00:00)
Title: Fixes issue 

This PR attempts to fix issue https://github.com/dbpedia-spotlight/dbpedia-spotlight/issues/272 . We try to normalise irregular spacing, if we can't find a corresponding SF. If we find a good uppercase candidate, we return that, otherwise we proceed to the lowercase map as usual.

At the moment, tests are failing (namely `loweCaseWhiteSpaceTest` in the SurfaceFormStore test) due to something I don't quite understand in the code. The SF store has a map between lowercase strings and an array of ids corresponding to the entities that it might refer to. In the example, I mock the map to have the only one association, i.e. `"barack obama" => [0]`. However, the if clause in [this function](https://github.com/dbpedia-spotlight/dbpedia-spotlight/blob/master/core/src/main/scala/org/dbpedia/spotlight/db/memory/MemorySurfaceFormStore.scala#L102) assumes that the array contains more than one entity. Not sure why that is, so I could either remove the test or change that if statement.

Also, some tokenizer tests were added, not sure whether they correspond to what's intuitive.