Skip to content

Commit c81df8f

Browse files
author
Olcay Taner YILDIZ
committed
Updated treebank construction from folder.
1 parent ccd6898 commit c81df8f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+169
-60
lines changed

CorpusGenerator/NERCorpusGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
* @param directory Directory where the treebank files reside.
1313
* @param pattern Pattern of the tree files to be included in the treebank. Use "." for all files.
1414
*/
15-
NERCorpusGenerator::NERCorpusGenerator(const string &folder, const string &fileList) {
16-
treeBank = new TreeBankDrawable(folder, fileList);
15+
NERCorpusGenerator::NERCorpusGenerator(const string &folder) {
16+
treeBank = new TreeBankDrawable(folder);
1717
}
1818

1919
NERCorpusGenerator::~NERCorpusGenerator() {

CorpusGenerator/NERCorpusGenerator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class NERCorpusGenerator {
1414
TreeBankDrawable* treeBank;
1515
public:
1616
~NERCorpusGenerator();
17-
NERCorpusGenerator(const string& folder, const string& fileList);
17+
explicit NERCorpusGenerator(const string& folder);
1818
NERCorpus* generate();
1919
};
2020

CorpusGenerator/SentenceDisambiguationCorpusGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* @param folder Directory where the sentence files reside.
1515
* @param filelist File list.
1616
*/
17-
SentenceDisambiguationCorpusGenerator::SentenceDisambiguationCorpusGenerator(const string &folder, const string &fileList) {
18-
annotatedCorpus = new AnnotatedCorpus(folder, fileList);
17+
SentenceDisambiguationCorpusGenerator::SentenceDisambiguationCorpusGenerator(const string &folder) {
18+
annotatedCorpus = new AnnotatedCorpus(folder);
1919
}
2020

2121
SentenceDisambiguationCorpusGenerator::~SentenceDisambiguationCorpusGenerator() {

CorpusGenerator/SentenceDisambiguationCorpusGenerator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class SentenceDisambiguationCorpusGenerator {
1414
AnnotatedCorpus* annotatedCorpus;
1515
public:
1616
~SentenceDisambiguationCorpusGenerator();
17-
SentenceDisambiguationCorpusGenerator(const string& folder, const string& fileList);
17+
explicit SentenceDisambiguationCorpusGenerator(const string& folder);
1818
DisambiguationCorpus* generate();
1919
};
2020

CorpusGenerator/TreeDisambiguationCorpusGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* @param folder Directory where the treebank files reside.
1515
* @param filelist File list.
1616
*/
17-
TreeDisambiguationCorpusGenerator::TreeDisambiguationCorpusGenerator(const string &folder, const string &fileList) {
18-
treeBank = new TreeBankDrawable(folder, fileList);
17+
TreeDisambiguationCorpusGenerator::TreeDisambiguationCorpusGenerator(const string &folder) {
18+
treeBank = new TreeBankDrawable(folder);
1919
}
2020

2121
TreeDisambiguationCorpusGenerator::~TreeDisambiguationCorpusGenerator() {

CorpusGenerator/TreeDisambiguationCorpusGenerator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class TreeDisambiguationCorpusGenerator {
1313
TreeBankDrawable* treeBank;
1414
public:
1515
~TreeDisambiguationCorpusGenerator();
16-
TreeDisambiguationCorpusGenerator(const string& folder, const string& fileList);
16+
explicit TreeDisambiguationCorpusGenerator(const string& folder);
1717
DisambiguationCorpus* generate();
1818
};
1919

DataSetGenerator/AnnotatedDataSetGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
* @param pattern Pattern of the tree files to be included in the treebank. Use "." for all files.
1414
* @param instanceGenerator The instance generator used to generate the dataset.
1515
*/
16-
AnnotatedDataSetGenerator::AnnotatedDataSetGenerator(const string &folder, const string &fileList,
16+
AnnotatedDataSetGenerator::AnnotatedDataSetGenerator(const string &folder,
1717
InstanceGenerator *instanceGenerator) {
18-
corpus = new AnnotatedCorpus(folder, fileList);
18+
corpus = new AnnotatedCorpus(folder);
1919
this->instanceGenerator = instanceGenerator;
2020
}
2121

DataSetGenerator/AnnotatedDataSetGenerator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AnnotatedDataSetGenerator {
1515
protected:
1616
InstanceGenerator* instanceGenerator;
1717
public:
18-
AnnotatedDataSetGenerator(const string& folder, const string& fileList, InstanceGenerator* instanceGenerator);
18+
AnnotatedDataSetGenerator(const string& folder, InstanceGenerator* instanceGenerator);
1919
void setInstanceGenerator(InstanceGenerator* instanceGenerator);
2020
DataSet generate();
2121
};

DataSetGenerator/DataSetGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* @param includePunctuation If true, punctuation symbols are also included in the dataset, false otherwise.
1515
* @param instanceGenerator The instance generator used to generate the dataset.
1616
*/
17-
DataSetGenerator::DataSetGenerator(const string &folder, const string &fileList, InstanceGenerator *instanceGenerator) {
18-
treeBank = new TreeBankDrawable(folder, fileList);
17+
DataSetGenerator::DataSetGenerator(const string &folder, InstanceGenerator *instanceGenerator) {
18+
treeBank = new TreeBankDrawable(folder);
1919
this->instanceGenerator = instanceGenerator;
2020
}
2121

DataSetGenerator/DataSetGenerator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class DataSetGenerator {
1717
InstanceGenerator* instanceGenerator;
1818
vector<Instance*> generateInstanceListFromTree(ParseTreeDrawable* parseTree);
1919
public:
20-
DataSetGenerator(const string &folder, const string &fileList, InstanceGenerator* instanceGenerator);
20+
DataSetGenerator(const string &folder, InstanceGenerator* instanceGenerator);
2121
void setInstanceGenerator(InstanceGenerator* instanceGenerator);
2222
DataSet generate();
2323
};

0 commit comments

Comments
 (0)