|
|
|
Topicalizer cannot only be used via the main website, but by an API as well. There are currently five methods: 1.) http://www.topicalizer.com/getCompleteAnalysis/ This method provides you with the complete analysis that is also rendered if using the main website, the only difference being that the results are not shown in XHTML, but as an XML data structure. 2.) http://www.topicalizer.com/getKeywords/ This method returns just the keywords and single word frequencies for a site, again as an XML data structure. 3.) http://www.topicalizer.com/getAugmentedKeywords/ This method returns the keywords of a sentence or phrase (you could possibly also enter longer texts, but the generated results would most probably be too large to make sense) and their hyponyms, hypernyms and synonyms as an XML data structure. Unlike method 1.) and 2.), this method is only available for English 4.) http://www.topicalizer.com/getCoOccurrences/ This method returns the most likely co-occurrences for the keywords of a sentence or phrase (the same remark as for 3.) regarding larger texts applies here as well), this method also is only available for (American) English. 5.) http://www.topicalizer.com/getSemWeb/ This method returns a web of related terms for a given term by making use of the Google API and Wikipedia. This feature currently is only available for English terms. Method 1.) and 2.) both take two arguments, method 3.) only takes the plainText argument: 1.) url or plainText You can either enter a URL or a plain text to be analysed, likewise as on the main website. However, you should make sure, that when using the plainText option you either access the method by POST (which is the preferred way anyway, since GET does only support arguments up to a length of 255 characters) or you URL-escape the text before sending it to this method. 2.) language This should be the language of the document behind the URL or the text you gave as the first argument. The specification of the document / text language is used for appropriately selecting some language parameters like stop words and syllable structures. You can also set this argument to 'automatic', which will invoke an automatic language recognition. However, you might run into trouble when using this feature, if either the text is too short or if it contains several languages in approximately equal shares. This argument can have any of the following values: automatic english german french dutch spanish italian russian danish norwegian portuguese swedish Method 4.) takes the following two arguments: 1.) plainText You can enter a plain text to be analysed here. However, you should make sure, that you either access the method by POST (which is the preferred way anyway, since GET does only support arguments up to a length of 255 characters) or you URL-escape the text before sending it to this method. 2.) textCategory This should be the rough text category the text to be analysed belongs to. This argument can have any of the following values, the categories are taken from the Brown Corpus of Present-Day Edited American English, which is used to calculate the results for this method. The descriptions of the respective text category are given in brackets: a (Press: Reportage) b (Press: Editorial) c (Press: Reviews) d (Religion) e (Skill and Hobbies) f (Popular Lore) g (Belles-Lettres) h (Miscellaneous: Government & House Organs) j (Learned) k (Fiction: General) l (Fiction: Mystery) m (Fiction: Science) n (Fiction: Adventure) p (Fiction: Romance) r (Humour) Method 5.) takes one argument: 1.) term This should be the term to create a web of related terms for. Usage examples: http://www.topicalizer.com/getCompleteAnalysis/?url=http://www.turbogears.org/&language=english http://www.topicalizer.com/getKeywords/?url=http://www.turbogears.org/&language=automatic http://www.topicalizer.com/getAugmentedKeywords/?plainText=This is is just a test http://www.topicalizer.com/getCoOccurrences/?plainText=This is is just a test&textCategory=a http://www.topicalizer.com/getSemWeb/?term=Semantic Web |