Skip to content

Commit

Permalink
fixed stem list for edge case stems(property, equity, etc.) (#514)
Browse files Browse the repository at this point in the history
* fixed stem list for edge case stems(property, equity, etc.)
* pytest added
Signed-off-by: Kial Jinnah <[email protected]>
  • Loading branch information
kialj876 authored and thorwolpert committed Feb 1, 2019
1 parent 9ae2f36 commit 17930f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/namex/analytics/solr.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,8 +895,8 @@ def word_pre_processing(cls, list_of_words, type, solr_base_url):
for text in processed_words['analysis']['field_names']['name']['index'][count]:
processed_list.append(text['text'])

stem_in_name = False
for item in list_of_words:
stem_in_name = False
for processed_synonym in processed_list:
if processed_synonym.upper() in item.upper():
stem_in_name = True
Expand Down
1 change: 1 addition & 0 deletions api/tests/python/end_points/test_synonym_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ def test_order(client, jwt, app, query, ordered_list):
('CONSULTING CONSTRUCTION DEVELOPMENT', ['CONSULT', 'CONSTRUCT', 'DEVELOP']),
('PROPERTY', ['PROPERTY', 'PROPERTI']),
('PROPERTIES', ['PROPERTI']),
('MANAGEMENT PROPERTY', ['PROPERTY','MANAG','PROPERTI']),
])
def test_stems(client, jwt, app, query, stems):
verify_stems(client, jwt, query=query, stems=stems)
Expand Down

0 comments on commit 17930f1

Please sign in to comment.