zack
22 September 2023 11:53
1
Problem to Solve
Use Chinese characters as the variable names, since it’s more readable in application and more mantenable in development.
Current Workaround
No good solusion yet. Like the Python supports any utf-8 as the variable names, I suggest that TypeDB should do this as well.
Proposed Solution
No idea. Probably, learn from Python.
Additional Information
I’m considering use LLM to query TypeDB, if TypeDB supports utf-8 variable names, then no translation between them.
zack
2 October 2023 07:51
2
It seems we can. But the read/write file of encoding of GUI seem not ‘utf-8’.
zack:
Use Chinese characters as the variable names, since it’s more readable in application and more mantenable in development.
Current Workaround
No good solusion yet. Like the Python supports any utf-8 as the variable names, I suggest that TypeDB should do this as well.
Proposed Solution
No idea. Probably, learn from Python.
Additional Information
I’m considering use LLM to query TypeDB, if TypeDB supports utf-8 variable names, then no translation between them.
Using Chinese characters for variable names in TypeDB could enhance readability. Emulating Python’s UTF-8 support might aid compatibility.
Hello,
I just confirmed that TypeDB console, which shows that Chinese support is working in TypeDB labels and attribute values:
> transaction test-unicode data read
test-unicode::data::read> match $x isa entity; fetch $x: attribute;
{
"x": {
"attribute": [ { "value": "test", "type": { "label": "name", "root": "attribute", "value_type": "string" } } ],
"type": { "label": "人", "root": "entity" }
}
}
{
"x": {
"attribute": [ { "value": "黄", "type": { "label": "name", "root": "attribute", "value_type": "string" } } ],
"type": { "label": "人", "root": "entity" }
}
}
However, I can also confirm that we don’t support variable names with utf-8:
test-unicode::data::read> match $人 isa entity; get;
[TQL03] TypeQL Error: There is a syntax error at line 1:
match $人 isa entity; get;
We will look into relaxing this to allow unicode in variable names as well.
zack
9 January 2024 12:54
6
Yes, as you confirmed, the values support utf-8, but not the variables. Actually, if the variables can be utf-8, it will open a huge opportunity to use TypeDB as a knowledge engine for the east world, at least for Chinese/Asian people. If it’s not too hard to support the feature, please consider do it, I’m waiting for this for quite a long time. Hope I’m not alone, am I
Best part of TypeDB quering is that it’s human readable. But without utf-8 of variable, it’s painful to construct the schema and query it when doing local language projects, since those important concepts are not obvious at first glance.
joshua
12 January 2024 15:25
7
I think we’ll get UTF8 variables into the next release !
1 Like
zack
12 January 2024 16:36
8
More than happy! Awesome~~
joshua
31 January 2024 18:34
9
Try the 2.26.6-rc1 release that is out now
zack
1 February 2024 08:49
10
Wow, I definitely will, thanks for all your hard and great work!!