Skip to content

Commit

Permalink
Comment #189
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolay-r committed Sep 12, 2021
1 parent 2795001 commit 0a91593
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arekit/common/experiment/cv/doc_stat/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# TODO. depends on io, issue #189
# TODO. Rename as BaseDocumentStatProvider!
# TODO. Move into the particular experiment issue #189
class BaseDocumentStatGenerator(object):
"""
Provides statistic on certain document.
Expand All @@ -24,6 +27,7 @@ def _calc(self, news):

# region public methods

# TODO. depends on io, issue #189
def calculate_and_write_doc_stat(self, filepath, doc_ids_iter):
with open(filepath, 'w') as f:
for doc_id in doc_ids_iter:
Expand Down
3 changes: 3 additions & 0 deletions arekit/common/experiment/cv/doc_stat/sentence.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
from arekit.common.news.base import News


# TODO. depends on io, issue #189
# TODO. We should not adopt inheritance there!
# TODO. Move into the particular experiment issue #189
class SentenceBasedDocumentStatGenerator(BaseDocumentStatGenerator):

def __init__(self, doc_reader_func):
Expand Down
1 change: 1 addition & 0 deletions arekit/common/experiment/cv/splitters/statistical.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from arekit.common.experiment.cv.splitters.base import CrossValidationSplitter


# TODO. Move into the particular experiment issue #189
class StatBasedCrossValidataionSplitter(CrossValidationSplitter):
""" Sentence-based splitter.
"""
Expand Down

0 comments on commit 0a91593

Please sign in to comment.