public class Data
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Data.VahovaciMetody |
Modifier and Type | Method and Description |
---|---|
void |
clean()
Clean all classes.
|
java.io.File |
getCentraShluku()
Gets the centers of all clusters in a form of file.
|
java.io.File |
getDataFile()
Gets the folder, in which input data are stored.
|
java.util.List<Dokument> |
getDokumenty()
Gets the list of documents.
|
static Data |
getInstance()
Gets the instance of this class.
|
java.util.HashMap<java.lang.String,java.lang.Integer> |
getKategorie()
Gets the hash map with a list of categories.
|
java.util.Collection<java.lang.String> |
getKategorieList()
Gets the list of all categories.
|
double |
getKonstanta()
Gets the value of constant.
|
int |
getMaximalneTermu()
Gets the value of maximum count of terms.
|
int |
getPocetTrid()
Gets the value of class count.
|
java.util.HashMap<java.lang.String,SlovoSuma> |
getSlovaDokumenty()
Gets the hash map of words assigned to a document.
|
java.util.Collection<SlovoSuma> |
getSlovaDokumentyKolekce()
Gets the collection of all documents.
|
java.io.File |
getStopListFile()
Returns a stop words file.
|
java.util.HashMap<java.lang.String,java.lang.Boolean> |
getStopSlova()
Gets the hash map containing the stop words.
|
Data.VahovaciMetody |
getVahovani()
Gets the actual weighting method to be used.
|
boolean |
isAplikovatStemming()
Gets the value of option, if the application will apply a stemming
algorithm.
|
boolean |
isAplikovatStopList()
Gets the value of option, if the application will use a stoplist.
|
boolean |
isMazatCisla()
Gets the value of option, if the application will remove digits from
document representation.
|
boolean |
isMazatTermyJednohoDokumentu()
Gets the value of option, if the application will remove terms
contained in only one document.
|
void |
opravPoImportu()
Correcting data after import.
|
void |
pripravNaExport()
Preparation for export - conversion of hash structures into collections.
|
void |
reInit()
Clearing of all collections.
|
void |
setAplikovatStemming(boolean aplikovatStemming)
Setting the option, if the application will apply a stemming algorithm.
|
void |
setAplikovatStopList(boolean aplikovatStopList)
Setting the option, if the application will use a stoplist.
|
void |
setCentraShluku(java.io.File centraShluku)
Setting the cluster centers from a file.
|
void |
setDataDirString(java.lang.String jmeno)
Setting the file folder and file validity test.
|
void |
setDataFile(java.io.File dataDir)
Setting of a folder, in which input data are contained.
|
void |
setDokumenty(java.util.List<Dokument> dokumenty)
Setting the list of documents.
|
void |
setKategorie(java.util.HashMap<java.lang.String,java.lang.Integer> kategorie)
Setting the categories from an input hash map.
|
void |
setKategorieList(java.util.Collection<java.lang.String> kategorieList)
Setting the list of all categories.
|
void |
setKonstanta(double konstanta)
Setting of the constant.
|
void |
setMaximaleTermu(int maximalniPocetTermu)
Setting the maximum count of terms.
|
void |
setMazatCisla(boolean mazatCisla)
Setting the option, if the application will remove digits from document
representation.
|
void |
setMazatTermyJednohoDokumentu(boolean mazatTermyJednohoDokumentu)
Setting the option, if the application will remove terms contained in only
one document.
|
void |
setPocetTrid(int pocetTrid)
Setting the value of the count of classes.
|
void |
setSlovaDokumenty(java.util.HashMap<java.lang.String,SlovoSuma> slovaDokumenty)
Setting the words assigned for a document.
|
void |
setSlovaDokumentyKolekce(java.util.Collection<SlovoSuma> slovaDokumentyKolekce)
Setting the collection of words in documents.
|
void |
setStopListFile(java.io.File stopListFile)
Sets a stop words file.
|
void |
setStopListString(java.lang.String jmeno)
Sets a stoplist file from the file name given as a parameter.
|
void |
setStopSlova(java.util.HashMap<java.lang.String,java.lang.Boolean> stopSlova)
Setting the contents of stoplist.
|
void |
setTestStopListFile(java.io.File stopListFile)
Sets a stop words file and runs the test of it.
|
void |
setVahovani(Data.VahovaciMetody vahovani)
Setting the actual weighting method to be used.
|
void |
testDataDir(java.io.File jmeno)
Tests the correctness of input data file.
|
void |
testStopListFile(java.io.File jmeno)
test of a stoplist file, eventually an exception is created.
|
public void pripravNaExport()
public void opravPoImportu() throws java.lang.Exception
java.lang.Exception
public double getKonstanta()
public void setKonstanta(double konstanta)
konstanta
- value of the constantpublic int getMaximalneTermu()
public void setMaximaleTermu(int maximalniPocetTermu)
maximalniPocetTermu
- maximum count of termspublic java.util.Collection<java.lang.String> getKategorieList()
public void setKategorieList(java.util.Collection<java.lang.String> kategorieList)
kategorieList
- list of categoriespublic java.util.HashMap<java.lang.String,java.lang.Integer> getKategorie()
public void setKategorie(java.util.HashMap<java.lang.String,java.lang.Integer> kategorie)
kategorie
- an input hash mappublic java.io.File getCentraShluku()
public void setCentraShluku(java.io.File centraShluku)
centraShluku
- file with cluster centerspublic int getPocetTrid()
public void setPocetTrid(int pocetTrid)
pocetTrid
- count of classespublic java.util.Collection<SlovoSuma> getSlovaDokumentyKolekce()
public void setSlovaDokumentyKolekce(java.util.Collection<SlovoSuma> slovaDokumentyKolekce)
slovaDokumentyKolekce
- collection of words in documentspublic boolean isMazatTermyJednohoDokumentu()
public void setMazatTermyJednohoDokumentu(boolean mazatTermyJednohoDokumentu)
mazatTermyJednohoDokumentu
- boolean valuepublic Data.VahovaciMetody getVahovani()
public void setVahovani(Data.VahovaciMetody vahovani)
vahovani
- a weighting methodpublic java.util.HashMap<java.lang.String,SlovoSuma> getSlovaDokumenty()
public void setSlovaDokumenty(java.util.HashMap<java.lang.String,SlovoSuma> slovaDokumenty)
slovaDokumenty
- a hash map of words in a documentpublic boolean isMazatCisla()
public void setMazatCisla(boolean mazatCisla)
mazatCisla
- boolean valuepublic boolean isAplikovatStemming()
public void setAplikovatStemming(boolean aplikovatStemming)
aplikovatStemming
- boolean valuepublic boolean isAplikovatStopList()
public void setAplikovatStopList(boolean aplikovatStopList)
aplikovatStopList
- boolean valuepublic java.util.HashMap<java.lang.String,java.lang.Boolean> getStopSlova()
public void setStopSlova(java.util.HashMap<java.lang.String,java.lang.Boolean> stopSlova)
stopSlova
- a hash map of stop wordspublic static Data getInstance()
public java.util.List<Dokument> getDokumenty()
public void setDokumenty(java.util.List<Dokument> dokumenty)
dokumenty
- a list of documentspublic java.io.File getDataFile()
public void setDataFile(java.io.File dataDir) throws java.lang.Exception
dataDir
- a folderjava.lang.Exception
public void clean()
public void setDataDirString(java.lang.String jmeno) throws java.lang.Exception
jmeno
- file namejava.lang.Exception
public void testDataDir(java.io.File jmeno) throws java.lang.Exception
jmeno
- input data filejava.lang.Exception
public java.io.File getStopListFile()
public void setStopListFile(java.io.File stopListFile) throws java.lang.Exception
stopListFile
- file with a stoplist.java.lang.Exception
public void setTestStopListFile(java.io.File stopListFile) throws java.lang.Exception
stopListFile
- file with a stoplist.java.lang.Exception
public void setStopListString(java.lang.String jmeno) throws java.lang.Exception
jmeno
- file name of stoplist filejava.lang.Exception
public void testStopListFile(java.io.File jmeno) throws java.lang.Exception
jmeno
- file name of a stoplist filejava.lang.Exception
public void reInit()