C
C
chelkaz2017-02-04 08:50:20
Web development
chelkaz, 2017-02-04 08:50:20

Are there ready-made classes for correcting punctuation and spelling.?

People often write randomly, it is not necessary to prohibit them and set up form validation, as this annoys them. But you need to check and clean after.
They often write like this:
------------ examples --------------

Всем прииииивет!!!!!! Подскажита КАААК? найти решение
ЗДРАСТВУЙТЕ.МНЕ ТОЖЕ ПОМОГИТЕ!!!!!
привет!!!почему не помогают

---------------------
It's elementary:
1) if there is a letter immediately after the dot, then add a space and capitalize the letter.
2) Remove double commas, questions, periods, spaces, and more.
3) Always capitalize at the beginning
4) Bring all capital letters to a natural look.
5) And in this spirit ...
Maybe there are ready-made solutions?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2017-02-04
@xmoonlight

In order of increasing complexity, each following item includes the previous one:
1. Regex-matching patterns and basic replacements.
2. Dictionary + fuzzy search
3. Rules of the Russian language + NS

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question