<commit_before>%%{
  machine feature_common;

  # Language specific
  FEATURE = <%= i18n['feature'] %> >start_keyword %end_keyword; 
  BACKGROUND = <%= i18n['background'] %> >start_keyword %end_keyword;
  SCENARIO_OUTLINE = <%= i18n['scenario_outline'] %> >start_keyword %end_keyword;
  SCENARIO = <%= i18n['scenario'] %> >start_keyword %end_keyword;
  STEP = (<%= i18n['given'] %> | <%= i18n['when'] %> | <%= i18n['and'] %> | <%= i18n['then'] %> | <%= i18n['but'] %>) >start_keyword %end_keyword;
  EXAMPLES = <%= i18n['examples'] %> >start_keyword %end_keyword;
 
  EOL = ('\r'? '\n') @inc_line_number @last_newline;

  # Terminators
  FeatureHeadingEnd = EOL+ space* (BACKGROUND | SCENARIO | SCENARIO_OUTLINE | '@' | '#');
  ScenarioHeadingEnd = EOL+ space* ( SCENARIO | SCENARIO_OUTLINE | STEP | '@' | '#' );
  BackgroundHeadingEnd = EOL+ space* ( SCENARIO | SCENARIO_OUTLINE | STEP | '@' | '#' );
  ScenarioOutlineHeadingEnd = EOL+ space* ( SCENARIO | STEP | '@' | '#' );
  ExamplesHeadingEnd = EOL+ space* '|';
  StartTable = space* '|';
  EndTable = EOL space* ^('|' | space);
  StartPyString = '"""' >start_pystring space* EOL; 
  EndPyString = '"""';
 
  FeatureHeading = space* FEATURE %begin_content %current_line ^FeatureHeadingEnd* %/store_feature_content :>> FeatureHeadingEnd >backup @store_feature_content;
  BackgroundHeading = space* BACKGROUND %begin_content %current_line ^BackgroundHeadingEnd* %/store_background_content :>> BackgroundHeadingEnd >backup @store_background_content;
  ScenarioHeading = space* SCENARIO %begin_content %current_line ^ScenarioHeadingEnd* %/store_scenario_content :>> ScenarioHeadingEnd >backup @store_scenario_content;
  ScenarioOutlineHeading = space* SCENARIO_OUTLINE %begin_content %current_line ^ScenarioOutlineHeadingEnd* %/store_scenario_outline_content :>> ScenarioOutlineHeadingEnd >backup @store_scenario_outline_content;
  ExamplesHeading = space* EXAMPLES %begin_content %current_line ^ExamplesHeadingEnd* %/store_examples_content :>> ExamplesHeadingEnd >backup @store_examples_content;

  Step = space* STEP %begin_content %current_line ^EOL+ %store_step_content %/store_step_content EOL+;  
  Comment = space* '#' >begin_content ^EOL* %store_comment_content %/store_comment_content EOL+;
  Tag = ( '@' [^@\r\n\t ]+ >begin_content ) %store_tag_content;
  Tags = space* (Tag @current_line space*)+ EOL+;  
  Table = StartTable %begin_content %current_line any+ %/end_table :>> EndTable >backup @end_table;
  PyStringLine = (space* ^EOL+ >start_line %end_line :>> EOL) | (space* EOL >start_line %end_line);
  PyString = space* StartPyString %begin_pystring >current_line PyStringLine* space* :>> EndPyString %store_pystring_content %/store_pystring_content :>> EOL+;
  
  MultilineStep = Step (Table | PyString)?;
  Scenario = ScenarioHeading (Comment | MultilineStep)*;<commit_msg>Rename I18N definitions<commit_after>%%{
  machine feature_common;

  # Language specific
  I18N_Feature = <%= i18n['feature'] %> >start_keyword %end_keyword; 
  I18N_Background = <%= i18n['background'] %> >start_keyword %end_keyword;
  I18N_ScenarioOutline = <%= i18n['scenario_outline'] %> >start_keyword %end_keyword;
  I18N_Scenario = <%= i18n['scenario'] %> >start_keyword %end_keyword;
  I18N_Step = (<%= i18n['given'] %> | <%= i18n['when'] %> | <%= i18n['and'] %> | <%= i18n['then'] %> | <%= i18n['but'] %>) >start_keyword %end_keyword;
  I18N_Examples = <%= i18n['examples'] %> >start_keyword %end_keyword;
 
  EOL = ('\r'? '\n') @inc_line_number @last_newline;

  # Terminators
  FeatureHeadingEnd = EOL+ space* (I18N_Background | I18N_Scenario | I18N_ScenarioOutline | '@' | '#');
  ScenarioHeadingEnd = EOL+ space* ( I18N_Scenario | I18N_ScenarioOutline | I18N_Step | '@' | '#' );
  BackgroundHeadingEnd = EOL+ space* ( I18N_Scenario | I18N_ScenarioOutline | I18N_Step | '@' | '#' );
  ScenarioOutlineHeadingEnd = EOL+ space* ( I18N_Scenario | I18N_Step | '@' | '#' );
  ExamplesHeadingEnd = EOL+ space* '|';
  StartTable = space* '|';
  EndTable = EOL space* ^('|' | space);
  StartPyString = '"""' >start_pystring space* EOL; 
  EndPyString = '"""';
 
  FeatureHeading = space* I18N_Feature %begin_content %current_line ^FeatureHeadingEnd* %/store_feature_content :>> FeatureHeadingEnd >backup @store_feature_content;
  BackgroundHeading = space* I18N_Background %begin_content %current_line ^BackgroundHeadingEnd* %/store_background_content :>> BackgroundHeadingEnd >backup @store_background_content;
  ScenarioHeading = space* I18N_Scenario %begin_content %current_line ^ScenarioHeadingEnd* %/store_scenario_content :>> ScenarioHeadingEnd >backup @store_scenario_content;
  ScenarioOutlineHeading = space* I18N_ScenarioOutline %begin_content %current_line ^ScenarioOutlineHeadingEnd* %/store_scenario_outline_content :>> ScenarioOutlineHeadingEnd >backup @store_scenario_outline_content;
  ExamplesHeading = space* I18N_Examples %begin_content %current_line ^ExamplesHeadingEnd* %/store_examples_content :>> ExamplesHeadingEnd >backup @store_examples_content;

  Step = space* I18N_Step %begin_content %current_line ^EOL+ %store_step_content %/store_step_content EOL+;  
  Comment = space* '#' >begin_content ^EOL* %store_comment_content %/store_comment_content EOL+;
  Tag = ( '@' [^@\r\n\t ]+ >begin_content ) %store_tag_content;
  Tags = space* (Tag @current_line space*)+ EOL+;  
  Table = StartTable %begin_content %current_line any+ %/end_table :>> EndTable >backup @end_table;
  PyStringLine = (space* ^EOL+ >start_line %end_line :>> EOL) | (space* EOL >start_line %end_line);
  PyString = space* StartPyString %begin_pystring >current_line PyStringLine* space* :>> EndPyString %store_pystring_content %/store_pystring_content :>> EOL+;
  
  MultilineStep = Step (Table | PyString)?;
  Scenario = ScenarioHeading (Comment | MultilineStep)*;
{'fraction_non_alphanumeric': 0.14576154376292214, 'fraction_numerical': 0.015161957270847692, 'mean_word_length': 6.357414448669202, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 95, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1047582', 'n_tokens_mistral': 2162, 'n_tokens_neox': 2008, 'n_words': 381}