anaygupta commited on
Commit
f43f12b
·
verified ·
1 Parent(s): 5c0dd57

Update services/text_utils.py

Browse files
Files changed (1) hide show
  1. services/text_utils.py +0 -3
services/text_utils.py CHANGED
@@ -52,14 +52,11 @@ def strip_amounts_and_preps(text: str) -> str:
52
 
53
 
54
  def singularize(text: str) -> str:
55
- """Return a singular form when possible, otherwise return cleaned text."""
56
  text = normalize_text(text)
57
  if not text:
58
  return ""
59
-
60
  if _INFLECT is None:
61
  return text
62
-
63
  singular = _INFLECT.singular_noun(text)
64
  return singular if singular else text
65
 
 
52
 
53
 
54
  def singularize(text: str) -> str:
 
55
  text = normalize_text(text)
56
  if not text:
57
  return ""
 
58
  if _INFLECT is None:
59
  return text
 
60
  singular = _INFLECT.singular_noun(text)
61
  return singular if singular else text
62