staticSearch icon indicating copy to clipboard operation
staticSearch copied to clipboard

Make phrasal matching case-insensitive

Open martindholmes opened this issue 9 months ago • 7 comments

The Moses project team have requested that phrasal matching be made case-insensitive. I believe this could be done with a single change to what is currently line 2032 of StaticSearch.js:

//Make the phrase into a regex for matching.
      let re = new RegExp(strRe);

becomes

//Make the phrase into a regex for matching.
      let re = new RegExp(strRe, "i");

I think this is a good idea, and I see no reason not to do it, although it may involve some fallout for tests, which might perhaps retrieve more hits for specific test phrases. @joeytakeda Do you agree we should just implement this for version 2.0 assuming there are no gotchas when we try it?

martindholmes avatar May 16 '24 20:05 martindholmes