$r = 'https://api.textgain.com/1/age?q=lets+roll&key=***';
$r = file_get_contents($r);
$r = json_decode($r);
Age prediction estimates whether a text is written by an adolescent or an adult. Online, adolescents use more informal language, including abbreviated utterances (omg, wow) and mood (awesome, lame). Adolescents tend to talk about school, parents, and partying. Adults tend talk about work, children, health, and use more complex sentence structures.
Gender prediction estimates whether a text is written by a man or a woman. Statistically, women tend to talk more about people and relationships (family, friends), while men are more interested in objects and things (e.g., cars, games). As a result, women will use more personal pronouns (I, you, we) in a social context and men will use more determiners (a, an, the) and more quantifiers (one, many).
Gender tagging provides for each word in a text a
neutral tag. These tags are estimated on observed language usage by male and female writers. Gender tagging differs from gender prediction, in that it indicates which words the respective genders have been observed to use more in writing, as opposed to measuring typical male vs female writing style.
Education prediction estimates whether a text displays basic or advanced writing skills. Statistically, people with higher education will use more formal language and use more punctuation marks (, ; :), correct spelling and capitalization, longer words and sentences and less emoji (cf. idk lol just talkin ☺☺☺).
Personality prediction estimates whether a text is written by an extraverted or an introverted person. Extraverts tend to be more sociable, assertive and playful, while introverts are more solitary, reserved and shy. As a result, extraverts will use we more often, and more positive adjectives and less formal language. Introverts will use I more often, and they employ a broader vocabulary.
Sentiment analysis predicts whether a text is objective (fact) or subjective (opinion). Subjective text contains adverbs and adjectives with a positive or negative ‘polarity’ that capture the author’s personal opinion (e.g., an excellent opportunity or a bad product).
Sentiment tagging provides for each token in a text a sentiment score, expressing its polarity. Unlike sentiment analysis, it is not sensitive to more complex linguistic patterns, such as negation and modality, you can use this as an alternate way of calculating the overall sentiment or to extract subjective terms in your document.
Concept extraction identifies keywords, key phrases and ‘named entities’ – names of persons, products, organizations, locations, dates, and so on. Keywords are nouns that appear more often in a text, and often at the start of a text. Named entities frequently start with a capital letter (e.g., Barack Obama). Concept extraction can be used to summarize a text, or to compare if two texts discuss similar topics for example.
Geocoding looks for place names in a text (in any language) and returns a list of possible locations, along with their longitude and latitude and country of origin. Note that the results are exhaustive! For example, Berlin, Germany as well as Berlin in Colombia (Berlín) will be returned. The results are sorted according to population size (if known).
A simple translation engine that finds English translations for words in a text. This is word-based translation model and should not be considered as a machine translation solution.
Lemmatization involves the morphological analysis of words to reduce them to their dictionary form (lemma). It is more powerful than stemming, which simply strips morphological prefixes, rather than taking into account a word's part-of-speech and allomorphic transformations. For example, "bathing" would be stemmed to "bath", but would be lemmatized as "bathe".
Part-of-speech tagging identifies sentence breaks and word types. Words have different roles depending on how they are used. For example, the word shop can be a noun (a shop, object) or a verb (to shop, action).
The use of the passive voice helps you to draw attention away from the agent of the action. Stylistically, however, it is often frowned upon, because it reduces readability. This classifier identifies the verbs involved in the passive voice of a sentence.
Syllable Counts / Hyphenation
Readability metrics often rely on syllable counts. Hyphenation and syllabification go hand in hand. This classifier outputs hyphenation patterns and syllable counts. It is fairly robust to noisy language (see example *awsome).
Language identification detects the language a text is written in. Different languages use different characters. For example, Russian (Кирилица), Chinese (汉字) and Arabic (العربية) are easy to distinguish. Languages that use the same characters (e.g., Latin alphabet, abc) often have cues that set them apart (e.g., é ↔ ë).