def particles(category=None):
filepath = os.path.join(os.path.dirname(__file__), '<STR_LIT>')<EOL>with open(filepath) as f:<EOL><INDENT>try:<EOL><INDENT>particles = json.load(f)<EOL><DEDENT>except ValueError as e:<EOL><INDENT>log.error('<STR_LIT>'.format(filepath))<EOL><DEDENT>else:<EOL><INDENT>if category:<EOL><INDENT>if category in particles:<EOL><INDENT>return particles[category]<EOL><DEDENT>else:<EOL><INDENT>log.warn('<STR_LIT>'.format(category))<EOL><DEDENT><DEDENT>return particles<EOL><DEDENT><DEDENT>
Returns a dict containing old greek particles grouped by category.