Update app.py
Browse files
app.py
CHANGED
@@ -31,8 +31,9 @@ def replace_multiple_spaces(text):
|
|
31 |
def parse_postal_address_can(text):
|
32 |
"""Parse the given Canadian address into its components.
|
33 |
"""
|
34 |
-
text = text.lower
|
35 |
-
text =
|
|
|
36 |
text = replace_multiple_spaces(text)
|
37 |
results = token_classifier(text)
|
38 |
|
@@ -56,7 +57,7 @@ def parse_postal_address_can(text):
|
|
56 |
with gr.Blocks() as demo:
|
57 |
|
58 |
gr.Markdown("""
|
59 |
-
## Canadian postal address parsing - version 0.
|
60 |
""")
|
61 |
|
62 |
input_text = gr.Textbox(
|
|
|
31 |
def parse_postal_address_can(text):
|
32 |
"""Parse the given Canadian address into its components.
|
33 |
"""
|
34 |
+
text = text.lower
|
35 |
+
text = text.replace(".", "")
|
36 |
+
#text = replace_punctuation_with_space(text)
|
37 |
text = replace_multiple_spaces(text)
|
38 |
results = token_classifier(text)
|
39 |
|
|
|
57 |
with gr.Blocks() as demo:
|
58 |
|
59 |
gr.Markdown("""
|
60 |
+
## Canadian postal address parsing - version 0.02
|
61 |
""")
|
62 |
|
63 |
input_text = gr.Textbox(
|