Skip to content

Commit 5263a0b

Browse files
committed
Add Text and TextList support to DictionaryDomain
TODO: - Add sample using text features - Add automated tests in `test_core` using text features related_to #330
1 parent cff5ac8 commit 5263a0b

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

khiops/core/dictionary.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def _format_name(name):
7070
def _quote_value(value):
7171
"""Double-quotes a string
7272
73-
Categorical and metadata values are quoted with this method.
73+
Categorical, Text and metadata values are quoted with this method.
7474
"""
7575
if isinstance(value, str):
7676
quoted_value = '"' + value.replace('"', '""') + '"'
@@ -1071,7 +1071,17 @@ def is_native(self):
10711071
``True`` if a variables comes directly from a data column.
10721072
10731073
"""
1074-
base_types = ["Categorical", "Numerical", "Time", "Date", "Timestamp"]
1074+
# TextList is a native type
1075+
1076+
base_types = [
1077+
"Categorical",
1078+
"Numerical",
1079+
"Time",
1080+
"Date",
1081+
"Timestamp",
1082+
"Text",
1083+
"TextList",
1084+
]
10751085
if self.variable_block is None:
10761086
return self.rule == "" and self.type in base_types
10771087
return self.variable_block.rule == ""

0 commit comments

Comments
 (0)