forked from microsoft/ContextualSP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstant.py
43 lines (31 loc) · 947 Bytes
/
constant.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
class SpecialSymbol:
copy_delimiter = ' [COPY] '
class CacheMethod:
pick = "pickle"
dil = "dill"
class CacheMode:
all = "all"
single = "single"
class ContextMode:
turn_model = "turn"
concat_history = "concat"
context_independent = "none"
# not support now
concat_previous = "prev"
copy_hard_token = "hard_token"
concat_hard_token = "concat_hard_token"
class CopyMode:
# WARNING: CopyMode actually does not work in the code
# it corresponds to the setting `use_copy_segment` or `use_copy_token` though
# here we make it behave as a constant to better reading
no_copy = "none"
copy_tree = "seg"
copy_token = "token"
copy_segment_with_context = "conseg"
copy_token_with_context = "contoken"
copy_mix_segment = "mixseg"
class BERTMode:
no_bert = "v0"
bert_with_table = "v3"