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
Code documentation can be found here on github pages.
The color analysis aims to get the dominant color for each emoji. It does that by using dither
command in imageMagick
utility.
The usage analysis calculates the usage of each emoji in twitter. The numbers are read and parsed from emojitracker.com.
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.
When exporting to OWL, EmojiOntology applies an additional level of categories on the emoji annotations.
Exports the emoji meta-data to CSV file.
Exports the emoji ontology to OWL/XML format.
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.
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.swift
: Class responsible to parse and enrich the emoji annotations with additional structural levels.
EmojiColorAnalyser.swift
: Class responsible to analyze the colors of an emoji.
EmojiDrawer.swift
: Class responsible to draw an emoji to an image.
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).
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.
EmojiReader.swift
: Class responsible for reading the emoji Unicode CSV and parse it to annotations and emojis
CSVConvertible.swift
: Protocol to convert objects to CSV.
CSVGenerator.swift
: Class responsible to generate a CSV string.
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.
Annotation.swift
: Annotation class representing an emoji annotation (face, eyes, mouth, etc..).
Emoji.swift
: Emoji class representing an emoji.