-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
59 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from arekit.common.experiment.neutral.algo.default import DefaultNeutralAnnotationAlgorithm | ||
|
||
|
||
class RuSentRelDefaultNeutralAnnotationAlgorithm(DefaultNeutralAnnotationAlgorithm): | ||
|
||
IGNORED_ENTITY_VALUES = [u"author", u"unknown"] | ||
|
||
def __init__(self, dist_in_terms_bound): | ||
super(RuSentRelDefaultNeutralAnnotationAlgorithm, self).__init__( | ||
dist_in_sents=0, | ||
dist_in_terms_bound=dist_in_terms_bound, | ||
ignored_entity_values=self.IGNORED_ENTITY_VALUES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from arekit.contrib.experiment_rusentrel.annot.three_scale import ThreeScaleNeutralAnnotator | ||
from arekit.contrib.experiment_rusentrel.annot.two_scale import TwoScaleNeutralAnnotator | ||
|
||
|
||
class ExperimentNeutralAnnotatorFactory: | ||
|
||
@staticmethod | ||
def create(labels_count, create_algo): | ||
assert(isinstance(labels_count, int)) | ||
assert(callable(create_algo)) | ||
|
||
if labels_count == 2: | ||
return TwoScaleNeutralAnnotator() | ||
elif labels_count == 3: | ||
return ThreeScaleNeutralAnnotator(create_algo()) | ||
else: | ||
raise NotImplementedError() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters