\chapter{Web Service Access to SuperMatrix}

\section{Usage Scenarios and Functionality}

\subsection{Examples of Usage Scenarios}

\note{Those usage scenario were created by computer scientist, so they should be overviewed by domain expert!} 

\begin{enumerate}
	\item Linguistic research: are words related to each others?
	\item Marketing research: what words describes some product?
	\item Social sciences: what words are related to a given set of flag words (collective symbols) in a given set of
	newspaper articles?
	\item Historical studies: given two corpora from different time period how different are the word usages?
	\item Automatically generation of distributional thesaurus from given corpus.
	\item Duplicated documents detection in some corpus.
	\item Naive plagiarism detection.
	\item Clustering of documents.
\end{enumerate}

\subsubsection{Linguistic Research}

A linguist is working on a dictionary or thesaurus. One of the problem that she needs to solve is to find what are the
relations between words. It would be helpful if there would exist a tool, that could suggest words that are related to
the word that the linguist is working on. Providing such list could increase the dictionary coverage without increasing
the time needed for manually searching corpora for examples of words usages. On the other hand, even for more obvious
connections between words, the words-similarity-list could speed-up the process of dictionary construction.

\subsubsection{Marketing Research}

A company has recently introduced a new product. Marketing department is investigating press reviews and opinion
expressed by bloggers in a search how the product is perceived. The first step of their work is to gather the corpus for
research. They want to have a dataset that is as large as possible, for the analysis to be as representative as
possible. With the increased number of documents the feasibility of manual inspection is slim.  One of the thing that is
helpful in those studies could be finding features of a product. Another thing that could be helpful is finding how
is perception of this product  similar to other products in the same market segment.

\note{Features can be here adjectives that describe the product name (word) as discovered during the matrix creation and
the weighted to remove accidental noise.}

\subsection{Data Access Functionality}

\begin{enumerate}
	\item Importing matrix to ws.
	\item Exporting matrix from ws.
	\item Importing corpus to ws. (Poliqarp, XML KIPI and untagged for Polish; plain text for English or any other
	language for simple co-occurrence matrices; MiniPar processing of English if license will be ok; or maybe in form of
	dependency triples?)
	\item Removing (owned) corpus from ws.
\end{enumerate}

\subsection{Operation on Matrices}

\begin{enumerate}
	\item Creation of co-occurrence matrix using given JOSKIPI operator and selected corpus.
	\item Weighting matrix.
	\item Viewing parts of the matrix. 
	\item Joining (summing) of matrices.
	\item Filtering of row (columns) of matrices. (incl. Feature selection)
	\item Generating statistics for matrices.
	\item Performing of SVD.
\end{enumerate}

\subsection{Measure Of Semantic Relatedness}

\begin{enumerate}
	\item Generating similarity lists (k-best) list using predefined MSRs.
	\item Performing Latent Semantic Analysis (LSA).
	\item Hyperspace Analogue to Language (HAL).
	\item Assembling own MSR out of standard components.
	\item Creation of similarity matrix.
	\item (E)WBST tests based on plWordNet.
	\item (E)WBST tests based on WordNet.
\end{enumerate}

\subsection{Other}

\begin{enumerate}
	\item Testing of JOSKIPI operators: basically jtester via w-s.
	\item Clustering of words. (can we use CLUTO?)
	\item Labeling of document clusters.
	\item Tracking progress of SuperMatrix operations.
	\item Generating statistics for corpora.
	\item Generating usage statistics.
	\item Generating KlasHyp data
	\item AAA algorithm for plWordNet?
\end{enumerate}

\section{Design Goals and Assumptions}

Assumptions:
\begin{enumerate}
	\item Majority of operations require lots of computational power and memory.
	\item Operations require of transfer of huge amount of data (in gigabytes).
\end{enumerate}

Thus:
\begin{enumerate}
	\item The SuperMatrix Web Service will need large amount of disk space available.
	\item The SuperMatrix Web Service will need computing cluster with many nodes to be usable.
	\item There is a need for controlling access to both language and computational resources.
\end{enumerate}

Questions:
\begin{enumerate}
	\item can we use CLUTO or only algorithms that are implemented in SuperMatrix?
\end{enumerate}

\section{Architecture}

\section{API documentation}

\subsection{Data Inspection}

\subsection{Semantic Similarity}

\textbf{Similarity}\emph{(lemma1, lemma2, matrix, simfunction)} --- returns similarity between two lemmas using
specified similarity function on selected matrix.

\begin{table}[ht]
\centering
\begin{tabular}{|l|l|l|}
\hline
\textbf{Argument} &  \textbf{Type} & \textbf{Comment}    \\
\hline
lemma1       & string     & First lemma for counting similarity   \\
lemma1       & string     & Second lemma for counting similarity  \\
matrix       & string     & Matrix identifier                     \\
simfunction  & string     & String defining similarity function   \\
\hline
\end{tabular}
\end{table}


\section{Usage Examples}


