The Rules Autotag module takes a light-weight approach for autotagging full-text content by matching taxonomy terms (and optional Synonyms). Rules Autotag depends on the Rules module. Functionality is provided on different layers:

  1. The API function rules_autotag_extract($text, $vocabulary) extracts terms from a given text which match a given vocabulary.
  2. The basic rules action Extract terms (rules_autotag_extract_action) takes a text and a vocabulary as input and returns all matched terms.
  3. The wrapper rules action set Autotag to terms list (rules_autotag_tag) directly stores the extracted terms into a terms list/field.

Comparison to related modules:

  • Taxonomy Autotagger takes a more user-oriented approach with by providing a AHAH-driven Autotag button.
  • Auto Tagging sends node content through any number of third party services to determine what the content is about.

Exemplary Usage Instructions:

  1. Install Rules & Rules Autotag modules
  2. Configuration - Workflows - Add new reaction rule
  3. React on an event (example: Node - Before saving content)
  4. Add condition - Entity has field
    • Entity - Data selector: node
    • Field - Value: your_tags_field
  5. Add action set: Autotag to terms list
    • The text for extracting terms - Data selector: node:body:value
    • The vocabulary used for extraction - Choose from the select list
    • Target list for storing extracted terms - Data selector: node:your_tags_field

You can extract from multiple text fields within a single step as follows. At the text for extracting terms, select "Switch to direct input mode" and use for example "[node:title] [node:body]".

Taking the same approach, you might use Rules Autotag in order to filter arbitrary input tags (for example imported using Feeds) to your own, filtered taxonomy. In order to make this work you will need the patch for #1058856: Entity tokens not created for multi-value fields.

This project is sponsored by epiqo. Visit us at or contact us.

Project information