package no.divvun.Analyzer.Client;

import java.io.*;

import no.divvun.Analyzer.Objects.*;
import no.divvun.Analyzer.Communication.*;

/**
 * This is the main interface, which clients use to send requests to the divvun
 * server. It covers all the basic functionality.
 * @author tomi
 */
public interface DivvunBasicServices {
	
	/**
	 * Initializes the server with correct parameters.
	 */
	public abstract void initServer(Parameters parameters);
	
	/**
	 * Disconnects from divvun server.
	 * @throws IOException
	 */
	public abstract void disconnect() throws IOException;
	
	/**
	 * Gets the analysis of word.
	 * @param word Word to be analyzed
	 * @return Analysis object, with analyze information.
	 */
	public abstract Analysis getAnalysis (String word);
	
	public abstract Generation generateWordform (String word);

//	public abstract Paradigm getReducedParadigm (String word, String POS);
	
//	public abstract Paradigm getStandardParadigm (String word, String POS);

	/**
	 * @param word Word to be inflected.
	 * @param POS Part of speech.
	 * @return Paradigm object, with information about inflection of the word.
	 */
	public abstract Paradigm getFullParadigm (String word, String POS);

// 1.
	public abstract String hyphenateWord (String word, String POS);

//	public abstract Disamb disambiguateText (String text);

//	public abstract SpellCheck spellCheckText (StringBuffer text);

//	public abstract SpellCheck spellCheckWord (String word);

    /**
     * Sends a user defined requst to the server.
     * @param request Request to be sent.
     * @return Response from the server.
     */
    public abstract Response sendRequest(Request request);
}
