text: const textLearn = `Labeling and tagging are carried out to perform functions such as aiding in classification, marking ownership, noting boundaries, and indicating online identity. They may take the form of words, images, or other identifying marks. An analogous example of tags in the physical world is museum object tagging. In the organization of information and objects, the use of textual keywords as part of identification and classification long predates computers. However, computer based searching made the use of keywords a rapid way of exploring records.
  
  
  A Description of the Equator and Some Otherlands, collaborative hypercinema portal, produced by documenta X, 1997. User upload page associating user contributed media with the term Tag.
  Online and Internet databases and early websites deployed them as a way for publishers to help users find content. In 1997, the collaborative portal "A Description of the Equator and Some Other Lands" produced by documenta X, Germany, coined the folksonomic term Tag for its co-authors and guest authors on its Upload page. In "The Equator" the term Tag for user-input was described as an abstract literal or keyword to aid the user. Turned out in Web 1.0 days, all "Otherlands" users defined singular Tags, and did not share Tags at that point.
  
  In 2003, the social bookmarking website Delicious provided a way for its users to add "tags" to their bookmarks (as a way to help find them later); Delicious also provided browseable aggregated views of the bookmarks of all users featuring a particular tag.[1] Flickr allowed its users to add their own text tags to each of their pictures, constructing flexible and easy metadata that made the pictures highly searchable.[2] The success of Flickr and the influence of Delicious popularized the concept,[3] and other social software websites – such as YouTube, Technorati, and Last.fm – also implemented tagging. Other traditional and web applications have incorporated the concept such as "Labels" in Gmail and the ability to add and edit tags in iTunes or Winamp.
  
  Tagging has gained wide popularity due to the growth of social networking, photography sharing and bookmarking sites. These sites allow users to create and manage labels (or “tags”) that categorize content using simple keywords. The use of keywords as part of an identification and classification system long predates computers. In the early days of the web keywords meta tags were used by web page designers to tell search engines what the web page was about. Today's tagging takes the meta keywords concept and re-uses it. The users add the tags. The tags are clearly visible, and are themselves links to other items that share that keyword tag.
  
  Knowledge tags are an extension of keyword tags. They were first used by Jumper 2.0, an open source Web 2.0 software platform released by Jumper Networks on 29 September 2008.[4] Jumper 2.0 was the first collaborative search engine platform to use a method of expanded tagging for knowledge capture.
  
  Websites that include tags often display collections of tags as tag clouds. A user's tags are useful both to them and to the larger community of the website's users.
  
  Tags may be a "bottom-up" type of classification, compared to hierarchies, which are "top-down". In a traditional hierarchical system (taxonomy), the designer sets out a limited number of terms to use for classification, and there is one correct way to classify each item. In a tagging system, there are an unlimited number of ways to classify an item, and there is no "wrong" choice. Instead of belonging to one category, an item may have several different tags. Some researchers and applications have experimented with combining structured hierarchy and "flat" tagging to aid in information retrieval.[5]
  
  Examples[edit]
  Within a blog[edit]
  Many blog systems allow authors to add free-form tags to a post, along with (or instead of) placing the post into categories. For example, a post may display that it has been tagged with baseball and tickets. Each of those tags is usually a web link leading to an index page listing all of the posts associated with that tag. The blog may have a sidebar listing all the tags in use on that blog, with each tag leading to an index page. To reclassify a post, an author edits its list of tags. All connections between posts are automatically tracked and updated by the blog software; there is no need to relocate the page within a complex hierarchy of categories.
  
  For an event[edit]
  An official tag is a keyword adopted by events and conferences for participants to use in their web publications, such as blog entries, photos of the event, and presentation slides. Search engines can then index them to make relevant materials related to the event searchable in a uniform way. In this case, the tag is part of a controlled vocabulary.
  
  In research[edit]
  A researcher may work with a large collection of items (e.g. press quotes, a bibliography, images) in digital form. If he/she wishes to associate each with a small number of themes (e.g. to chapters of a book, or to sub-themes of the overall subject), then a group of tags for these themes can be attached to each of the items in the larger collection. In this way, free form classification allows the author to manage what would otherwise be unwieldy amounts of information. Commercial, as well as some free computer applications are readily available to do this.
  
  Special types[edit]
  Triple tags[edit]
  See also: Microformat
  A triple tag or machine tag uses a special syntax to define extra semantic information about the tag, making it easier or more meaningful for interpretation by a computer program. Triple tags comprise three parts: a namespace, a predicate, and a value. For example, "geo:long=50.123456" is a tag for the geographical longitude coordinate whose value is 50.123456. This triple structure is similar to the Resource Description Framework model for information.
  
  The triple tag format was first devised for geolicious[6] in November 2004, to map Delicious bookmarks, and gained wider acceptance after its adoption by Mappr and GeoBloggers[7] to map Flickr photos. In January 2007, Aaron Straup Cope at Flickr introduced the term machine tag as an alternative name for the triple tag, adding some questions and answers on purpose, syntax, and use.[8]
  
  Specialized metadata for geographical identification is known as geotagging; machine tags are also used for other purposes, such as identifying photos taken at a specific event or naming species using binomial nomenclature.[9]
  
  Hashtags[edit]
  Main article: Hashtag
  A hashtag is a kind of metadata tag marked by the prefix #, sometimes known as a "hash" symbol. This form of tagging is used on microblogging and social networking services such as Twitter, Facebook, Google+, VK and Instagram.
  
  Knowledge tags[edit]
  A knowledge tag is a type of meta-information that describes or defines some aspect of an information resource (such as a document, digital image, relational table, or web page). Knowledge tags are more than traditional non-hierarchical keywords or terms. They are a type of metadata that captures knowledge in the form of descriptions, categorizations, classifications, semantics, comments, notes, annotations, hyperdata, hyperlinks, or references that are collected in tag profiles. These tag profiles reference an information resource that resides in a distributed, and often heterogeneous, storage repository. Knowledge tags are a knowledge management discipline that leverages Enterprise 2.0 methodologies for users to capture insights, expertise, attributes, dependencies, or relationships associated with a data resource. It generally allows greater flexibility than other knowledge management classification systems.
  
  Capturing knowledge in tags takes many different forms, there is factual knowledge (that found in books and data), conceptual knowledge (found in perspectives and concepts), expectational knowledge (needed to make judgments and hypothesis), and methodological knowledge (derived from reasoning and strategies).[10] These forms of knowledge often exist outside the data itself and are derived from personal experience, insight, or expertise.
  
  Knowledge tags, in fact, manifest themselves in any number of ways – conceptual knowledge tags describe procedures, lessons learned, and facts that are related to the information resource. Tacit knowledge tags, manifests itself through skills, habits or learning by doing and represent experience or organizational intelligence. Anecdotal knowledge, is a memory of a particular case or event that may not surface without context.[11]
  
  Knowledge can best be defined as information possessed in the mind of an individual: it is personalized or subjective information related to facts, procedures, concepts, interpretations, ideas, observations and judgments (which may or may not be unique, useful, accurate, or structurable). Knowledge tags are considered an expansion of the information itself that adds additional value, context, and meaning to the information. Knowledge tags are valuable for preserving organizational intelligence that is often lost due to turn-over, for sharing knowledge stored in the minds of individuals that is typically isolated and unharnessed by the organization, and for connecting knowledge that is often lost or disconnected from an information resource.[12]
  
  Advantages and disadvantages[edit]
  
  This article contains a pro and con list, which is sometimes inappropriate. Please help improve it by integrating both sides into a more neutral presentation, or remove this template if you feel that such a list is appropriate for this article. (November 2012)
  In a typical tagging system, there is no explicit information about the meaning or semantics of each tag, and a user can apply new tags to an item as easily as applying older tags. Hierarchical classification systems can be slow to change, and are rooted in the culture and era that created them.[13] The flexibility of tagging allows users to classify their collections of items in the ways that they find useful, but the personalized variety of terms can present challenges when searching and browsing.
  
  When users can freely choose tags (creating a folksonomy, as opposed to selecting terms from a controlled vocabulary), the resulting metadata can include homonyms (the same tags used with different meanings) and synonyms (multiple tags for the same concept), which may lead to inappropriate connections between items and inefficient searches for information about a subject.[14] For example, the tag "orange" may refer to the fruit or the color, and items related to a version of the Linux kernel may be tagged "Linux", "kernel", "Penguin", "software", or a variety of other terms. Users can also choose tags that are different inflections of words (such as singular and plural),[15] which can contribute to navigation difficulties if the system does not include stemming of tags when searching or browsing. Larger-scale folksonomies address some of the problems of tagging, in that users of tagging systems tend to notice the current use of "tag terms" within these systems, and thus use existing tags in order to easily form connections to related items. In this way, folksonomies collectively develop a partial set of tagging conventions.
  
  Complex system dynamics[edit]
  Despite the apparent lack of control, research has shown that a simple form of shared vocabularies emerges in social bookmarking systems. Collaborative tagging exhibits a form of complex systems dynamics,[16] (or self organizing dynamics). Thus, even if no central controlled vocabulary constrains the actions of individual users, the distribution of tags that describe different resources (e.g., websites) converges over time to stable power law distributions.[16] Once such stable distributions form, simple vocabularies can be extracted by examining the correlations that form between different tags. This informal collaborative system of tag creation and management has been called a folksonomy.
  
  Spamming[edit]
  Tagging systems open to the public are also open to tag spam, in which people apply an excessive number of tags or unrelated tags to an item (such as a YouTube video) in order to attract viewers. This abuse can be mitigated using human or statistical identification of spam items.[17] The number of tags allowed may also be limited to reduce spam.
  
  Syntax[edit]
  Some tagging systems provide a single text box to enter tags, so to be able to tokenize the string, a separator must be used. Two popular separators are the space character and the comma. To enable the use of separators in the tags, a system may allow for higher-level separators (such as quotation marks) or escape characters. Systems can avoid the use of separators by allowing only one tag to be added to each input widget at a time, although this makes adding multiple tags more time-consuming.
  
  A syntax for use within HTML is to use the rel-tag microformat which uses the rel attribute with value "tag" (i.e., rel="tag") to indicate that the linked-to page acts as a tag for the current context.[18]`;
  
  const textValidate = `    In information systems, a tag is a non-hierarchical keyword or term assigned to a piece of information (such as an Internet bookmark, digital image, or computer file). This kind of metadata helps describe an item and allows it to be found again by browsing or searching. Tags are generally chosen informally and personally by the item's creator or by its viewer, depending on the system.
  
  Tagging was popularized by websites associated with Web 2.0 and is an important feature of many Web 2.0 services. It is now also part of some desktop software.`;
  
  const Tagger = require('../tagger.js');
  
  Tagger.configurations.trainingDocuments = [textLearn];
  let tags = Tagger.invokeTagger(textValidate);
  let expected = ["assigned", "helps", "informally", "popularized", "important", "services", "desktop"];
  
  assertTest1 = true;
  if(tags.length != expected.length) {
    assertTest1 = false;
  }
  for(let i = 0; i < tags.length; ++i) {
    if(tags[i] != expected[i]) {
      assertTest1 = false;
    }
  }
  
  if(!assertTest1){
    console.log("Tests failed");
    console.log("Tags resulted were: ", tags);
    console.log("Tags expected were", expected);
    alert("Tests failed");
  } else {
    console.log("Tests have passed");
  }
  