johnpaulbin commited on
Commit
e1402ca
·
verified ·
1 Parent(s): 15357c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -118,7 +118,7 @@ class JSONExtra(json.JSONEncoder):
118
  def clean_text(text: str) -> str:
119
  text = emoji.replace_emoji(text, replace='')
120
  text = re.sub(r'https?://\S+', '', text)
121
- text = re.sub(r'[^A-Za-z\s]', '', text)
122
  text = text.strip()
123
  return text
124
 
@@ -147,15 +147,15 @@ def process_firehose():
147
  continue
148
 
149
  if cooked.py_type == "app.bsky.feed.post":
150
- if ilo.is_toki_pona(raw.get("text", "")):
151
- print(raw.get("text", ""))
152
 
153
  cleaned_text = clean_text(raw.get("text", ""))
154
 
155
  if not cleaned_text or len(cleaned_text.split()) < 3:
156
  continue
157
 
158
- if not ilo.is_toki_pona(cleaned_text.lower()):
159
  continue
160
 
161
  url = f'https://bsky.app/profile/{commit.repo}/post/{op.path.split("/")[1]}'
 
118
  def clean_text(text: str) -> str:
119
  text = emoji.replace_emoji(text, replace='')
120
  text = re.sub(r'https?://\S+', '', text)
121
+ #text = re.sub(r'[^A-Za-z\s]', '', text)
122
  text = text.strip()
123
  return text
124
 
 
147
  continue
148
 
149
  if cooked.py_type == "app.bsky.feed.post":
150
+ #if ilo.is_toki_pona(raw.get("text", "")):
151
+ # print(raw.get("text", ""))
152
 
153
  cleaned_text = clean_text(raw.get("text", ""))
154
 
155
  if not cleaned_text or len(cleaned_text.split()) < 3:
156
  continue
157
 
158
+ if not ilo.is_toki_pona(cleaned_text):
159
  continue
160
 
161
  url = f'https://bsky.app/profile/{commit.repo}/post/{op.path.split("/")[1]}'