Spaces:
Sleeping
Sleeping
miesnerjacob
commited on
Commit
β’
59fcc9f
1
Parent(s):
9f8acd9
changed welcome page text
Browse files- app.py +2 -2
- emotion_detection.py +4 -3
- keyword_extraction.py +2 -3
- named_entity_recognition.py +4 -3
- part_of_speech_tagging.py +1 -6
- sentiment_analysis.py +4 -3
app.py
CHANGED
@@ -103,7 +103,7 @@ if page == "Welcome!":
|
|
103 |
* Emotion Detection
|
104 |
* Named Entity Recognition
|
105 |
|
106 |
-
More features may be added in the future including article/tweet/youtube input
|
107 |
depending on community feedback. Please reach out to me at miesner.jacob@gmail.com or at my Linkedin page listed
|
108 |
below if you have ideas or suggestions for improvement.
|
109 |
|
@@ -123,7 +123,7 @@ if page == "Welcome!":
|
|
123 |
|
124 |
[Jacob Miesner's Website](https://www.jacobmiesner.com)
|
125 |
|
126 |
-
* The prediction justification for some of the tasks are printed as the model views them. For this reason the text may contain special tokens like [CLS] or [SEP] or even hashtags splitting words. If you are
|
127 |
"""
|
128 |
)
|
129 |
|
|
|
103 |
* Emotion Detection
|
104 |
* Named Entity Recognition
|
105 |
|
106 |
+
More features may be added in the future including article/tweet/youtube input, improved text annotation, model quality improvements,
|
107 |
depending on community feedback. Please reach out to me at miesner.jacob@gmail.com or at my Linkedin page listed
|
108 |
below if you have ideas or suggestions for improvement.
|
109 |
|
|
|
123 |
|
124 |
[Jacob Miesner's Website](https://www.jacobmiesner.com)
|
125 |
|
126 |
+
* The prediction justification for some of the tasks are printed as the model views them. For this reason the text may contain special tokens like [CLS] or [SEP] or even hashtags splitting words. If you are are familiar with language models you will recognize these, if you do not have prior experience with language models you can ignore these characters.
|
127 |
"""
|
128 |
)
|
129 |
|
emotion_detection.py
CHANGED
@@ -5,11 +5,12 @@ import pandas as pd
|
|
5 |
|
6 |
|
7 |
class EmotionDetection:
|
8 |
-
"""
|
9 |
|
10 |
Attributes:
|
11 |
-
|
12 |
-
|
|
|
13 |
"""
|
14 |
|
15 |
def __init__(self):
|
|
|
5 |
|
6 |
|
7 |
class EmotionDetection:
|
8 |
+
""" Emotion Detection on text data
|
9 |
|
10 |
Attributes:
|
11 |
+
tokenizer: An instance of Hugging Face Tokenizer
|
12 |
+
model: An instance of Hugging Face Model
|
13 |
+
explainer: An instance of SequenceClassificationExplainer from Transformers interpret
|
14 |
"""
|
15 |
|
16 |
def __init__(self):
|
keyword_extraction.py
CHANGED
@@ -6,11 +6,10 @@ import en_core_web_sm
|
|
6 |
|
7 |
|
8 |
class KeywordExtractor:
|
9 |
-
"""
|
10 |
|
11 |
Attributes:
|
12 |
-
|
13 |
-
instance_attribute (str): The instance attribute
|
14 |
"""
|
15 |
|
16 |
def __init__(self):
|
|
|
6 |
|
7 |
|
8 |
class KeywordExtractor:
|
9 |
+
""" Keyword Extraction on text data
|
10 |
|
11 |
Attributes:
|
12 |
+
nlp: An instance English pipeline optimized for CPU for spacy
|
|
|
13 |
"""
|
14 |
|
15 |
def __init__(self):
|
named_entity_recognition.py
CHANGED
@@ -3,11 +3,12 @@ from transformers import pipeline
|
|
3 |
|
4 |
|
5 |
class NamedEntityRecognition:
|
6 |
-
"""
|
7 |
|
8 |
Attributes:
|
9 |
-
|
10 |
-
|
|
|
11 |
"""
|
12 |
|
13 |
def __init__(self):
|
|
|
3 |
|
4 |
|
5 |
class NamedEntityRecognition:
|
6 |
+
""" Named Entity Recognition on text data
|
7 |
|
8 |
Attributes:
|
9 |
+
tokenizer: An instance of Hugging Face Tokenizer
|
10 |
+
model: An instance of Hugging Face Model
|
11 |
+
nlp: An instance of Hugging Face Named Entity Recognition pipeline
|
12 |
"""
|
13 |
|
14 |
def __init__(self):
|
part_of_speech_tagging.py
CHANGED
@@ -5,12 +5,7 @@ nltk.download('averaged_perceptron_tagger')
|
|
5 |
|
6 |
|
7 |
class POSTagging:
|
8 |
-
"""
|
9 |
-
|
10 |
-
Attributes:
|
11 |
-
class_attribute (str): (class attribute) The class attribute
|
12 |
-
instance_attribute (str): The instance attribute
|
13 |
-
"""
|
14 |
|
15 |
def __init__(self):
|
16 |
pass
|
|
|
5 |
|
6 |
|
7 |
class POSTagging:
|
8 |
+
"""Part of Speech Tagging on text data"""
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
def __init__(self):
|
11 |
pass
|
sentiment_analysis.py
CHANGED
@@ -5,11 +5,12 @@ import pandas as pd
|
|
5 |
|
6 |
|
7 |
class SentimentAnalysis:
|
8 |
-
"""
|
9 |
|
10 |
Attributes:
|
11 |
-
|
12 |
-
|
|
|
13 |
"""
|
14 |
|
15 |
def __init__(self):
|
|
|
5 |
|
6 |
|
7 |
class SentimentAnalysis:
|
8 |
+
""" Sentiment on text data
|
9 |
|
10 |
Attributes:
|
11 |
+
tokenizer: An instance of Hugging Face Tokenizer
|
12 |
+
model: An instance of Hugging Face Model
|
13 |
+
explainer: An instance of SequenceClassificationExplainer from Transformers interpret
|
14 |
"""
|
15 |
|
16 |
def __init__(self):
|