Skip to content

Commit

Permalink
feat: basic style_guide.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nsantacruz committed Jun 17, 2024
1 parent b5e2cc4 commit b870f91
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions app/topic_prompt/style_guide.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"""
Make prompts conform to the style guide
"""
import csv


class StyleGuide:
STYLE_GUIDE_FILE = "input/The Sefaria Glossary - English + Transliterated Word List.csv"

def __init__(self):
self._rules = self._read_style_guide_file()

def _read_style_guide_file(self):
rules = []
with open(self.STYLE_GUIDE_FILE, "r") as fin:
cin = csv.reader(fin)
for row in list(cin)[4:]:
rules.append(row[0].strip())
return rules


if __name__ == '__main__':
s = StyleGuide()
print(s._rules)

0 comments on commit b870f91

Please sign in to comment.