<commit_before>Feature: Make sure it's plumbed in correctly

  Scenario: Get root
    When I send a GET request to "/"
    Then the response status should be "200"

  Scenario: Simple inference
    Given I send and accept JSON
    And the following addresses exist:
    | paon | street      | town     | postcode |
    | 5    | High Street | Testtown | SW1A 1AA |

    And I send a POST request to "/infer" with the following:
"""
{"saon":null,"paon":1,"street":"High Street","locality":null,"town":"Testtown","postcode":"SW1A 1AA"}
"""
  Then the JSON response should be:
"""
{
  "addresses": [
    {
      "saon": null,
      "paon": 3,
      "street": "High Street",
      "locality": null,
      "town": "Testtown",
      "postcode": "SW1A 1AA"
    }
  ]
}
"""<commit_msg>Add extra tests<commit_after>Feature: Make sure it's plumbed in correctly

  Scenario: Get root
    When I send a GET request to "/"
    Then the response status should be "200"

  Scenario: Simple inference
    Given I send and accept JSON
    And the following addresses exist:
    | paon | street      | town     | postcode |
    | 5    | High Street | Testtown | SW1A 1AA |
    And I send a POST request to "/infer" with the following:
"""
{"saon":null,"paon":1,"street":"High Street","locality":null,"town":"Testtown","postcode":"SW1A 1AA"}
"""
  Then the JSON response should be:
"""
{
  "addresses": [
    {
      "saon": null,
      "paon": 3,
      "street": "High Street",
      "locality": null,
      "town": "Testtown",
      "postcode": "SW1A 1AA"
    }
  ]
}
"""

  Scenario: Inferrence with multiple addresses
    Given I send and accept JSON
    And the following addresses exist:
    | paon | street      | town     | postcode |
    | 7    | High Street | Testtown | SW1A 1AA |
    And I send a POST request to "/infer" with the following:
"""
{"saon":null,"paon":1,"street":"High Street","locality":null,"town":"Testtown","postcode":"SW1A 1AA"}
"""
  Then the JSON response should be:
"""
{
  "addresses": [
    {
      "saon": null,
      "paon": 3,
      "street": "High Street",
      "locality": null,
      "town": "Testtown",
      "postcode": "SW1A 1AA"
    },
    {
      "saon": null,
      "paon": 5,
      "street": "High Street",
      "locality": null,
      "town": "Testtown",
      "postcode": "SW1A 1AA"
    }
  ]
}
"""

  Scenario: Inferrence with even numbered addresses
    Given I send and accept JSON
    And the following addresses exist:
    | paon | street      | town     | postcode |
    | 10    | High Street | Testtown | SW1A 1AA |
    And I send a POST request to "/infer" with the following:
"""
{"saon":null,"paon":2,"street":"High Street","locality":null,"town":"Testtown","postcode":"SW1A 1AA"}
"""
  Then the JSON response should be:
"""
{
  "addresses": [
    {
      "saon": null,
      "paon": 4,
      "street": "High Street",
      "locality": null,
      "town": "Testtown",
      "postcode": "SW1A 1AA"
    },
    {
      "saon": null,
      "paon": 6,
      "street": "High Street",
      "locality": null,
      "town": "Testtown",
      "postcode": "SW1A 1AA"
    },
    {
      "saon": null,
      "paon": 8,
      "street": "High Street",
      "locality": null,
      "town": "Testtown",
      "postcode": "SW1A 1AA"
    }
  ]
}
"""
{'fraction_non_alphanumeric': 0.15572519083969466, 'fraction_numerical': 0.01587786259541985, 'mean_word_length': 2.55700325732899, 'pattern_counts': {'":': 70, '<': 3, '<?xml version=': 0, '>': 3, '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': '4514378', 'n_tokens_mistral': 1153, 'n_tokens_neox': 1088, 'n_words': 333}