Skip to content

Commit

Permalink
Krzysztofwrobel/sc 26238/improve nameai tokenizations for important (#…
Browse files Browse the repository at this point in the history
…586)

* more domain specific tokens

* update version

* regenerate data
  • Loading branch information
djstrong authored Jan 30, 2025
1 parent 9209c29 commit 9a3d509
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 5 deletions.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion apps/api.nameai.dev/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nameai"
version = "0.1.5"
version = "0.1.6"
description = "NameHash NameAI API"
authors = ["NameHash Team <devops@namehash.io>"]
maintainers = ["NameHash Team <devops@namehash.io>"]
Expand Down
4 changes: 0 additions & 4 deletions apps/api.nameai.dev/tests/test_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import pytest
from fastapi.testclient import TestClient
from pprint import pprint

from mocked_static_property import mock_static_property
from nameguard.utils import MAX_INSPECTED_NAME_CHARACTERS
Expand Down Expand Up @@ -48,7 +47,6 @@ def test_inspect_name_post_long(test_client):
assert res_json['nameguard']['highest_risk']['check'] == 'normalized'
assert res_json['nameguard']['inspected']
assert res_json['nameai']['analysis']['status'] == 'unnormalized'
pprint(res_json)


def test_inspect_name_post_too_long(test_client):
Expand All @@ -62,7 +60,6 @@ def test_inspect_name_post_too_long(test_client):
assert res_json['nameguard']['normalization'] == 'unnormalized'
assert not res_json['nameguard']['inspected']
assert res_json['nameai']['analysis'] is None
pprint(res_json)


def test_inspect_name_post_too_long_normalized(test_client):
Expand All @@ -75,4 +72,3 @@ def test_inspect_name_post_too_long_normalized(test_client):
assert res_json['nameguard']['highest_risk']['check'] == 'uninspected'
assert res_json['nameguard']['normalization'] == 'normalized'
assert res_json['nameai']['analysis'] is None
pprint(res_json)
1 change: 1 addition & 0 deletions apps/api.nameai.dev/tests/test_nameai.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ def top_tok(label):
assert top_tok('expertsexchange') == ['experts', 'exchange']
# higher prob than [i, teach]
assert top_tok('iteach') == ['it', 'each']
assert top_tok('vitalik') == ['vitalik']

0 comments on commit 9a3d509

Please sign in to comment.