Spaces:
Running
Running
Commit ·
ad09e60
1
Parent(s): 66e7608
Migrate UV and long-s demos to latincy-preprocess package
Browse filesReplace separate latincy-uv and latincy-long-s git dependencies with
single latincy-preprocess>=0.1.0 PyPI package. Update imports in both
demo pages.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- pages/8_uv_normalizer_demo.py +3 -3
- pages/9_long_s_demo.py +3 -3
- requirements.txt +1 -2
pages/8_uv_normalizer_demo.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from typing import Dict, Any
|
| 3 |
|
| 4 |
-
from
|
| 5 |
|
| 6 |
st.set_page_config(page_title="U/V Normalizer Demo", layout="wide")
|
| 7 |
st.sidebar.header("U/V Normalizer Demo")
|
|
@@ -134,7 +134,7 @@ normalizer = get_normalizer()
|
|
| 134 |
st.title("Latin U/V Normalizer")
|
| 135 |
st.markdown(
|
| 136 |
"Rule-based U/V normalization for Latin using "
|
| 137 |
-
"[latincy-
|
| 138 |
"Converts consonantal 'u' to 'v' and vocalic 'v' to 'u'."
|
| 139 |
)
|
| 140 |
|
|
@@ -261,5 +261,5 @@ with tab3:
|
|
| 261 |
|
| 262 |
### Source
|
| 263 |
|
| 264 |
-
[
|
| 265 |
""")
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from typing import Dict, Any
|
| 3 |
|
| 4 |
+
from latincy_preprocess.uv import UVNormalizerRules, NormalizationResult
|
| 5 |
|
| 6 |
st.set_page_config(page_title="U/V Normalizer Demo", layout="wide")
|
| 7 |
st.sidebar.header("U/V Normalizer Demo")
|
|
|
|
| 134 |
st.title("Latin U/V Normalizer")
|
| 135 |
st.markdown(
|
| 136 |
"Rule-based U/V normalization for Latin using "
|
| 137 |
+
"[latincy-preprocess](https://pypi.org/project/latincy-preprocess/). "
|
| 138 |
"Converts consonantal 'u' to 'v' and vocalic 'v' to 'u'."
|
| 139 |
)
|
| 140 |
|
|
|
|
| 261 |
|
| 262 |
### Source
|
| 263 |
|
| 264 |
+
[PyPI: latincy-preprocess](https://pypi.org/project/latincy-preprocess/)
|
| 265 |
""")
|
pages/9_long_s_demo.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
-
from
|
| 4 |
|
| 5 |
st.set_page_config(page_title="Long-S Normalizer Demo", layout="wide")
|
| 6 |
st.sidebar.header("Long-S Normalizer Demo")
|
|
@@ -35,7 +35,7 @@ normalizer = get_normalizer()
|
|
| 35 |
st.title("Latin Long-S Normalizer")
|
| 36 |
st.markdown(
|
| 37 |
"Correct OCR artifacts from historical Latin texts where long-s (ſ) was misread as 'f', "
|
| 38 |
-
"using [latincy-
|
| 39 |
)
|
| 40 |
|
| 41 |
tab1, tab2 = st.tabs(["Normalize", "About"])
|
|
@@ -164,5 +164,5 @@ with tab2:
|
|
| 164 |
|
| 165 |
### Source
|
| 166 |
|
| 167 |
-
[
|
| 168 |
""")
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
+
from latincy_preprocess.long_s import LongSNormalizer
|
| 4 |
|
| 5 |
st.set_page_config(page_title="Long-S Normalizer Demo", layout="wide")
|
| 6 |
st.sidebar.header("Long-S Normalizer Demo")
|
|
|
|
| 35 |
st.title("Latin Long-S Normalizer")
|
| 36 |
st.markdown(
|
| 37 |
"Correct OCR artifacts from historical Latin texts where long-s (ſ) was misread as 'f', "
|
| 38 |
+
"using [latincy-preprocess](https://pypi.org/project/latincy-preprocess/)."
|
| 39 |
)
|
| 40 |
|
| 41 |
tab1, tab2 = st.tabs(["Normalize", "About"])
|
|
|
|
| 164 |
|
| 165 |
### Source
|
| 166 |
|
| 167 |
+
[PyPI: latincy-preprocess](https://pypi.org/project/latincy-preprocess/)
|
| 168 |
""")
|
requirements.txt
CHANGED
|
@@ -6,7 +6,6 @@ pandas==2.3.0
|
|
| 6 |
spacy==3.8.7
|
| 7 |
spacy_lookups_data @ git+https://github.com/diyclassics/spacy-lookups-data.git#egg=spacy-lookups-data
|
| 8 |
spacy-streamlit==1.0.6
|
| 9 |
-
latincy-
|
| 10 |
-
latincy-long-s @ git+https://github.com/diyclassics/latincy-long-s.git
|
| 11 |
streamlit==1.45.1
|
| 12 |
watchdog==6.0.0
|
|
|
|
| 6 |
spacy==3.8.7
|
| 7 |
spacy_lookups_data @ git+https://github.com/diyclassics/spacy-lookups-data.git#egg=spacy-lookups-data
|
| 8 |
spacy-streamlit==1.0.6
|
| 9 |
+
latincy-preprocess>=0.1.0
|
|
|
|
| 10 |
streamlit==1.45.1
|
| 11 |
watchdog==6.0.0
|