PHP script to change some text strings.
Input: a text file with letters, numbers, and punctuation, like the following:
Input text:
"shi4bu6shi4 bu6hao3? yi6ge5 ren2 yi6kuai4 qian2." yi6 san1 si4. bu6hao3yi4si5, wo3 bu6gan4 qu4. yi6bai3san1shi2, yi6wan2 jiu4 qu4. yi6yi4si4bai3wan4. bu6! yi6?
Desired output:
"shi4bu2shi4 bu4hao3? yi4ge5 ren2 yi2kuai4 qian2." yi1 san1 si4, bu4hao3yi4si5, wo3 bu2gan4 qu4, yi4bai3san1shi2, yi4wan2 jiu4 qu4, yi2yi4si4bai3wan4, bu4! yi1?
1. Read each word (always separated by spaces or punctuation marks)
2. Identify if the word contains the substring "bu6"
3. If it does, check if there is a number later in the string (numbers BEFORE do not matter; only the NEXT number matters. So for "bu4hao3", the number to find is "3"; in "bu4hao3yi4si5" only the "3" matters, not the later numbers).
4. If there is, check if the next number is 4.
5. If it is, change the original substring "bu6" to "bu2".
6. Otherwise, change the original substring "bu6" to "bu2". If "bu6" stands alone (spaces or punctuation on both sides), change it to "bu4".
7. Check each word to find the substring "yi6".
8. If "yi6" is the entire word (spaces or punctuation on both sides), change "yi6" to "yi1".
9. If "yi6" is part of a larger word, see which number it is followed by (again, only the NEXT number matters).
10. If the next number is 4 (example: yi6ban4), change "yi6" to "yi2".
11. If the next number is 1,2,3, or 5, change "yi6" to "yi4".
Ignore any number 7s in any position. They do not matter. Usually they would be deleted from the file before processing, but there is a chance they might not be.
Hello
I am ready to do this task right now. As i am new here so i have placed bid with low rate that doesn't mean i will compromise with work.
Please initiate to chat with me.
Thanks
Chirag
hi,
I am interested to develop a php script to change input text according to your given algorithm. Please see my profile and consider me to do this project.
Thanks
Prakash
Hi,
" I read your Work requirement Detail from Start to End .I understand that you want .I will be able to Work more quickly at $30 USD ".
I have already Developed Many such logic . I Have More than 3 Years of Work Experience in PHP/Mysql development field.
Invite me To discuss this
Hi,I am excited to take this project as it is little related one of my hobbies cryptography.
My skills PHP,MYSQL,BOOTSTRAP,JQUERY,CSS,HTML
Looking forward to your reply.
Hello my friend - can do it for you easily.
I am a php developer with many experience - Did many things like that over the years.
Would be great to work with you :)