You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have installed simstring successfully. Then from a fresh checkout from the master branch, I ran the command python tools/norm_db_init.py example-data/normalisation/Wiki.txt as per the instruction here.
This results in
python tools/norm_db_init.py example-data/normalisation/Wiki.txt
Error building simstring DB
Traceback (most recent call last):
File "/var/www/fork-brat/brat/tools/norm_db_init.py", line 430, in <module>
sys.exit(main(sys.argv))
File "/var/www/fork-brat/brat/tools/norm_db_init.py", line 399, in main
with Simstring(ssdbfn,
File "/var/www/fork-brat/brat/tools/../server/src/simstringlib.py", line 35, in __init__
self.db.measure = SIMILARITY_MEASURES[similarity_measure]
NameError: name 'SIMILARITY_MEASURES' is not defined
If I change SIMILARITY_MEASURES to self.SIMILARITY_MEASURES the program runs successfully.
Now when I select a span in the UI and do New Annotation > Normalization > Quick Add > Search I get no result and see this in /var/log/apache2/error.log:
Traceback (most recent call last):
File "/var/www/brat/server/src/server.py", line 338, in serve
return _safe_serve(params, client_ip, client_hostname, cookie_data)
File "/var/www/brat/server/src/server.py", line 206, in _safe_serve
json_dic = dispatch(http_args, client_ip, client_hostname)
File "/var/www/brat/server/src/dispatch.py", line 315, in dispatch
json_dic = action_function(*action_args)
File "/var/www/brat/server/src/norm.py", line 446, in norm_search
return _norm_search_impl(database, name, collection, exactmatch)
File "/var/www/brat/server/src/norm.py", line 377, in _norm_search_impl
best_score = _norm_search_name_attr(ss, name, None,
File "/var/www/brat/server/src/norm.py", line 304, in _norm_search_name_attr
str_scores = ss.supstring_lookup(normname, True)
File "/var/www/brat/server/src/simstringbase.py", line 87, in supstring_lookup
result = self.lookup(s)
File "/var/www/brat/server/src/simstringlib.py", line 47, in lookup
assert not self.build, "Error: lookup on build simstring"
AssertionError: Error: lookup on build simstring
I guess this is caused by using self.build in the assert statement, which should have been self.is_build.
The text was updated successfully, but these errors were encountered:
I have installed simstring successfully. Then from a fresh checkout from the master branch, I ran the command
python tools/norm_db_init.py example-data/normalisation/Wiki.txt
as per the instructionhere.
This results in
If I change
SIMILARITY_MEASURES
toself.SIMILARITY_MEASURES
the program runs successfully.Now when I select a span in the UI and do New Annotation > Normalization > Quick Add > Search I get no result and see this in
/var/log/apache2/error.log
:I guess this is caused by using
self.build
in theassert
statement, which should have beenself.is_build
.The text was updated successfully, but these errors were encountered: