• palordrolap@kbin.run
      link
      fedilink
      arrow-up
      7
      ·
      edit-2
      6 months ago

      [I have told this story elsewhere before]

      I thought I was so clever once. I taught a word filter about “th” thinking that would solve the problem, but it still got stuck on Scunthorpe. mfw.

      Had to step through what it was doing. It had hit a rule that treated ‘oo’ the same as ‘u’ which, at least sound-wise, is valid for some words in some dialects. e.g. Consider “book”, which is identical to “buck” for many people. You can imagine why that might want to be caught.

      To save you the head scratching, it had spotted the ‘c’ then a double-‘o’ then the ‘n’ and threw it out as containing a known racial slur.

      The filter was for a random string generator so that it wouldn’t generate strings with bad words in them. Seemed like a good idea at the time.

      Since it was unlikely that it was going to generate “Scunthorpe” anyway, the problem remained unfixed.