File size: 1,231 Bytes
a11b49c
 
2044c26
 
 
 
 
 
 
 
 
 
 
 
 
 
a11b49c
469e50c
2044c26
a11b49c
2044c26
a11b49c
469e50c
 
 
2044c26
a11b49c
2044c26
 
 
 
 
 
a11b49c
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import streamlit as st

# Placeholder for conversion logic
def text_to_shorthand(text):
    # Simple mapping for demonstration (expand with Pitman rules)
    shorthand_dict = {
        "and": "∧",
        "the": "⬤",
        "of": "→",
        "is": "∥",
        "to": "↘",
    }
    words = text.split()
    shorthand = " ".join(shorthand_dict.get(word, word) for word in words)
    return shorthand

def main():
    st.title("Shorthand Writing App")
    st.write("Convert text to Pitman shorthand writing.")

    option = st.selectbox("Select an option:", ("Learn Shorthand", "Convert Text"))

    if option == "Learn Shorthand":
        st.write("### Shorthand Basics")
        st.write("Here, you can learn the basics of shorthand writing techniques and symbols.")
        st.markdown("- **∧**: Represents 'and'\n- **⬤**: Represents 'the'\n- Expand this with more shorthand symbols.")

    elif option == "Convert Text":
        text_input = st.text_area("Enter text to convert into shorthand:")
        if st.button("Convert"):
            shorthand_output = text_to_shorthand(text_input)
            st.write("### Shorthand Writing")
            st.code(shorthand_output)

if __name__ == "__main__":
    main()