Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SequenceLabelingTool
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ZGC_INDEX
SequenceLabelingTool
Commits
da00ce9d
Commit
da00ce9d
authored
Dec 04, 2019
by
rico.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update detail
parent
4b630acb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
YEDDA_Annotator.py
YEDDA_Annotator.py
+6
-3
No files found.
YEDDA_Annotator.py
View file @
da00ce9d
...
@@ -84,15 +84,18 @@ class Example(Frame):
...
@@ -84,15 +84,18 @@ class Example(Frame):
#self.initUI()
#self.initUI()
def
setPressCommand
(
self
,
zgcCatCode
):
def
setPressCommand
(
self
,
zgcCatCode
):
zgcCatCode
=
'0101'
#zgcCatCode = '0506'
relationDf
=
pd
.
read_excel
(
'VW_Relation_Property.xlsx'
,
converters
=
{
'SubCategoryCode'
:
str
})
relationDf
=
pd
.
read_excel
(
'VW_Relation_Property.xlsx'
,
converters
=
{
'SubCategoryCode'
:
str
})
relationFilter
=
relationDf
[(
relationDf
[
'SubCategoryCode'
]
==
zgcCatCode
)
&
((
relationDf
[
'ISimportant'
]
==
1
)
|
relationDf
[
'ispeijian'
]
==
1
)][[
'SubTitle'
]]
.
reset_index
()
relationFilter
=
relationDf
[(
relationDf
[
'SubCategoryCode'
]
==
zgcCatCode
)
&
((
relationDf
[
'ISimportant'
]
==
1
)
|
relationDf
[
'ispeijian'
]
==
1
)][[
'SubTitle'
]]
.
reset_index
()
del
relationFilter
[
'index'
]
del
relationFilter
[
'index'
]
key_dict
=
dict
([(
k
,
v
)
for
k
,
v
in
zip
(
range
(
10
,
36
),[
chr
(
x
)
for
x
in
range
(
ord
(
'a'
),
ord
(
'z'
)
+
1
)])])
if
relationFilter
.
empty
:
if
relationFilter
.
empty
:
self
.
pressCommand
=
{
'1'
:
"error"
}
self
.
pressCommand
=
{
'1'
:
"error"
}
else
:
else
:
relationDict
=
dict
([(
str
(
k
),
v
)
for
k
,
v
in
zip
(
relationFilter
.
to_dict
()[
'SubTitle'
]
.
keys
(),
relationFilter
.
to_dict
()[
'SubTitle'
]
.
values
())])
relationDict
=
dict
([(
str
(
k
),
v
)
if
k
<
10
else
(
str
(
key_dict
[
k
]),
v
)
for
k
,
v
in
zip
(
relationFilter
.
to_dict
()[
'SubTitle'
]
.
keys
(),
relationFilter
.
to_dict
()[
'SubTitle'
]
.
values
())])
self
.
pressCommand
=
relationDict
self
.
pressCommand
=
relationDict
if
len
(
self
.
pressCommand
)
>
20
:
if
len
(
self
.
pressCommand
)
>
20
:
...
@@ -100,7 +103,6 @@ class Example(Frame):
...
@@ -100,7 +103,6 @@ class Example(Frame):
else
:
else
:
self
.
textRow
=
20
self
.
textRow
=
20
def
run_initUI
(
self
):
def
run_initUI
(
self
):
self
.
initUI
()
self
.
initUI
()
...
@@ -887,6 +889,7 @@ def main():
...
@@ -887,6 +889,7 @@ def main():
string
=
str
(
"指数类别:
%
s"
%
(
x
))
string
=
str
(
"指数类别:
%
s"
%
(
x
))
print
(
"指数类别:
%
s"
%
(
x
))
print
(
"指数类别:
%
s"
%
(
x
))
messagebox
.
showinfo
(
title
=
'Success'
,
message
=
string
)
messagebox
.
showinfo
(
title
=
'Success'
,
message
=
string
)
box
.
destroy
()
Button
(
box
,
text
=
"确认"
,
command
=
on_click
)
.
pack
()
Button
(
box
,
text
=
"确认"
,
command
=
on_click
)
.
pack
()
box
.
mainloop
()
box
.
mainloop
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment