patrickschur/language-detection: A language detection library for #PHP. Detects the language from a given text string.
▻https://github.com/patrickschur/language-detection
This library can detect the language of a given text string. It can parse given training text in many different idioms into a sequence of #N-grams and builds a database file in JSON format to be used in the detection phase. Then it can take a given text and detect its language using the database previously generated in the training phase. The library comes with text samples used for training and detecting text in 106 languages.