Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bluejoyq
/
searchGuide
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
bluejoyq
2019-12-11 02:13:39 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
72e79a104ceae6db54bd61f458585e8a74db3aeb
72e79a10
1 parent
0858f51f
idiots cut~
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
10 deletions
api/apiRequest.js
model/app.py
searchGuide/components/RateBar/RateBar.js
searchGuide/components/RateMessage/RateMessage.js
searchGuide/components/RateSentence/RateSentence.js
searchGuide/reducers/search.js
api/apiRequest.js
View file @
72e79a1
...
...
@@ -39,7 +39,8 @@ apiRequest.ETRI = async ( query, argument ) => {
return
new
Promise
(
(
resolve
,
reject
)
=>
{
let
apiReqJson
=
apiRequestJsonFrame
;
apiReqJson
.
argument
=
argument
;
let
apiReqOption
=
{
headers
:
{
let
apiReqOption
=
{
headers
:
{
"Accept"
:
"application/json"
,
"Content-Type"
:
"application/json"
,
},
uri
:
URL
.
ETRI
+
query
,
body
:
JSON
.
stringify
(
apiReqJson
)
};
...
...
model/app.py
View file @
72e79a1
...
...
@@ -9,6 +9,9 @@ model = Doc2Vec.load("doc2vec.model")
app
=
Flask
(
__name__
)
@app.route
(
'/'
)
def
test
():
print
(
'test'
)
@app.route
(
'/analyze'
,
methods
=
[
'POST'
])
def
sendreq
():
...
...
searchGuide/components/RateBar/RateBar.js
View file @
72e79a1
...
...
@@ -47,7 +47,10 @@ export default RateBar = (props) => {
},
{
value
:
(
100
-
(
props
.
score
.
key
+
props
.
score
.
fix
)),
key
:
""
key
:
""
,
svg
:
{
fill
:
"rgba(0,0,0,0)"
,
},
}
]}
innerRadius
=
{
"50%"
}
...
...
@@ -76,7 +79,6 @@ const styles = StyleSheet.create({
width
:
'100%'
,
flexDirection
:
'row'
,
justifyContent
:
'center'
,
marginTop
:
3
,
},
colorContainer
:{
position
:
"absolute"
,
...
...
@@ -102,7 +104,7 @@ const styles = StyleSheet.create({
flexDirection
:
'row'
,
justifyContent
:
"flex-start"
,
alignItems
:
'flex-start'
,
marginBottom
:
10
,
marginBottom
:
5
,
},
chart
:{
height
:
125
,
...
...
@@ -134,8 +136,8 @@ const styles = StyleSheet.create({
borderRadius
:
5
},
Text
:{
fontSize
:
2
2
,
marginBottom
:
5
,
fontSize
:
2
0
,
marginBottom
:
2
,
fontFamily
:
"Bold"
,
},
message
:{
...
...
searchGuide/components/RateMessage/RateMessage.js
View file @
72e79a1
...
...
@@ -43,7 +43,7 @@ const RateMessage = ({keywordText, score }) => {
const
styles
=
StyleSheet
.
create
({
surface
:
{
padding
:
8
,
flex
:
0.2
2
5
,
flex
:
0.2
1
5
,
width
:
'95%'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
...
...
searchGuide/components/RateSentence/RateSentence.js
View file @
72e79a1
...
...
@@ -46,7 +46,7 @@ const RateSentence = ({originalText, fixedText, keywordText }) => {
const
styles
=
StyleSheet
.
create
({
surface
:
{
padding
:
8
,
flex
:
0.2
2
5
,
flex
:
0.2
3
5
,
width
:
'95%'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
...
...
searchGuide/reducers/search.js
View file @
72e79a1
...
...
@@ -35,7 +35,7 @@ export const submit = (text) => async (dispatch) => {
},
10000
);
try
{
//
const response = await readTest()
//const response = await readTest()
const
response
=
await
sendSearch
(
text
.
nativeEvent
.
text
);
// 에러시 error throw
...
...
@@ -45,9 +45,10 @@ export const submit = (text) => async (dispatch) => {
await
sqlite
.
insert
(
tempScore
.
full
);
let
pastRecords
=
await
sqlite
.
select
();
clearTimeout
(
timer
);
dispatch
(
{
type
:
SUCCESS
,
result
:
response
,
pastRecords
:
pastRecords
,
score
:
tempScore
})
clearTimeout
(
timer
);
}
catch
(
err
){
Alert
.
alert
(
...
...
Please
register
or
login
to post a comment