beweinreich commited on
Commit
bdee24c
1 Parent(s): 3f68dec

skip if none

Browse files
Files changed (1) hide show
  1. algo.py +6 -0
algo.py CHANGED
@@ -230,6 +230,12 @@ class Algo:
230
  def handle_single_item(self, input_word):
231
  input_word_clean = clean_word(input_word)
232
 
 
 
 
 
 
 
233
  # try the singular form of the word
234
  singular = self.pluralizer.pluralize(input_word_clean, 1)
235
  mapping = get_mapping_from_db(self.db_cursor, singular)
 
230
  def handle_single_item(self, input_word):
231
  input_word_clean = clean_word(input_word)
232
 
233
+ if not input_word_clean:
234
+ return None
235
+
236
+ if input_word_clean == "":
237
+ return None
238
+
239
  # try the singular form of the word
240
  singular = self.pluralizer.pluralize(input_word_clean, 1)
241
  mapping = get_mapping_from_db(self.db_cursor, singular)