Spaces:
Sleeping
Sleeping
ultima versao
Browse files
__pycache__/app.cpython-310.pyc
CHANGED
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
|
|
app.py
CHANGED
@@ -7,12 +7,18 @@ from sklearn.feature_selection import f_classif
|
|
7 |
|
8 |
import pandas as pd
|
9 |
|
|
|
|
|
|
|
10 |
titulo = """CLONE - Studio Dashboard: "default" and "Default Project" does not give clear information about Alloy and Project unless description is read."""
|
11 |
descricao = """Steps To Reproduce: 1. On dashboard on studio 3.0, navigate to Develop tab. 2. Notice "default" and "Default Project" & "two-tabbed" and "Tabbed Application" names. Actual: User does not get clear information from names that one is alloy project and another one is Titanium project unless he reads the description below. Expected: Naming convention or icon corresponding must suggest type"""
|
12 |
|
13 |
titulo1 = """Ti.UI.Picker has no collection binding"""
|
14 |
descricao1 = """h3. original discussion http://developer.appcelerator.com/question/145992/databinding-on-picker h3. problem Collection binding is not implemented for Ti.UI.Picker as it is for Ti.UI.TableView and other generic Titaniums views (View, Window, ScrollView, etc...). h3. solution Support collection binding on Ti.UI.Picker just as it is on TableView. It will need special handling as the Ti.UI.Picker requires custom parsing for columns and rows. Something like this should be how it would work for devs: {code:xml} <Alloy> <Collection src="book" /> <Window class="container"> <Picker dataCollection="book"> <PickerRow title="{title}" /> </Picker> </Window> </Alloy> {code}"""
|
15 |
|
|
|
|
|
|
|
16 |
def calcula_MbR(titulo, descricao):
|
17 |
context = titulo + descricao
|
18 |
d = {"context": [context]}
|
@@ -21,16 +27,36 @@ def calcula_MbR(titulo, descricao):
|
|
21 |
story_points_MbR = model.predict(df["context"])
|
22 |
return story_points_MbR
|
23 |
|
24 |
-
def
|
25 |
-
model = load("model/
|
26 |
context = titulo + descricao
|
27 |
d = {"context": [context]}
|
28 |
df = pd.DataFrame(data=d, columns=["context"])
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
return story_points
|
31 |
|
32 |
-
def
|
33 |
-
model = load("model/
|
34 |
context = titulo + descricao
|
35 |
d = {"context": [context]}
|
36 |
df = pd.DataFrame(data=d, columns=["context"])
|
@@ -41,7 +67,7 @@ def calculaTFIDF(titulo, descricao):
|
|
41 |
return story_points
|
42 |
|
43 |
def calcula(titulo, descricao):
|
44 |
-
return calcula_MbR(titulo, descricao),
|
45 |
|
46 |
demo = gr.Interface(fn=calcula,
|
47 |
inputs=[gr.Textbox(placeholder="Título", label="Título"),
|
@@ -50,7 +76,7 @@ demo = gr.Interface(fn=calcula,
|
|
50 |
gr.Textbox(label="Story Points Estimado NEOSP"),
|
51 |
gr.Textbox(label="Story Points Estimado TFIDF-SVM")],
|
52 |
title="Agile Task Story Point Estimator - TAWOS - Alloy",
|
53 |
-
examples=[[titulo, descricao]]
|
54 |
)
|
55 |
|
56 |
demo.launch()
|
|
|
7 |
|
8 |
import pandas as pd
|
9 |
|
10 |
+
from textblob import TextBlob
|
11 |
+
import textstat
|
12 |
+
|
13 |
titulo = """CLONE - Studio Dashboard: "default" and "Default Project" does not give clear information about Alloy and Project unless description is read."""
|
14 |
descricao = """Steps To Reproduce: 1. On dashboard on studio 3.0, navigate to Develop tab. 2. Notice "default" and "Default Project" & "two-tabbed" and "Tabbed Application" names. Actual: User does not get clear information from names that one is alloy project and another one is Titanium project unless he reads the description below. Expected: Naming convention or icon corresponding must suggest type"""
|
15 |
|
16 |
titulo1 = """Ti.UI.Picker has no collection binding"""
|
17 |
descricao1 = """h3. original discussion http://developer.appcelerator.com/question/145992/databinding-on-picker h3. problem Collection binding is not implemented for Ti.UI.Picker as it is for Ti.UI.TableView and other generic Titaniums views (View, Window, ScrollView, etc...). h3. solution Support collection binding on Ti.UI.Picker just as it is on TableView. It will need special handling as the Ti.UI.Picker requires custom parsing for columns and rows. Something like this should be how it would work for devs: {code:xml} <Alloy> <Collection src="book" /> <Window class="container"> <Picker dataCollection="book"> <PickerRow title="{title}" /> </Picker> </Window> </Alloy> {code}"""
|
18 |
|
19 |
+
titulo2 = """Enable more complex notation in binding"""
|
20 |
+
descricao2 = """Allow developers to use syntax like the following in collection/model bindings: {code:xml} <Alloy> <Model src=""someModel""/> <Window title=""{someModel.title} {someModel.subtitle}""/> </Alloy> {code} Basically, instead of assuming the whole property needs to be wrapped in \{\}, allow developers to put as many of them in the attribute as they want."""
|
21 |
+
|
22 |
def calcula_MbR(titulo, descricao):
|
23 |
context = titulo + descricao
|
24 |
d = {"context": [context]}
|
|
|
27 |
story_points_MbR = model.predict(df["context"])
|
28 |
return story_points_MbR
|
29 |
|
30 |
+
def calcula_neosp(titulo, descricao):
|
31 |
+
model = load("model/model_tawos_aloy_neosp.pkl")
|
32 |
context = titulo + descricao
|
33 |
d = {"context": [context]}
|
34 |
df = pd.DataFrame(data=d, columns=["context"])
|
35 |
+
|
36 |
+
# features de legibilidade
|
37 |
+
df["gunning_fog"] = df['context'].apply(textstat.gunning_fog)#
|
38 |
+
df["flesch_reading_ease"] = df['context'].apply(textstat.flesch_reading_ease)#
|
39 |
+
df["flesch_kincaid_grade"] = df['context'].apply(textstat.flesch_kincaid_grade)#
|
40 |
+
df["smog_index"] = df['context'].apply(textstat.smog_index)
|
41 |
+
df["coleman_liau_index"] = df['context'].apply(textstat.coleman_liau_index)#
|
42 |
+
df["automated_readability_index"] = df['context'].apply(textstat.automated_readability_index) #
|
43 |
+
df["dale_chall_readability_score"] = df['context'].apply(textstat.dale_chall_readability_score)#
|
44 |
+
df["difficult_words"] = df['context'].apply(textstat.difficult_words)
|
45 |
+
df["linsear_write_formula"] = df['context'].apply(textstat.linsear_write_formula)#
|
46 |
+
|
47 |
+
# feature de sentimento
|
48 |
+
df["polarity"] = df["context"].apply(lambda x: TextBlob(x).sentiment.polarity)
|
49 |
+
df["subjectivity"] = df["context"].apply(lambda x: TextBlob(x).sentiment.subjectivity)
|
50 |
+
|
51 |
+
X = df[["gunning_fog", "flesch_reading_ease", "flesch_kincaid_grade", "smog_index", "coleman_liau_index",
|
52 |
+
"automated_readability_index", "dale_chall_readability_score", "difficult_words", "linsear_write_formula",
|
53 |
+
"polarity", "subjectivity"]]
|
54 |
+
|
55 |
+
story_points = model.predict(X)
|
56 |
return story_points
|
57 |
|
58 |
+
def calculaTFIDFSVM(titulo, descricao):
|
59 |
+
model = load("model/model_tawos_aloy_tfidf_svm.pkl.pkl")
|
60 |
context = titulo + descricao
|
61 |
d = {"context": [context]}
|
62 |
df = pd.DataFrame(data=d, columns=["context"])
|
|
|
67 |
return story_points
|
68 |
|
69 |
def calcula(titulo, descricao):
|
70 |
+
return calcula_MbR(titulo, descricao), calcula_neosp(titulo, descricao), 0
|
71 |
|
72 |
demo = gr.Interface(fn=calcula,
|
73 |
inputs=[gr.Textbox(placeholder="Título", label="Título"),
|
|
|
76 |
gr.Textbox(label="Story Points Estimado NEOSP"),
|
77 |
gr.Textbox(label="Story Points Estimado TFIDF-SVM")],
|
78 |
title="Agile Task Story Point Estimator - TAWOS - Alloy",
|
79 |
+
examples=[[titulo, descricao], [titulo1, descricao1], [titulo2, descricao2]]
|
80 |
)
|
81 |
|
82 |
demo.launch()
|
dataset/ALOY_deep-se.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
model/model_tawos_aloy_neosp.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3760ed763dea97ced7f0b1418fbbe01cb44245cf1cfac65fbf1ba524f3399881
|
3 |
+
size 15627
|
model/{model_tawos_aloy.pkl → model_tawos_aloy_tfidf_svm.pkl}
RENAMED
File without changes
|