Skip to content

Commit

Permalink
Merge pull request #74 from GeorgeKontsevik/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
GeorgeKontsevik authored Jun 14, 2024
2 parents 8df123b + 7d230ba commit aafdceb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "sloyka"
version = "0.1.4"
version = "0.1.6"
description = "Library for city identity analysis from social media posts and comments"
authors = ["sandrro, georgekontsevik"]
readme = "README.md"
Expand Down
3 changes: 3 additions & 0 deletions sloyka/src/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"проезде",
"дорога",
"дороге",
"линия",
"линии"
]
REPLACEMENT_DICT = {
"пр": "проспект",
Expand All @@ -28,6 +30,7 @@
"площади": "площадь",
"проезде": "проезд",
"дороге": "дорога",
"линии": "линия"
}

GLOBAL_CRS = 4326
Expand Down
2 changes: 1 addition & 1 deletion sloyka/src/utils/data_getter/street_getter.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def drop_words_from_name(x: str) -> str:
r"путепровод|улица|набережная реки|проспект"
r"|бульвар|мост|переулок|площадь|переулок"
r"|набережная|канала|канал|дорога на|дорога в"
r"|шоссе|аллея|проезд",
r"|шоссе|аллея|проезд|линия",
x,
)
lst.remove("")
Expand Down
6 changes: 3 additions & 3 deletions tests/test_geocoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
def sample_dataframe():
s_data = {
"text": [
"Рубинштейна 25 дворовую территорию уберите, где работники?"
"Биржевая линия 16 дворовую территорию уберите, где работники?"
]
}
return pd.DataFrame(s_data)
Expand All @@ -17,5 +17,5 @@ def test_run_function(sample_dataframe):

result_df = instance.run(df=sample_dataframe)

assert result_df.loc[0, "Street"] == "рубинштейна"
assert result_df.loc[0, "Numbers"] == "25"
assert result_df.loc[0, "Street"] == "Биржевая"
assert result_df.loc[0, "Numbers"] == "16"

0 comments on commit aafdceb

Please sign in to comment.