Extensions

Plugins

Annotation Pro enables easy and efficient extensions of the built-in functionality by means of plugins. In this section we will publish some of the plugins. Further below you can also find some help on how to create a plugin of your own, and a link to Annotation Pro API.

In order to use any of the Annotation Pro plugins it is sufficient to save the plugin to the ‘Plugins’ folder in the ‘Annotation Pro’ folder on your disk (the plugins below are zipped, so after saving them you also need to unzip them). Then the plugin’s name becomes visible in the Plugins menu in your Annotation Pro programme (you might need to press ‘Refresh’ in order to update the display of the menu list). The plugins can be used for a single annotation file or for a number of files selected in the programme’s workspace (choose “Workspace Mode” for using a plugin with multiple files selected in your workspace).

Segmentation Modules

Segmentation Modules are similar to Plugins. They allow for the extension of applications, but operate only in Auto Segmentation.

These modules enable the division of annotations into segments or the insertion of new segments based on audio. They can be any external applications capable of handling input data provided by the Auto Segmentation module and delivering output data in the appropriate format.

Configuring an external tool involves preparing a suitable configuration file, which contains information on how to invoke the external tool to ensure compatibility with Annotation Pro and the external batch tool.

Free Plugins

The plugins enlisted in the table below are displayed in your Annotation Pro “Plugins” menu. To load them and use with your data, go to the Plugins menu, open the Plugins Manager, click the plugin you desire to use, and then click Download. As a result, the plugin will be shown in the Plugins menu and you can apply it to your files. If you wish to edit a plugin, use the Plugin Manager again or open the plugin .CS file with any text editor on your disk.

Plugin nameDescriptionDetailsDownload
Edit – Clear labels for segments in a layerClears all annotation labels for segments in the selected layer. The layer name can be specified in the plugin code. By default the name “Layer1” is used. After running the plugin all segments in the layer will be empty.Read more...Download
Statistics – Annotation Pro + TGACalculates TGA values. Based on the TGA idea and on-line tool solution by Dafydd Gibbon. Update: enables file collections processing (Workspace Mode)Read more...Download
Statistics – Segment Rate Moving Average (SRMA)Calculates segment rate using moving average methodRead more...Download
Statistics – nPVI moving average (nPVIMA)Computes nPVI (Normalized Pairwise Variability Index)Read more...Download
Statistics – Segment Rate in a LayerCalculates the segments rate within an annotation layer (in segments per second)Read more...Download
Statistics – Duration QuadrantsCalculates z-scored durations of consecutive segments within an annotation layer and plots results as proposed by Petra WagnerRead more...Download
Feature space analysis – Assign labels to polygon areasAssigns text labels to polygon areas in the picture used as the graphical representation of the feature space in perception-based annotation or testsRead more...Download
Export -Export selected layers to CSVExports selected layers (specified by ‘layerNames’) from one file or file collection (Workspace Mode) to a CSV file. Download
Export – Export selected layers as TextGridsExports selected layers (specified by ‘layerNames’) to TextGrid (Praat) format. Download
Edit – Remove pausesRemoves segments (specified by ‘pausePattern’) from one or more files (Workspace Mode)Read more...Download
Edit – Find & ReplaceReplaces one string by another or removes a string from (a collection of) annotations. (Workspace Mode)Read more...Download
Edit – Remove empty segmentsRemoves segments that do not include any label from (a collection of) annotations. (Workspace Mode)Read more...Download
Edit – Sort layersSorts layers in given orderDownload
Export Workspace with Complex ParametersExport Workspace items (only given layer) with complex parameter (…+…+…) to one big CSVDownload

How to write my own plugin

In order to create a plugin you do not need any expensive tools. Plugins should be created in C# programming language. To edit a plugin it is sufficient to use a simplest notepad software or any other programme supporting edition of C# files; e.g., Visula Studio Code, Notepad 2 or Notepad++ software which offer options for displaying syntax in colours or line numbering. You can also download a freeware version of Visual Studio – Visual Studio Express that offers even more support for writing in C#. Visual Studio Website.

using System;
using System.Windows.Forms;
using AnnotationPro.Plugin;
using AnnotationPro.Logic;
using AnnotationPro.Presentation;

namespace AnnotationPro.Plugin
{
  public class AnnotationPlugin : IAnnotationPlugin
  {
    public void Run( AnnotationEditor editor )
    {
      // BEGIN USER CODE

      editor.Cursor = Cursors.WaitCursor;

      MessageBox.Show("Hello World! I'm in 'Documents\\Annotation Pro\\Plugins' folder.","Annotation Pro Plugin");

      editor.Cursor = Cursors.Default;

      // END USER CODE
    }
  }
}
  1. Copy the file above and save it as: Examples#HelloWorld.cs
  2. Store it to the folder: Dokumenty\Annotation Pro\Plugins
  3. Run it in Annotation Pro here: Plugins -> Examples -> HelloWorld. If you cannot see plugin name in the menu, press: Plugins -> Refresh.
  4. Open file: Examples#HelloWorld.cs in Notepad or other editor and look at its content.

Also, a plugin editor window with some additional tips and support is available inside Annotation Pro. You can access the editor from the menu Plugins -> Open Plugins Manager -> Create New…

Grouping plugins

When the number of your plugins becomes too high and it is not comfortable to display them in one list you can group them in the Plugins . The character #  in the name of your plugin indicates dividing the name of the group from the name of the specific plugin. The part of the name to the left from # is the group name. The group will be automatically created in the menu when you start the programme.

Annotation Pro API

Application Pramming Interface is a detailed description of classes and functions available for the creators of plugins. You can check the detail parameters of functions or methods of clasess.

Annotation Pro API

More about plugins & other plugin scripts

More details about the API, Annotation Pro plugin architecture, example use cases, some programming guidelines, and sample plugin scripts can be found in: Klessa, K. (2016). Speech Annotation Mining with Annotation Pro plugins, Wydawnictwo Rys, Poznań. ISBN 978-83-65483-20-1 (download the plugin listings described in the book).

Sharing plugins & cooperation

In case if you wish to share your plugin by publishing it on this website, please contact Kasia Klessa at katarzyna@klessa.pl, we will add your plugin description to the list, cite your reference(s), and publish a download link. In case if you have an idea for a new plugin but you are not sure how to create  it – you are also welcome to get in touch at the same address, we’ll be happy to try and help!

 

Comments are closed.