Shaltiel commited on
Commit
dc318e0
1 Parent(s): 2618264

Update BertForJointParsing.py

Browse files
Files changed (1) hide show
  1. BertForJointParsing.py +3 -8
BertForJointParsing.py CHANGED
@@ -7,14 +7,9 @@ from typing import Any, Dict, List, Literal, Optional, Tuple, Union
7
  from transformers import BertPreTrainedModel, BertModel, BertTokenizerFast
8
  from transformers.models.bert.modeling_bert import BertOnlyMLMHead
9
  from transformers.utils import ModelOutput
10
- try:
11
- from .BertForSyntaxParsing import BertSyntaxParsingHead, SyntaxLabels, SyntaxLogitsOutput, parse_logits as syntax_parse_logits
12
- from .BertForPrefixMarking import BertPrefixMarkingHead, parse_logits as prefix_parse_logits, encode_sentences_for_bert_for_prefix_marking
13
- from .BertForMorphTagging import BertMorphTaggingHead, MorphLogitsOutput, MorphLabels, parse_logits as morph_parse_logits
14
- except ImportError:
15
- from BertForSyntaxParsing import BertSyntaxParsingHead, SyntaxLabels, SyntaxLogitsOutput, parse_logits as syntax_parse_logits
16
- from BertForPrefixMarking import BertPrefixMarkingHead, parse_logits as prefix_parse_logits, encode_sentences_for_bert_for_prefix_marking
17
- from BertForMorphTagging import BertMorphTaggingHead, MorphLogitsOutput, MorphLabels, parse_logits as morph_parse_logits
18
 
19
  import warnings
20
 
 
7
  from transformers import BertPreTrainedModel, BertModel, BertTokenizerFast
8
  from transformers.models.bert.modeling_bert import BertOnlyMLMHead
9
  from transformers.utils import ModelOutput
10
+ from .BertForSyntaxParsing import BertSyntaxParsingHead, SyntaxLabels, SyntaxLogitsOutput, parse_logits as syntax_parse_logits
11
+ from .BertForPrefixMarking import BertPrefixMarkingHead, parse_logits as prefix_parse_logits, encode_sentences_for_bert_for_prefix_marking
12
+ from .BertForMorphTagging import BertMorphTaggingHead, MorphLogitsOutput, MorphLabels, parse_logits as morph_parse_logits
 
 
 
 
 
13
 
14
  import warnings
15