-
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.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
39 changed files
with
170 additions
and
169 deletions.
There are no files selected for viewing
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class BaseAnnotationAlgorithm(object): | ||
|
||
def iter_opinions(self, parsed_news, entities_collection, existed_opinions=None): | ||
pass |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from arekit.common.experiment.annot.base import BaseAnnotator | ||
from arekit.common.experiment.formats.documents import DocumentOperations | ||
from arekit.common.experiment.formats.opinions import OpinionOperations | ||
|
||
|
||
def do_annotation(logger, annotator, opin_ops, doc_ops): | ||
""" Performing annotation both using annotator and algorithm. | ||
""" | ||
assert(isinstance(doc_ops, DocumentOperations)) | ||
assert(isinstance(opin_ops, OpinionOperations)) | ||
assert(isinstance(annotator, BaseAnnotator)) | ||
|
||
# Initializing annotator | ||
logger.info("Initializing annotator ...") | ||
annotator.initialize(opin_ops=opin_ops, doc_ops=doc_ops) | ||
|
||
# Perform annotation | ||
logger.info("Perform annotation ...") | ||
for data_type in doc_ops.DataFolding.iter_supported_data_types(): | ||
annotator.serialize_missed_collections(data_type=data_type) |
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 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
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -15,5 +15,5 @@ def to_class_str(self): | |
return self.__class__.__name__ | ||
|
||
|
||
class NeutralLabel(Label): | ||
class NoLabel(Label): | ||
pass |
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
Oops, something went wrong.