Skip to content

Commit

Permalink
saving regex
Browse files Browse the repository at this point in the history
  • Loading branch information
K20shores committed Jul 23, 2024
1 parent 67df8e5 commit e8268e6
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions etc/translate_mcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,15 @@ def convert_tokenized_rates(rates, tokenized_rates):
else:
named_tokenized.append(rate)

for list in [temperature_dependent, power_rates, named_tokenized]:
for rate in list[:3]:
print(rate)
print()
print(tokenized_rates)
# for list in [temperature_dependent, power_rates, named_tokenized]:
# for rate in list[:10]:
# print(rate[1])
# print()
# print(tokenized_rates)

# this will match all of the tokens,
# but also EXP and TEMP. So if you use it, filter out the ones you don't want
tokens = r'\b[A-Z]+[A-Z0-9]*\b'

counts = [
('Temperature Dependent', len(temperature_dependent)),
Expand Down

0 comments on commit e8268e6

Please sign in to comment.