coldtrick / autotag Goto Github PK
View Code? Open in Web Editor NEWAutomatically tags blog's, forum topics and pages
Automatically tags blog's, forum topics and pages
INSTALLATION ========================== Put it into the mod directory and enable it under Tool Administration HOW TO USE (METHOD 1) ========================== The (auto)tagging is provided by means of a hook and is typically invoked as follows. $tags = trigger_plugin_hook('autotag_kea', 'kea', $params); The associative array $params is used to provide the input text $params['text'] = $text (a string) and several settings; $params[<setting-string>] = <setting>, where <setting-string> can be: - 'langID' : The language to use; e.g. 'en' for English. - 'weightArray' : The 3 weights for single words and 2 and 3 word combinations; e.g. array(1, 2, 3). - 'maxReturn' : The maximum number of tags to return; e.g. 5. - 'minFreq' : The minimum number of times a word is mentioned in the input text to be returned as tag; e.g. 2. - 'minWordLen' : All words smaller in length than this value are filtered out; e.g. 2 The found tags are returned as an associative array where every tag is associated with its score. The score of a tag (a word or word combination) is calculated with the following formula. score[tag] = freq[tag] * weight[tag] with - freq[tag] : The number of times the tag was found in the input text. - weight[tag] : The weight depending on whether tag is a single word or 2 or 3 word combination. HOW TO USE (METHOD 2) ========================== The class used by the hook mentioned above is KEA (Keyword Extractor Algorithm), which you can alternatively directly use in your PHP-code. After instantiation ($kea = new KEA()), use the following methods to provide the several settings mentioned in the previous section. - $kea->set_langID() - $kea->set_weightArray() - $kea->set_maxReturn() - $kea->set_minFreq() - $kes->set_minWordLen() KEA has one main method Autotag() which expects the input text/string as its sole argument and returns the tags-array described under "METHOD 1". PRECONFIGURED APPLICATIONS ========================== As an application of these tagging routines the autotag hook is used in three Elgg mods (blog, groups(forum) and pages) to augment the existing tagging in these mods.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.