Скрипт, который разделит фразы на группы PHP\bash
Есть файл с фразами:
home business ideas telugu
home business ideas toronto
home business ideas uae
home business ideas urdu
home business ideas usa
home business ideas using intern
acn home based business
acn home based business opportunity
acn home based business opportunity presentation
acn home based business review
acn home based business reviews
acn home based business scam
acn home business opportunity
acn home business opportunity review
acn home business reviews
add back business use home
Требуется скрипт, который разделит фразы по группам и перенесет фразы - каждую в свой файл. Если фраз меньше, чем 5 = то в файл Other.txt.
В настройках скрипта указываем группы до скольки слов могут быть.
Пример (указываем, что группа не больше 3х слов ):
Группы будут определены, как:
acn home based.txt
acn home business.txt
Other.txt
=[acn] [home] [based]= [business]
=[acn] [home] [based]= [business] [opportunity]
=[acn] [home] [based]= [business] [opportunity presentation]
=[acn] [home] [based]= [business] [review]
=[acn] [home] [based]= [business] [reviews]
=[acn] [home] [based]= [business] [scam]
=[acn] [home] [business]= [opportunity]
=[acn] [home] [business]= [opportunity review]
=[acn] [home] [business]= [reviews]
=[acn] [home] [business]= [reviews] [online]
=[acn] [home] [business]= [reviews] [online] [usa]
[add] [back] [business] [use] [home]