formatting

This commit is contained in:
svlandeg 2021-10-29 14:19:30 +02:00
parent 87fb268f76
commit dbaf68a439
3 changed files with 10 additions and 12 deletions

View File

@ -114,7 +114,7 @@ def make_parser(
beam_update_prob=0.0, beam_update_prob=0.0,
# At some point in the future we can try to implement support for # At some point in the future we can try to implement support for
# partial annotations, perhaps only in the beam objective. # partial annotations, perhaps only in the beam objective.
incorrect_spans_key=None incorrect_spans_key=None,
) )
@ -207,7 +207,7 @@ def make_beam_parser(
min_action_freq=min_action_freq, min_action_freq=min_action_freq,
# At some point in the future we can try to implement support for # At some point in the future we can try to implement support for
# partial annotations, perhaps only in the beam objective. # partial annotations, perhaps only in the beam objective.
incorrect_spans_key=None incorrect_spans_key=None,
) )
@ -235,8 +235,7 @@ class DependencyParser(Parser):
multitasks=tuple(), multitasks=tuple(),
incorrect_spans_key=None, incorrect_spans_key=None,
): ):
"""Create a DependencyParser. """Create a DependencyParser."""
"""
super().__init__( super().__init__(
vocab, vocab,
model, model,

View File

@ -40,7 +40,7 @@ DEFAULT_NER_MODEL = Config().from_str(default_model_config)["model"]
"moves": None, "moves": None,
"update_with_oracle_cut_size": 100, "update_with_oracle_cut_size": 100,
"model": DEFAULT_NER_MODEL, "model": DEFAULT_NER_MODEL,
"incorrect_spans_key": None "incorrect_spans_key": None,
}, },
default_score_weights={ default_score_weights={
"ents_f": 1.0, "ents_f": 1.0,
@ -55,7 +55,7 @@ def make_ner(
model: Model, model: Model,
moves: Optional[TransitionSystem], moves: Optional[TransitionSystem],
update_with_oracle_cut_size: int, update_with_oracle_cut_size: int,
incorrect_spans_key: Optional[str]=None incorrect_spans_key: Optional[str] = None,
): ):
"""Create a transition-based EntityRecognizer component. The entity recognizer """Create a transition-based EntityRecognizer component. The entity recognizer
identifies non-overlapping labelled spans of tokens. identifies non-overlapping labelled spans of tokens.
@ -126,7 +126,7 @@ def make_beam_ner(
beam_width: int, beam_width: int,
beam_density: float, beam_density: float,
beam_update_prob: float, beam_update_prob: float,
incorrect_spans_key: Optional[str]=None incorrect_spans_key: Optional[str] = None,
): ):
"""Create a transition-based EntityRecognizer component that uses beam-search. """Create a transition-based EntityRecognizer component that uses beam-search.
The entity recognizer identifies non-overlapping labelled spans of tokens. The entity recognizer identifies non-overlapping labelled spans of tokens.
@ -173,7 +173,7 @@ def make_beam_ner(
beam_width=beam_width, beam_width=beam_width,
beam_density=beam_density, beam_density=beam_density,
beam_update_prob=beam_update_prob, beam_update_prob=beam_update_prob,
incorrect_spans_key=incorrect_spans_key incorrect_spans_key=incorrect_spans_key,
) )
@ -199,8 +199,7 @@ class EntityRecognizer(Parser):
multitasks=tuple(), multitasks=tuple(),
incorrect_spans_key=None, incorrect_spans_key=None,
): ):
"""Create an EntityRecognizer. """Create an EntityRecognizer."""
"""
super().__init__( super().__init__(
vocab, vocab,
model, model,