How to filter chat messages by normalizing letter shapes?

I filter chat messages in the chat system, where it is desirable to bind strings to Latin-1 English. Users tend to use creative input, for example.

ßòógΔ«Δ›Β§ 

instead

 Boogies 

In Java, there are Unicode normalization methods that can remove diacritics, but I'm more interested in normalizing letter forms in English and the Latin-1 character set.

Are there any tables, libraries, or methods that can display common Unicode characters outside Latin-1 in their nearest forms visually? For instance.

 ß -> B Β§ -> S Β₯ -> Y Β€ -> o 

I suspect the answer is "No, that would be too big, just filter them all out," but I can hope ...

+4
source share
2 answers

I think it’s best to use the OCR engine (Optical Character Recognition). In the end, this is exactly what you need: it is best to parse the letters into readable AZ characters. (Remember to print chat messages on the image using the same font as in your chat client.)

Two Java-OCR libraries:

+1
source

The right decision is not to install idiotic "profanity filters" (which, I believe, is behind this request). If the community cannot behave independently in this regard, mitigate it manually and ban criminals or shut it down. To deal with the Scunthorpe problem, it offends your users far more than some cursing children.

0
source

All Articles