Skip to content

nsomar/EmojiOntology

Repository files navigation

Emoji Ontology



Emoji ontology is a mac application that analyses emojis.

EmojiOntology adds the following meta-ata to emojis:

  • Color analysis
  • Usage number analysis
  • Sentiment analysis
  • Additional emoji annotation categories


It then converts the analysis to the following:

  • CSV format
  • OWL/XML ontology format

Documentation

Code documentation can be found here on github pages.


Analyzing emojis

Color analysis

The color analysis aims to get the dominant color for each emoji. It does that by using dither command in imageMagick utility.

Usage analysis

The usage analysis calculates the usage of each emoji in twitter. The numbers are read and parsed from emojitracker.com.

Sentiment analysis

The sentiment analysis aim to provide the sentiment for each emoji. The sentiment is calculated by analyzing the number of occurrence an emoji has been used in a negative, positive and neutral contexts.

Emoji annotations additional categories

When exporting to OWL, EmojiOntology applies an additional level of categories on the emoji annotations.


Exporting analysis

Exporting to CSV

Exports the emoji meta-data to CSV file.

Exporting to OWL/XML

Exports the emoji ontology to OWL/XML format.


Resources

This is a list of files and what they represent

Annotation Categories.csv: This file contains the annotation additional categories, these categories help giving the emoji another depth in the ontology structure.

AnnotationCategories.xml: File containing a template OWL/XML file for all the additional category subclassing information.

FinalEmoji.owl: Final emoji ontology in OWL/XML format.

Emoji.owl: Emoji OWL main file template. This file contains placeholder string markers that EmojiOntology app fills when generating the final emoji.

EmojiColor.plist: Mac property list (mac dictionary) file that contains a hash map dictionary, with emoji as key and emoji dominant color as value.

EmojiFull.csv: CSV file containing a list of emoji and all the meta-data available for each emoji.

EmojiUses.plist: Mac property list (mac dictionary) file that contains a hash map dictionary, with emoji as key and emoji twitter usage numbers as value.

Sentiment.csv: CSV file containing the emoji base unicode information.


Notable Classes

The following is a rundown of the classes used in the application.

Note: The complete code documentation can be found here on github pages.

AdditionalCategories

AdditionalCategories.swift: Class responsible to parse and enrich the emoji annotations with additional structural levels.

Colors

EmojiColorAnalyser.swift: Class responsible to analyze the colors of an emoji.

EmojiDrawer.swift: Class responsible to draw an emoji to an image.

Sentiment

SentimentAnalyzer.swift: Singleton to access the SentimentAnalyzer.

SentimentItem.swift: Sentiment item containing all info about an emoji sentiment.

StreamReader.swift: Read a file as a stream (buffered reading).

Usage Numbers

EmojiUsageAnalyser.swift: Class responsible for analysing the emoji usage.

WebViewLoader.swift: This class starts a web kit view in the background and uses mac javascript bridge to read values from the loaded webpage dom.

Emoji Reader

EmojiReader.swift: Class responsible for reading the emoji Unicode CSV and parse it to annotations and emojis

CSV Generation

CSVConvertible.swift: Protocol to convert objects to CSV.

CSVGenerator.swift: Class responsible to generate a CSV string.

OWL Generation

OWLConvertible.swift: Protocol defining the requirements for an object to be convertible to OWL.

OWLGenerator.swift: Generates an OWL file with the Emoji info.

OWLNamer.swift: Class responsible to sanitize a string to be usable as an OWL entity name.

Models

Annotation.swift: Annotation class representing an emoji annotation (face, eyes, mouth, etc..).

Emoji.swift: Emoji class representing an emoji.

About

Emoji ontology project for UCD

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published