LoadDataWorker

class LoadDataWorker : public QObject

Public Functions

explicit LoadDataWorker(QObject *parent = nullptr, Project *mProject = nullptr, QString mFilename = "", QString mFilename1 = "", map<string, string> *LSTM = nullptr, std::map<string, set<string>> *CPairs = nullptr, map<string, int> *Dict = nullptr, map<string, int> *GBook = nullptr, map<string, int> *IBook = nullptr, map<string, int> *PWords = nullptr, map<string, int> *ConfPmap = nullptr, vector<string> *vGBook = nullptr, vector<string> *vIBook = nullptr, trie *TDict = nullptr, trie *TGBook = nullptr, trie *TGBookP = nullptr, trie *TPWords = nullptr, trie *TPWordsP = nullptr, map<string, vector<int>> *synonym = nullptr, vector<vector<string>> *synrows = nullptr)

This is the constructor which initializes the objects needed to be shared between the main(GUI) thread and the another thread.

Parameters:
  • parent

  • mProject

  • mFilename

  • mFilename1

  • LSTM

  • CPairs

  • Dict

  • GBook

  • IBook

  • PWords

  • ConfPmap

  • vGBook

  • vIBook

  • TDict

  • TGBook

  • TGBookP

  • TPWords

  • TPWordsP

  • synonym

  • synrows

Public Slots

void LoadData()

This function calls specific functions to load specific data.

Private Functions

bool loadDict(Project &project)

The path of the dictionary file is fetched and the files are returned in the map these words are then fetched depending upon the word selected.

See also

loadMap()

Parameters:

project – current project file location

Returns:

If file was present or not

void on_actionLoadDict_triggered()

The path of the dictionary file is fetched and the files are returned in the map these words are then fetched depending upon the word selected.

See also

loadDict()

void on_actionLoadOCRWords_triggered()

Loads the OCR files The path of the GEROCR and IEROCR file is fetched and the files are returned in the map which is again, used as a suggestion depending upon the word selected.

See also

LoadMapNV()

void on_actionLoadDomain_triggered()

Loads the common OCR files.

The path of the PWords file is fetched and the files are returned in the map which can be used for the suggestion feature.

See also

loadMapPWords()

void on_actionLoadSubPS_triggered()

Load CPair files.

The path of the CPair files are fetched and the files are returned in the map which is returned to load the suggestions.

See also

loadmaptoTrie(), loadPwordsPatternstoTrie(), loadCPair()

void on_actionLoadConfusions_triggered()

Loads the confusions for CPair.