Skip to content

miserman/adicat

Repository files navigation

adicat

A JavaScript library for simple text processing: as-needed dictionary-based categorization

resources

highlighter

The highlighter is meant to help manipulate texts, and assess dictionaries.

features

  • See which words are being captured by dictionary categories.
    • Toggle categories in the dictionary menu.
    • Set to display counts or percentages in the settings menu.
  • Calculate composite categories for, and similarities between texts.
    • Composite categories can be added and edited in the dictionary's load/create/edit menu.
    • Set a stored text for comparison in the saved texts menu.
    • Set the comparison categories and metric in the settings menu.
  • Create or import, edit, and export dictionaries.
    • Cycle between stored dictionaries in the dictionary's load/create/edit menu.
  • Download the results of text files scored by the selected dictionary.
    • Drag and drop a text file anywhere on the page, or navigate to the process file menu.
    • Specify output values, categories, composites, and comparisons in the other menus.
    • Specify formatting and splitting in the process file menu.

example texts

The example texts in the menu are from a series of studies: osf.io/963gp. These involved manipulating texts in terms of a few function-word categories, which was the original motivation for the highlighter.

chat

The chat prototype is a simple, cue-based chat bot for illustration.

You can chat with the bot, and edit its response set to the included set of cues.

import scripts

the core script is always required

<script type='text/javascript' src='https://miserman.github.io/adicat/core.min.js'></script>

the highlight and chat scripts add to the Adicat object

<script type='text/javascript' src='https://miserman.github.io/adicat/highlight.min.js'></script>
<script type='text/javascript' src='https://miserman.github.io/adicat/chat.min.js'></script>

See the introduction for complete implementation examples.