Ver código fonte

预处理代码同步

luojiehua 4 anos atrás
pai
commit
c9d3969bbc
100 arquivos alterados com 1587 adições e 22 exclusões
  1. BIN
      examples/coreline/bin/None-2021-01-25要素标注统计.xls
  2. BIN
      examples/coreline/bin/None-2021-03-25要素标注统计.xls
  3. BIN
      examples/coreline/bin/None-2021-04-25要素标注统计.xls
  4. BIN
      examples/coreline/bin/None-2021-05-25要素标注统计.xls
  5. BIN
      examples/coreline/bin/None-2021-06-25要素标注统计.xls
  6. BIN
      examples/coreline/bin/None-2021-07-25要素标注统计.xls
  7. BIN
      examples/coreline/bin/check.xlsx
  8. BIN
      examples/coreline/bin/none-2021-02-25要素标注统计.xls
  9. 143 19
      examples/coreline/bin/settlement.py
  10. 117 0
      examples/coreline/bin/statistic.py
  11. 1 1
      examples/coreline/gunicorn_django.py
  12. 5 1
      examples/coreline/settings.py
  13. 11 1
      examples/nginx.conf
  14. 1 0
      examples/test/__init__.py
  15. 49 0
      examples/test/annotation.conf
  16. 7 0
      examples/test/articles.csv
  17. BIN
      examples/test/bin/2020-08-01-2020-08-31要素标注统计.xls
  18. BIN
      examples/test/bin/None-2020-09-25要素标注统计.xls
  19. BIN
      examples/test/bin/None-2020-10-31要素标注统计.xls
  20. BIN
      examples/test/bin/None-2020-11-25要素标注统计.xls
  21. 28 0
      examples/test/bin/csv_to_iepy.py
  22. 76 0
      examples/test/bin/gazettes_loader.py
  23. 59 0
      examples/test/bin/iepy_rules_runner.py
  24. 184 0
      examples/test/bin/iepy_runner.py
  25. 12 0
      examples/test/bin/manage.py
  26. 96 0
      examples/test/bin/preprocess.py
  27. 149 0
      examples/test/bin/rules_verifier.py
  28. 251 0
      examples/test/bin/settlement.py
  29. BIN
      examples/test/bin/分组_1.xls
  30. BIN
      examples/test/bin/分组_10.xls
  31. BIN
      examples/test/bin/分组_2.xls
  32. BIN
      examples/test/bin/分组_3.xls
  33. BIN
      examples/test/bin/分组_4.xls
  34. BIN
      examples/test/bin/分组_5.xls
  35. BIN
      examples/test/bin/分组_6.xls
  36. BIN
      examples/test/bin/分组_7.xls
  37. BIN
      examples/test/bin/分组_8.xls
  38. BIN
      examples/test/bin/分组_9.xls
  39. 20 0
      examples/test/extractor_config.json
  40. 2 0
      examples/test/rules.py
  41. 180 0
      examples/test/settings.py
  42. BIN
      examples/test/test.sqlite
  43. BIN
      iepy/selfpreprocess/BiddingKG/dl/entityLink/list_entitys_pair.pk
  44. BIN
      iepy/selfpreprocess/BiddingKG/dl/entityLink/list_entitys_pair_0_150.pk
  45. BIN
      iepy/selfpreprocess/BiddingKG/dl/entityLink/list_entitys_pair_150_3000.pk
  46. 2 0
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-0/checkpoint
  47. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-0/model.ckpt.data-00000-of-00001
  48. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-0/model.ckpt.index
  49. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-0/model.ckpt.meta
  50. 3 0
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-1/checkpoint
  51. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-1/model.ckpt.data-00000-of-00001
  52. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-1/model.ckpt.index
  53. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-1/model.ckpt.meta
  54. 12 0
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-10/checkpoint
  55. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-10/model.ckpt.data-00000-of-00001
  56. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-10/model.ckpt.index
  57. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-10/model.ckpt.meta
  58. 13 0
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-11/checkpoint
  59. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-11/model.ckpt.data-00000-of-00001
  60. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-11/model.ckpt.index
  61. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-11/model.ckpt.meta
  62. 14 0
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-12/checkpoint
  63. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-12/model.ckpt.data-00000-of-00001
  64. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-12/model.ckpt.index
  65. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-12/model.ckpt.meta
  66. 15 0
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-13/checkpoint
  67. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-13/model.ckpt.data-00000-of-00001
  68. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-13/model.ckpt.index
  69. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-13/model.ckpt.meta
  70. 16 0
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-14/checkpoint
  71. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-14/model.ckpt.data-00000-of-00001
  72. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-14/model.ckpt.index
  73. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-14/model.ckpt.meta
  74. 17 0
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-15/checkpoint
  75. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-15/model.ckpt.data-00000-of-00001
  76. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-15/model.ckpt.index
  77. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-15/model.ckpt.meta
  78. 18 0
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-16/checkpoint
  79. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-16/model.ckpt.data-00000-of-00001
  80. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-16/model.ckpt.index
  81. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-16/model.ckpt.meta
  82. 19 0
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-17/checkpoint
  83. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-17/model.ckpt.data-00000-of-00001
  84. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-17/model.ckpt.index
  85. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-17/model.ckpt.meta
  86. 20 0
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-18/checkpoint
  87. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-18/model.ckpt.data-00000-of-00001
  88. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-18/model.ckpt.index
  89. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-18/model.ckpt.meta
  90. 21 0
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-19/checkpoint
  91. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-19/model.ckpt.data-00000-of-00001
  92. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-19/model.ckpt.index
  93. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-19/model.ckpt.meta
  94. 4 0
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-2/checkpoint
  95. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-2/model.ckpt.data-00000-of-00001
  96. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-2/model.ckpt.index
  97. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-2/model.ckpt.meta
  98. 22 0
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-20/checkpoint
  99. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-20/model.ckpt.data-00000-of-00001
  100. BIN
      iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-20/model.ckpt.index

BIN
examples/coreline/bin/None-2021-01-25要素标注统计.xls


BIN
examples/coreline/bin/None-2021-03-25要素标注统计.xls


BIN
examples/coreline/bin/None-2021-04-25要素标注统计.xls


BIN
examples/coreline/bin/None-2021-05-25要素标注统计.xls


BIN
examples/coreline/bin/None-2021-06-25要素标注统计.xls


BIN
examples/coreline/bin/None-2021-07-25要素标注统计.xls


BIN
examples/coreline/bin/check.xlsx


BIN
examples/coreline/bin/none-2021-02-25要素标注统计.xls


+ 143 - 19
examples/coreline/bin/settlement.py

@@ -26,6 +26,118 @@ def object_to_dict(obj,class_model):
         _dict[field.name] = value
     return _dict
 
+def timeAdd(_time,days):
+    a = time.mktime(time.strptime(_time,'%Y-%m-%d'))+86400*days
+    _time1 = time.strftime("%Y-%m-%d",time.localtime(a))
+    return _time1
+
+def getWage(user,start_time,end_time,percentPass):
+    import time
+    from django.db import connection
+    cursor = connection.cursor()
+
+
+    current_begin = max(timeAdd(end_time,-30),start_time)
+
+    print(user,start_time,current_begin,end_time)
+
+    sql = " select count(1) from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s'"%(user,end_time,start_time)
+    cursor.execute(sql)
+    doc_count = cursor.fetchall()[0][0]
+    print("doc_count",doc_count)
+    sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s' order by edittime desc limit 1200) and value like '%s' "%(user,end_time,current_begin,"T%")
+    cursor.execute(sql)
+    t_count = cursor.fetchall()[0][0]
+    print("t_count",t_count)
+    sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s' order by edittime desc limit 1200) and value like '%s' "%(user,end_time,current_begin,"R%")
+    cursor.execute(sql)
+    r_count = cursor.fetchall()[0][0]
+    print("r_count",r_count)
+    sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s') and value like '%s' "%(user,end_time,current_begin,"T%")
+    cursor.execute(sql)
+    all_t_count = cursor.fetchall()[0][0]
+    print("all_t_count",all_t_count)
+    sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s') and value like '%s' "%(user,end_time,current_begin,"R%")
+    cursor.execute(sql)
+    all_r_count = cursor.fetchall()[0][0]
+    print("all_r_count",all_r_count)
+
+    sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s') and value like '%s' "%(user,current_begin,start_time,"T%")
+    cursor.execute(sql)
+    other_t_count = cursor.fetchall()[0][0]
+    print("other_t_count",other_t_count)
+
+    sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s') and value like '%s' "%(user,current_begin,start_time,"R%")
+    cursor.execute(sql)
+    other_r_count = cursor.fetchall()[0][0]
+    print("other_r_count",other_r_count)
+
+    wage = round(0.015*(t_count+other_t_count)+0.025*(r_count+other_r_count)+(all_t_count-t_count)*0.02+(all_r_count-r_count)*0.03,2)
+
+    # and_sql = " and 1=1 "
+    # if start_time is not None:
+    #     and_sql += " and to_char(edittime,'yyyy-mm-dd')>'%s' "%start_time
+    #
+    # if end_time is not None:
+    #     and_sql += " and to_char(edittime,'yyyy-mm-dd')<='%s'"%end_time
+    #
+    #
+    # sql = " select human_identifier,to_char(edittime,'yyyy-mm-dd hh24:mi:ss') from corpus_iedocument where edituser='%s' %s order by edittime asc" %(user,and_sql)
+    # cursor.execute(sql)
+    # list_docid = []
+    # list_t = []
+    # set_docid_before = set()
+    # _time_split = time.mktime(time.strptime("2021-05-07 14:00:00","%Y-%m-%d %H:%M:%S"))
+    # for row in cursor.fetchall():
+    #     list_docid.append(row[0])
+    #     _et = time.mktime(time.strptime(row[1],"%Y-%m-%d %H:%M:%S"))
+    #     if _et<_time_split:
+    #         set_docid_before.add(row[0])
+    # set_first = set(list_docid[:1200])
+    # sql = " select document_id,value from brat_bratannotation where document_id in(select human_identifier from corpus_iedocument where edituser='%s' %s) "%(user,and_sql)
+    # cursor.execute(sql)
+    # eleCount = 0
+    # relCount = 0
+    # wage = 0
+    #
+    # for document_id,value in cursor.fetchall():
+    #     if document_id in set_first:
+    #         if document_id in set_docid_before:
+    #             if len(value.strip())>0:
+    #                 if value[0]=="T":
+    #                     eleCount += 1
+    #                     wage += 0.03
+    #                 else:
+    #                     relCount += 1
+    #                     wage += 0.05
+    #
+    #         else:
+    #             if len(value.strip())>0:
+    #                 if value[0]=="T":
+    #                     eleCount += 1
+    #                     wage += 0.015
+    #                 else:
+    #                     relCount += 1
+    #                     wage += 0.025
+    #
+    #     else:
+    #         if document_id in set_docid_before:
+    #             if len(value.strip())>0:
+    #                 if value[0]=="T":
+    #                     eleCount += 1
+    #                     wage += 0.04
+    #                 else:
+    #                     relCount += 1
+    #                     wage += 0.06
+    #         else:
+    #             if len(value.strip())>0:
+    #                 if value[0]=="T":
+    #                     eleCount += 1
+    #                     wage += 0.02
+    #                 else:
+    #                     relCount += 1
+    #                     wage += 0.03
+    return {"docCount":doc_count,"eleCount":other_t_count+all_t_count,"relCount":other_r_count+all_r_count,"wage":round(wage*percentPass,2)}
 
 class Settlement():
 
@@ -53,23 +165,34 @@ class Settlement():
                 else:
                     time_begin = "2020-08-01"
 
-                sql = " select count(1) from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s'"%(_user,time_end,time_begin)
-                cursor.execute(sql)
-                doc_count = cursor.fetchall()[0][0]
-                sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s' order by edittime desc limit 1200) and value like '%s' "%(_user,time_end,time_begin,"T%")
-                cursor.execute(sql)
-                t_count = cursor.fetchall()[0][0]
-                sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s' order by edittime desc limit 1200) and value like '%s' "%(_user,time_end,time_begin,"R%")
-                cursor.execute(sql)
-                r_count = cursor.fetchall()[0][0]
-                sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s') and value like '%s' "%(_user,time_end,time_begin,"T%")
-                cursor.execute(sql)
-                all_t_count = cursor.fetchall()[0][0]
-                sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s') and value like '%s' "%(_user,time_end,time_begin,"R%")
-                cursor.execute(sql)
-                all_r_count = cursor.fetchall()[0][0]
-                wage = round(0.03*t_count+0.05*r_count+(all_t_count-t_count)*0.04+(all_r_count-r_count)*0.06,2)
-                print(doc_count,t_count,r_count,wage)
+                print(_user,time_begin,time_end)
+                dict_wage = getWage(_user,time_begin,time_end,0.99)
+
+
+                # sql = " select count(1) from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s'"%(_user,time_end,time_begin)
+                # cursor.execute(sql)
+                # doc_count = cursor.fetchall()[0][0]
+                # sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s' order by edittime desc limit 1200) and value like '%s' "%(_user,time_end,time_begin,"T%")
+                # cursor.execute(sql)
+                # t_count = cursor.fetchall()[0][0]
+                # sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s' order by edittime desc limit 1200) and value like '%s' "%(_user,time_end,time_begin,"R%")
+                # cursor.execute(sql)
+                # r_count = cursor.fetchall()[0][0]
+                # sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s') and value like '%s' "%(_user,time_end,time_begin,"T%")
+                # cursor.execute(sql)
+                # all_t_count = cursor.fetchall()[0][0]
+                # sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s') and value like '%s' "%(_user,time_end,time_begin,"R%")
+                # cursor.execute(sql)
+                # all_r_count = cursor.fetchall()[0][0]
+                # wage = round(0.015*t_count+0.025*r_count+(all_t_count-t_count)*0.02+(all_r_count-r_count)*0.03,2)
+                doc_count = dict_wage["docCount"]
+                t_count = dict_wage['eleCount']
+                r_count = dict_wage["relCount"]
+                wage = dict_wage["wage"]
+                all_t_count = t_count
+                all_r_count = r_count
+
+                print(_user,doc_count,t_count,r_count,wage)
                 payrolls = Payroll.objects.filter(Q(user=_user)& Q(begin_time=time_begin) & Q(end_time=time_end))
                 if len(payrolls)==0:
                     _payroll = Payroll.objects.create(**{"user":_user,"doc_count":doc_count,"begin_time":time_begin,"end_time":time_end,"t_count":all_t_count,"r_count":all_r_count,"wage":wage})
@@ -291,9 +414,10 @@ def makeCheck():
 if __name__=="__main__":
     settle = Settlement()
     # settle.makeMigrate("test","2020-08-01","2020-08-31")
-    settle_end = "2021-02-25"
-    # settle.makePayroll(["test1","test7","test17","test2","test10","test11","test12","test20","test3","test19","test22"],"2020-08-01",settle_end)
+    settle_end = "2021-07-25"
+    settle.makePayroll(["test2","test9","test10","test11","test12","test16","test20","test25","test19","test22","test1","test7","test8","test17","test21","test26"],"2020-08-01",settle_end)
     settle.exportPayroll(begin_time=None,end_time=settle_end)
+
     # settle.createUser_batch(batch_size=102)
     # settle.exportLabels()
     # settle.filter()

+ 117 - 0
examples/coreline/bin/statistic.py

@@ -0,0 +1,117 @@
+
+import iepy
+iepy.setup(__file__)
+import time
+import pandas as pd
+
+def statis():
+    from django.db import connection
+
+    cursor = connection.cursor()
+
+    df_data = {"user":[],"count":[],"online":[],"secondperdoc":[]}
+    list_user = ["test2","test9","test10","test11","test12","test20","test1","test7","test17","test21","test3","test19","test22"]
+    for _user in list_user:
+        sql = " select to_char(edittime,'yyyy-mm-dd hh24:mi:ss') as et  from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='2021-05-25' and to_char(edittime,'yyyy-mm-dd')>'2021-04-25' order by edittime asc"%_user
+
+        cursor.execute(sql)
+
+        rows = cursor.fetchall()
+
+        list_et = []
+        list_distance = []
+        for row in rows:
+            _t = time.mktime(time.strptime(row[0],'%Y-%m-%d %H:%M:%S'))
+            list_et.append(_t)
+        for i in range(1,len(list_et)):
+            _d = list_et[i]-list_et[i-1]
+            if _d<10*60:
+                list_distance.append(_d)
+        df_data["user"].append(_user)
+        df_data["count"].append(len(list_et))
+        df_data["online"].append(sum(list_distance)/60/60/30)
+        df_data["secondperdoc"].append(sum(list_distance)/len(list_et))
+    df = pd.DataFrame(df_data)
+    df.to_excel("check.xlsx")
+
+def getWage(user,start_time,end_time,percentPass):
+    import time
+    from django.db import connection
+    cursor = connection.cursor()
+    and_sql = " and 1=1 "
+    if start_time is not None:
+        and_sql += " and to_char(edittime,'yyyy-mm-dd')>'%s' "%start_time
+
+    if end_time is not None:
+        and_sql += " and to_char(edittime,'yyyy-mm-dd')<='%s'"%end_time
+
+    sql = " select human_identifier,to_char(edittime,'yyyy-mm-dd hh24:mi:ss') from corpus_iedocument where edituser='%s' %s order by edittime asc" %(user,and_sql)
+    cursor.execute(sql)
+    list_docid = []
+    list_t = []
+    set_docid_before = set()
+    _time_split = time.mktime(time.strptime("2021-05-07 14:00:00","%Y-%m-%d %H:%M:%S"))
+    for row in cursor.fetchall():
+        list_docid.append(row[0])
+        _et = time.mktime(time.strptime(row[1],"%Y-%m-%d %H:%M:%S"))
+        if _et<_time_split:
+            set_docid_before.add(row[0])
+    set_first = set(list_docid[:1200])
+    sql = " select document_id,value from brat_bratannotation where document_id in(select human_identifier from corpus_iedocument where edituser='%s' %s) "%(user,and_sql)
+    cursor.execute(sql)
+    eleCount = 0
+    relCount = 0
+    wage = 0
+
+    for document_id,value in cursor.fetchall():
+        if document_id in set_first:
+            if document_id in set_docid_before:
+                if len(value.strip())>0:
+                    if value[0]=="T":
+                        eleCount += 1
+                        wage += 0.03
+                    else:
+                        relCount += 1
+                        wage += 0.05
+
+            else:
+                if len(value.strip())>0:
+                    if value[0]=="T":
+                        eleCount += 1
+                        wage += 0.015
+                    else:
+                        relCount += 1
+                        wage += 0.025
+
+        else:
+            if document_id in set_docid_before:
+                if len(value.strip())>0:
+                    if value[0]=="T":
+                        eleCount += 1
+                        wage += 0.04
+                    else:
+                        relCount += 1
+                        wage += 0.06
+            else:
+                if len(value.strip())>0:
+                    if value[0]=="T":
+                        eleCount += 1
+                        wage += 0.02
+                    else:
+                        relCount += 1
+                        wage += 0.03
+    return {"docCount":len(list_docid),"eleCount":eleCount,"relCount":relCount,"wage":round(wage*percentPass,2)}
+
+if __name__=="__main__":
+    statis()
+    # from django.db import connection
+    #
+    # user = "test7"
+    # cursor = connection.cursor()
+    # sql = 'select max(end_time) from corpus_payroll where "user"=\'%s\''%(user)
+    # cursor.execute(sql)
+    # rows = cursor.fetchall()
+    # start_time = rows[0][0]
+    # print(getWage("test7","2021-04-25","2021-05-25",0.9))
+
+

+ 1 - 1
examples/coreline/gunicorn_django.py

@@ -9,7 +9,7 @@ import multiprocessing
 bind = '127.0.0.1:8001'      #绑定ip和端口号
 backlog = 512                #监听队列
 # chdir = '/label/iepy-develop/examples/coreline/bin'  #gunicorn要切换到的目的工作目录
-timeout = 30      #超时
+timeout = 200      #超时
 worker_class = 'gevent' #使用gevent模式,还可以使用sync 模式,默认的是sync模式
 
 workers = multiprocessing.cpu_count() * 2 + 1    #进程数

+ 5 - 1
examples/coreline/settings.py

@@ -6,6 +6,10 @@ For the full list of settings and their values, see
 https://docs.djangoproject.com/en/1.7/ref/settings/
 """
 
+import sys
+import os
+sys.path.append(os.path.dirname(__file__)+"/../..")
+
 from iepy.webui.webui.settings import *
 from django.conf import settings
 
@@ -34,7 +38,7 @@ DATABASES = {
         'NAME': 'iepy',
         'USER': 'postgres',
         'PASSWORD': 'postgres',
-        'HOST': '192.168.2.101',
+        'HOST': '192.168.2.103',
         'PORT': '5432'
     }
 }

+ 11 - 1
examples/nginx.conf

@@ -10,7 +10,7 @@ worker_processes  10;
 
 
 events {
-    worker_connections  1024;
+    worker_connections  2024;
 }
 
 
@@ -49,6 +49,16 @@ http {
 
 		# 不记录访问不到 favicon.ico 的报错日志
 		#location = /favicon.ico { access_log off; log_not_found off; }
+			large_client_header_buffers 4 16k;   # 读取大型客户端请求头的缓冲区的最大数量和大小
+			client_max_body_size 300m;           #设置nginx能处理的最大请求主体大小。
+			client_body_buffer_size 128k;        #请求主体的缓冲区大小。
+			proxy_connect_timeout 600;
+			proxy_read_timeout 600;
+			proxy_send_timeout 600;
+			proxy_buffer_size 64k;
+			proxy_buffers 4 32k;
+			proxy_busy_buffers_size 64k;
+			proxy_temp_file_write_size 64k;
 		
 		
 		location /static/ {

+ 1 - 0
examples/test/__init__.py

@@ -0,0 +1 @@
+from . import rules

+ 49 - 0
examples/test/annotation.conf

@@ -0,0 +1,49 @@
+# -*- Mode: Text; tab-width: 8; indent-tabs-mode: nil; coding: utf-8; -*-
+# vim:set ft=conf ts=2 sw=2 sts=2 autoindent:
+
+# Simple text-based definitions of entity, relation and event types
+# and event attributes for the BioNLP Shared Task 2011 EPI task.
+
+
+[entities]
+
+Protein
+	abc
+Entity
+
+
+[relations]
+
+Equiv	Arg1:Protein, Arg2:Protein, <REL-TYPE>:symmetric-transitive
+Equiv	Arg1:Entity, Arg2:Entity, <REL-TYPE>:symmetric-transitive
+
+# (No entity nestings permitted in EPI. Could be defined using special
+# relation type ENTITY-NESTING if necessary.)
+
+
+[events]
+
+Catalysis	Theme:<EVENT>, Cause:Protein
+----------------------------------------
+DNA_methylation|GO:0006306	Theme:Protein, Site?:Entity
+DNA_demethylation|GO:0080111	Theme:Protein, Site?:Entity
+----------------------------------------
+Acetylation|GO:0006473	Theme:Protein, Site?:Entity, Contextgene?:Protein
+Methylation|GO:0006479	Theme:Protein, Site?:Entity, Contextgene?:Protein
+Glycosylation|GO:0006486	Theme:Protein, Site?:Entity, Sidechain?:Entity
+Hydroxylation|GO:0018126	Theme:Protein, Site?:Entity
+Phosphorylation|GO:0006468	Theme:Protein, Site?:Entity
+Ubiquitination|GO:0016567	Theme:Protein, Site?:Entity
+----------------------------------------
+Deacetylation|GO:0006476	Theme:Protein, Site?:Entity, Contextgene?:Protein
+Demethylation|GO:0006482	Theme:Protein, Site?:Entity, Contextgene?:Protein
+Deglycosylation|GO:0006517	Theme:Protein, Site?:Entity, Sidechain?:Entity
+Dehydroxylation|GO:-------	Theme:Protein, Site?:Entity
+Dephosphorylation|GO:0006470	Theme:Protein, Site?:Entity
+Deubiquitination|GO:0016579	Theme:Protein, Site?:Entity
+
+
+[attributes]
+
+Negation	Arg:<EVENT>
+Speculation	Arg:<EVENT>

Diferenças do arquivo suprimidas por serem muito extensas
+ 7 - 0
examples/test/articles.csv


BIN
examples/test/bin/2020-08-01-2020-08-31要素标注统计.xls


BIN
examples/test/bin/None-2020-09-25要素标注统计.xls


BIN
examples/test/bin/None-2020-10-31要素标注统计.xls


BIN
examples/test/bin/None-2020-11-25要素标注统计.xls


+ 28 - 0
examples/test/bin/csv_to_iepy.py

@@ -0,0 +1,28 @@
+"""
+IEPY database loader from csv file
+
+Usage:
+    csv_to_iepy.py <filename>
+    csv_to_iepy.py -h | --help
+
+The <filename> argument can be a .csv file or a .csv.gz file containing the
+corpus in two columns: 'freebase_mid' and 'description'.
+
+Options:
+  -h --help             Show this screen
+  --version             Version number
+"""
+
+import logging
+
+from docopt import docopt
+
+import iepy
+iepy.setup(__file__)
+from iepy.utils import csv_to_iepy
+
+if __name__ == "__main__":
+    logging.basicConfig(level=logging.INFO, format='%(message)s')
+    opts = docopt(__doc__, version=iepy.__version__)
+    filepath = opts["<filename>"]
+    csv_to_iepy(filepath)

+ 76 - 0
examples/test/bin/gazettes_loader.py

@@ -0,0 +1,76 @@
+"""
+IEPY gazettes loader
+
+Usage:
+    gazettes_loader.py <filename>
+
+
+The <filename> argument can be a .csv file or a .csv.gz file containing the
+gazettes in two columns: 'literal' and 'class'.
+
+
+Options:
+  -h --help             Show this screen
+"""
+
+import sys
+import csv
+import gzip
+import logging
+from operator import itemgetter
+
+from django.db import IntegrityError
+from docopt import docopt
+
+import iepy
+iepy.setup(__file__)
+from iepy.data.models import EntityKind, GazetteItem
+
+logging.basicConfig(level=logging.INFO, format='%(message)s')
+
+
+def add_gazettes_from_csv(filepath):
+    if filepath.endswith(".gz"):
+        fin = gzip.open(filepath, "rt")
+    else:
+        fin = open(filepath, "rt")
+    reader = csv.DictReader(fin)
+
+    expected_fnames = ['literal', 'class']
+    if not set(reader.fieldnames).issuperset(expected_fnames):
+        msg = "Couldn't find the expected field names on the provided csv: {}"
+        sys.exit(msg.format(expected_fnames))
+
+    _create_gazette_entries(
+        itemgetter(*expected_fnames)(line) for line in reader
+    )
+
+
+def _create_gazette_entries(entries_list):
+    kind_cache = {}
+    created = 0
+    for literal, kind_name in entries_list:
+        literal = literal.strip()
+        kind_name = kind_name.strip()
+        kind = kind_cache.get(kind_name)
+        if kind is None:
+            kind, _ = EntityKind.objects.get_or_create(name=kind_name)
+            kind_cache[kind_name] = kind
+        gazette = GazetteItem(text=literal, kind=kind)
+
+        try:
+            gazette.save()
+        except IntegrityError as error:
+            logging.warn(
+                "Gazette '{}' of class '{}' not loaded, literal already existed".format(
+                literal, kind_name))
+            print(error)
+        finally:
+            created += 1
+    print('Created {} new gazette items'.format(created))
+
+
+if __name__ == "__main__":
+    opts = docopt(__doc__, version=iepy.__version__)
+    fname = opts["<filename>"]
+    add_gazettes_from_csv(fname)

+ 59 - 0
examples/test/bin/iepy_rules_runner.py

@@ -0,0 +1,59 @@
+"""
+Run IEPY rule-based extractor
+
+Usage:
+    iepy_rules_runner.py
+    iepy_rules_runner.py -h | --help | --version
+
+Picks from rules.py the relation to work with, and the rules definitions and
+proceeds with the extraction.
+
+Options:
+  -h --help             Show this screen
+  --version             Version number
+"""
+import sys
+import logging
+
+from django.core.exceptions import ObjectDoesNotExist
+
+import iepy
+iepy.setup(__file__)
+
+from iepy.extraction.rules import load_rules
+from iepy.extraction.rules_core import RuleBasedCore
+from iepy.data import models, output
+from iepy.data.db import CandidateEvidenceManager
+
+
+def run_from_command_line():
+    logging.basicConfig(level=logging.INFO, format='%(message)s')
+
+    try:
+        relation_name = iepy.instance.rules.RELATION
+    except AttributeError:
+        logging.error("RELATION not defined in rules file")
+        sys.exit(1)
+
+    try:
+        relation = models.Relation.objects.get(name=relation_name)
+    except ObjectDoesNotExist:
+        logging.error("Relation {!r} not found".format(relation_name))
+        sys.exit(1)
+
+    # Load rules
+    rules = load_rules()
+
+    # Load evidences
+    evidences = CandidateEvidenceManager.candidates_for_relation(relation)
+
+    # Run the pipeline
+    iextractor = RuleBasedCore(relation, rules)
+    iextractor.start()
+    iextractor.process()
+    predictions = iextractor.predict(evidences)
+    output.dump_output_loop(predictions)
+
+
+if __name__ == u'__main__':
+    run_from_command_line()

+ 184 - 0
examples/test/bin/iepy_runner.py

@@ -0,0 +1,184 @@
+"""
+Run IEPY active-learning extractor
+
+Usage:
+    iepy_runner.py [options] <relation_name> <output>
+    iepy_runner.py [options] --db-store <relation_name>
+    iepy_runner.py -h | --help | --version
+
+Options:
+  --store-extractor=<extractor_output>     Stores the trained classifier
+  --trained-extractor=<extractor_path>     Load an already trained extractor
+  --db-store                               Stores the predictions on the database
+  --no-questions                           Won't generate questions to answer. Will predict
+                                           as is. Should be used with --trained-extractor
+  --tune-for=<tune-for>                    Predictions tuning. Options are high-prec
+                                           or high-recall [default: high-prec]
+  --extractor-config=<config.json>         Sets the extractor config
+  --version                                Version number
+  -h --help                                Show this screen
+"""
+
+import os
+import json
+import logging
+from docopt import docopt
+from sys import exit
+
+import iepy
+INSTANCE_PATH = iepy.setup(__file__)
+
+from iepy.extraction.active_learning_core import ActiveLearningCore, HIPREC, HIREC
+from iepy.data.db import CandidateEvidenceManager
+from iepy.data.models import Relation
+from iepy.extraction.terminal import TerminalAdministration
+from iepy.data import output
+
+
+def print_all_relations():
+    print("All available relations:")
+    for relation in Relation.objects.all():
+        print("  {}".format(relation))
+
+
+def load_labeled_evidences(relation, evidences):
+    CEM = CandidateEvidenceManager  # shorcut
+    return CEM.labels_for(relation, evidences, CEM.conflict_resolution_newest_wins)
+
+
+def _get_tuning_mode(opts):
+    if opts['--tune-for'] == 'high-prec':
+        tuning_mode = HIPREC
+    elif opts['--tune-for'] == 'high-recall':
+        tuning_mode = HIREC
+    else:
+        print ('Invalid tuning mode')
+        print (__doc__)
+        exit(1)
+    return tuning_mode
+
+
+def _get_relation(opts):
+    relation_name = opts['<relation_name>']
+    try:
+        relation = Relation.objects.get(name=relation_name)
+    except Relation.DoesNotExist:
+        print("Relation {!r} non existent".format(relation_name))
+        print_all_relations()
+        exit(1)
+    return relation
+
+
+def _load_extractor(opts, relation, labeled_evidences):
+    extractor_path = opts.get('--trained-extractor')
+    try:
+        iextractor = ActiveLearningCore.load(extractor_path,
+                                             labeled_evidences=labeled_evidences)
+    except ValueError:
+        print("Error: unable to load extractor, invalid file")
+        exit(1)
+
+    if iextractor.relation != relation:
+        print('The loaded extractor is not for the requested relation'
+              ' but for relation {} instead'.format(iextractor.relation))
+        exit(1)
+    print('Extractor successfully loaded')
+    return iextractor
+
+
+def _construct_extractor(opts, relation, labeled_evidences, tuning_mode):
+    config_filepath = opts.get("--extractor-config")
+    if not config_filepath:
+        config_filepath = os.path.join(INSTANCE_PATH, "extractor_config.json")
+
+    if not os.path.exists(config_filepath):
+        print("Error: extractor config does not exists, please create the "
+              "file extractor_config.json or use the --extractor-config")
+        exit(1)
+
+    with open(config_filepath) as filehandler:
+        try:
+            extractor_config = json.load(filehandler)
+        except Exception as error:
+            print("Error: unable to load extractor config: {}".format(error))
+            exit(1)
+
+    iextractor = ActiveLearningCore(
+        relation, labeled_evidences, extractor_config, tradeoff=tuning_mode
+    )
+    return iextractor
+
+
+def run_from_command_line():
+    opts = docopt(__doc__, version=iepy.__version__)
+
+    logging.basicConfig(level=logging.INFO, format='%(message)s')
+    logging.getLogger("featureforge").setLevel(logging.WARN)
+
+    tuning_mode = _get_tuning_mode(opts)
+    relation = _get_relation(opts)
+
+    candidates = CandidateEvidenceManager.candidates_for_relation(relation)
+    labeled_evidences = load_labeled_evidences(relation, candidates)
+
+    if opts.get('--trained-extractor'):
+        iextractor = _load_extractor(opts, relation, labeled_evidences)
+        was_ever_trained = True
+        opts["--no-questions"] = True
+    else:
+        iextractor = _construct_extractor(opts, relation, labeled_evidences, tuning_mode)
+        iextractor.start()
+        was_ever_trained = False
+
+    if not opts.get("--no-questions", False):
+        questions_loop(iextractor, relation, was_ever_trained)
+
+    # Candidates generator was consumed when generating labeled_evidences, so we'll
+    # define it fresh again
+    candidates = CandidateEvidenceManager.candidates_for_relation(relation)
+    # Predict and store output
+    predictions = iextractor.predict(candidates)  # asking predictions for EVERYTHING
+    if not predictions:
+        print("Nothing was predicted")
+        exit(1)
+
+    if opts.get("--db-store"):
+        output.dump_predictions_to_database(relation, predictions)
+
+    output_file = opts.get("<output>")
+    if output_file:
+        output.dump_runner_output_to_csv(predictions, output_file)
+
+    classifier_output = opts.get("--store-extractor")
+    if classifier_output:
+        iextractor.save(classifier_output)
+
+
+def questions_loop(iextractor, relation, was_ever_trained):
+    STOP = u'STOP'
+    term = TerminalAdministration(
+        relation,
+        extra_options=[(STOP, u'Stop execution')]
+    )
+    while iextractor.questions:
+        questions = list(iextractor.questions)  # copying the list
+        term.update_candidate_evidences_to_label(questions)
+        result = term()
+        i = 0
+        for c, label_value in load_labeled_evidences(relation, questions).items():
+            if label_value is not None:
+                iextractor.add_answer(c, label_value)
+                i += 1
+        print ('Added %s new human labels to the extractor core' % i)
+        iextractor.process()
+        was_ever_trained = True
+        if result == STOP:
+            break
+
+    if not was_ever_trained:
+        # It's needed to run some process before asking for predictions
+        iextractor.process()
+
+
+if __name__ == u'__main__':
+    run_from_command_line()

+ 12 - 0
examples/test/bin/manage.py

@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+
+import sys
+
+from django.core.management import execute_from_command_line
+
+import iepy
+iepy.setup(__file__)
+
+
+if __name__ == "__main__":
+    execute_from_command_line(sys.argv)

+ 96 - 0
examples/test/bin/preprocess.py

@@ -0,0 +1,96 @@
+"""
+Corpus preprocessing script
+
+Usage:
+    preprocess.py [options]
+    preprocess.py --split-in=<num-splits> --run-part=<num-part>
+    preprocess.py --increment-ner
+    preprocess.py -h | --help | --version
+
+Options:
+  -h --help                      Show this screen
+  --multiple-cores=<num-cores>   Number of cores (use all to use every processor)
+  --increment-ner                Re run NER and Gazetter for every document. If a document lacked any of the previous steps, will be preprocessed entirely.
+  --version                      Version number
+"""
+import logging
+
+from docopt import docopt
+
+import os
+os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
+os.environ["CUDA_VISIBLE_DEVICES"] = ""
+
+import iepy
+import multiprocessing
+iepy.setup(__file__)
+from iepy.data.db import DocumentManager
+from iepy.selfpreprocess.self_preprocess import SelfPreprocesser
+from iepy.selfpreprocess.pipeline import PreProcessPipeline, PreProcessSteps
+# from iepy.preprocess.stanford_preprocess import StanfordPreprocess
+# from iepy.preprocess.pipeline import PreProcessPipeline, PreProcessSteps
+# from iepy.preprocess.segmenter import SyntacticSegmenterRunner
+
+
+
+
+class ParallelDocManager(DocumentManager):
+
+    def mines_of(self, qset, number_of_processors, my_id):
+        K = number_of_processors
+        N = my_id
+        clause = 'id %%%% %s = %s' % (K, N)
+        return qset.extra(where=[clause])
+
+def start_preprocess(docs, increment_ner):
+    pipeline = PreProcessPipeline([
+        SelfPreprocesser(increment_ner),
+        # SyntacticSegmenterRunner(increment=True)
+    ], docs)
+    pipeline.process_everything()
+
+if __name__ == '__main__':
+    logger = logging.getLogger(u'preprocess')
+    logger.setLevel(logging.INFO)
+    logging.basicConfig(level=logging.INFO, format='%(message)s')
+    opts = docopt(__doc__, version=iepy.__version__)
+    increment_ner = opts['--increment-ner']
+
+    dm = ParallelDocManager()
+    all_docs = dm.get_documents_lacking_preprocess(
+        [PreProcessSteps.brat])
+
+    multiple_cores = opts.get('--multiple-cores')
+    split_in = opts.get("--split-in")
+    run_part = opts.get("--run-part")
+
+    if multiple_cores:
+        if multiple_cores == "all":
+            multiple_cores = multiprocessing.cpu_count()
+        try:
+            multiple_cores = int(multiple_cores)
+        except ValueError:
+            logger.error("Invalid number of cores")
+            exit(1)
+
+        for i in range(multiple_cores):
+            process = multiprocessing.Process(
+                target=start_preprocess, args=(dm.mines_of(all_docs, multiple_cores, i), increment_ner)
+            )
+            process.start()
+    elif split_in:
+        try:
+            split_in = int(split_in)
+            run_part = int(run_part) - 1
+        except ValueError:
+            logger.error("Invalid split")
+            exit(1)
+
+        if run_part < 0 or run_part > split_in:
+            logger.error("Parts must be between 1 and {}".format(split_in))
+            exit(1)
+
+        docs = dm.mines_of(all_docs, split_in, run_part)
+        start_preprocess(docs, increment_ner)
+    else:
+        start_preprocess(all_docs, increment_ner)

+ 149 - 0
examples/test/bin/rules_verifier.py

@@ -0,0 +1,149 @@
+"""
+IEPY rules verifier
+
+
+Usage:
+    rules_verifier.py <relation> [options]
+
+Options:
+  --shuffle             Chooses the sample randomly and not the first ones
+  --create-evidences    Creates evidences that are missing [default: false]
+  -r --rule=<rule>      Tests only this rule
+  -l --limit=<limit>    Limits the amount of evidences uses
+  -h --help             Show this screen
+"""
+
+import sys
+import logging
+from docopt import docopt
+
+import refo
+from django.core.exceptions import ObjectDoesNotExist
+from colorama import init as colorama_init
+
+import iepy
+iepy.setup(__file__)
+
+from iepy.data import models
+from iepy.data.models import EvidenceCandidate
+from iepy.data.db import CandidateEvidenceManager
+from iepy.extraction.terminal import TerminalEvidenceFormatter
+from iepy.extraction.rules import (
+    load_rules, compile_rule, generate_tokens_to_match
+)
+from iepy.metrics import result_dict_from_predictions
+
+
+logging.basicConfig(level=logging.INFO, format='%(message)s')
+
+
+def run_from_command_line():
+    opts = docopt(__doc__, version=iepy.__version__)
+    relation_name = opts.get("<relation>")
+    limit = opts.get("--limit")
+    rule_name = opts.get("--rule")
+    shuffle = opts.get("--shuffle")
+    create_evidences = opts.get("--create-evidences")
+
+    if limit is None:
+        limit = -1
+
+    try:
+        limit = int(limit)
+    except ValueError:
+        logging.error("Invalid limit value, it must be a number")
+        sys.exit(1)
+
+    try:
+        relation = models.Relation.objects.get(name=relation_name)
+    except ObjectDoesNotExist:
+        logging.error("Relation {!r} not found".format(relation_name))
+        sys.exit(1)
+
+    # Load rules
+    rules = get_rules(rule_name)
+    rule_regexes = [
+        (rule.__name__, compile_rule(rule, relation), rule.answer) for rule in rules
+    ]
+
+    # Load evidences
+    if EvidenceCandidate.objects.all().count() == 0:
+        create_evidences = True
+    evidences = CandidateEvidenceManager.candidates_for_relation(
+        relation, create_evidences, seg_limit=limit, shuffle_segs=shuffle
+    )
+    conflict_solver = CandidateEvidenceManager.conflict_resolution_newest_wins
+    answers = CandidateEvidenceManager.labels_for(
+        relation, evidences, conflict_solver
+    )
+    run_tests(rule_regexes, evidences, answers)
+
+
+def run_tests(rule_regexes, evidences, answers):
+    predictions = []
+    real_labels = []
+    evidences_with_labels = []
+
+    colorama_init()
+    formatter = TerminalEvidenceFormatter()
+
+    for name, regex, answer in rule_regexes:
+        title = "Matches for rule '{}' (value: {})".format(name, answer)
+        print("\n{}\n{}".format(title, "-" * len(title)))
+
+        anything_matched = False
+        for evidence in evidences:
+            tokens_to_match = generate_tokens_to_match(evidence)
+            match = refo.match(regex, tokens_to_match)
+
+            if match:
+                anything_matched = True
+                print("  * {}".format(formatter.colored_text(evidence)))
+
+            if evidence in answers and answers[evidence] is not None:
+                evidences_with_labels.append(evidence)
+                real_labels.append(answers[evidence])
+
+                if match:
+                    predictions.append(answer)
+                else:
+                    predictions.append(False)
+
+        if not anything_matched:
+            print("  nothing matched")
+
+        print()
+
+    if real_labels:
+        results = result_dict_from_predictions(
+            evidences_with_labels, real_labels, predictions
+        )
+        results.pop("end_time")
+        keys = [
+            "true_positives", "true_negatives",
+            "false_positives", "false_negatives",
+            "precision", "recall",
+            "accuracy", "f1",
+        ]
+
+        title = "Metrics"
+        print("{}\n{}".format(title, "-" * len(title)))
+        for key in keys:
+            print("{:>15}: {:.2f}".format(key, results[key]))
+
+
+def get_rules(rule_name):
+    # Load rules
+    rules = load_rules()
+
+    if rule_name:
+        rules = [x for x in rules if x.__name__ == rule_name]
+        if not rules:
+            logging.error("rule '{}' does not exists".format(rule_name))
+            sys.exit(1)
+
+    return rules
+
+
+if __name__ == "__main__":
+    run_from_command_line()

+ 251 - 0
examples/test/bin/settlement.py

@@ -0,0 +1,251 @@
+
+
+
+
+from django.db.models import Q
+import datetime,time
+import iepy
+iepy.setup(__file__)
+from iepy.data.db import DocumentManager
+from iepy.data.models import IEDocument,LabeledIEDocument,IEDocumentMetadata,LabeledIEDocumentMetadata,Payroll
+from brat.models import BratAnnotation,LabeledBratAnnotation
+from django.db import transaction
+import pandas as pd
+from django.contrib.auth.models import User
+
+def object_to_dict(obj,class_model):
+    '''
+    :param obj:对象
+    :param class_model:django model
+    :return: 由对象生成的键值对
+    '''
+    _dict = {}
+    concrete_model = class_model._meta.concrete_model
+    for field in concrete_model._meta.local_fields:
+        value = field.value_from_object(obj)
+        _dict[field.name] = value
+    return _dict
+
+
+class Settlement():
+
+    '''
+    @summary: 结算类,定义了结算者所需要执行的各种方法
+    '''
+
+    def makePayroll(self,list_user,begin_time,time_end):
+        '''
+        :param _user: 用户名
+        :param time_begin: 起始时间
+        :param time_end: 截至时间
+        :return:根据用户,时间段生成用户的标注情况
+        '''
+        from django.db import connection
+        with transaction.atomic():
+            cursor = connection.cursor()
+            time_begin = "2020-08-01"
+            for _user in list_user:
+                sql = 'select max(end_time) from corpus_payroll where "user"=\'%s\''%(_user)
+                cursor.execute(sql)
+                rows = cursor.fetchall()
+                if rows[0][0] is not None:
+                    time_begin = rows[0][0]
+                else:
+                    time_begin = "2020-08-01"
+
+                sql = " select count(1) from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s'"%(_user,time_end,time_begin)
+                cursor.execute(sql)
+                doc_count = cursor.fetchall()[0][0]
+                sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s' order by edittime desc limit 1200) and value like '%s' "%(_user,time_end,time_begin,"T%")
+                cursor.execute(sql)
+                t_count = cursor.fetchall()[0][0]
+                sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s' order by edittime desc limit 1200) and value like '%s' "%(_user,time_end,time_begin,"R%")
+                cursor.execute(sql)
+                r_count = cursor.fetchall()[0][0]
+                sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s') and value like '%s' "%(_user,time_end,time_begin,"T%")
+                cursor.execute(sql)
+                all_t_count = cursor.fetchall()[0][0]
+                sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s') and value like '%s' "%(_user,time_end,time_begin,"R%")
+                cursor.execute(sql)
+                all_r_count = cursor.fetchall()[0][0]
+                wage = round(0.03*t_count+0.05*r_count+(all_t_count-t_count)*0.04+(all_r_count-r_count)*0.06,2)
+                print(doc_count,t_count,r_count,wage)
+                payrolls = Payroll.objects.filter(Q(user=_user)& Q(begin_time=time_begin) & Q(end_time=time_end))
+                if len(payrolls)==0:
+                    _payroll = Payroll.objects.create(**{"user":_user,"doc_count":doc_count,"begin_time":time_begin,"end_time":time_end,"t_count":all_t_count,"r_count":all_r_count,"wage":wage})
+                    _payroll.save()
+                else:
+                    _payroll = payrolls[0]
+                    _payroll.doc_count = doc_count
+                    _payroll.t_count = all_t_count
+                    _payroll.r_count = all_r_count
+                    _payroll.wage = wage
+                    _payroll.save()
+
+    def exportPayroll(self,begin_time,end_time):
+        '''
+        :param begin_time: 导出开始时间
+        :param end_time: 导出结束时间
+        :return:
+        '''
+        list_user = []
+        list_doc_count = []
+        list_t_count = []
+        list_r_count = []
+        list_wage = []
+        list_yield = []
+        list_account = []
+        list_begin = []
+        list_end = []
+        if begin_time is not None:
+            payrolls = Payroll.objects.filter(Q(begin_time=begin_time) & Q(end_time=end_time))
+        else:
+            payrolls = Payroll.objects.filter(Q(end_time=end_time))
+        for _payroll in payrolls:
+            list_user.append(_payroll.user)
+            list_doc_count.append(_payroll.doc_count)
+            list_t_count.append(_payroll.t_count)
+            list_r_count.append(_payroll.r_count)
+            list_wage.append(_payroll.wage)
+            list_yield.append(_payroll._yield)
+            list_account.append(_payroll.account)
+            list_begin.append(_payroll.begin_time)
+            list_end.append(_payroll.end_time)
+        df = pd.DataFrame({"用户":list_user,"开始时间":list_begin,"结束时间":list_end,"文章数":list_doc_count,"要素数":list_t_count,"关系数":list_r_count,"总价":list_wage,"合格率":list_yield,"结算价":list_account})
+        df.to_excel("%s-%s要素标注统计.xls"%(begin_time,end_time),columns=["用户","开始时间","结束时间","文章数","要素数","关系数","总价","合格率","结算价"])
+
+    def getAllUser(self):
+        from django.db import connection
+        with transaction.atomic():
+            list_user = []
+            cursor = connection.cursor()
+            sql = "select username from auth_user where is_staff='t'"
+            cursor.execute(sql)
+            for row in cursor.fetchall():
+                list_user.append(row[0])
+            return list_user
+
+
+    def makeMigrate(self,_user,time_begin,time_end):
+        '''
+        :param _user: 用户名
+        :param time_begin: 起始时间
+        :param time_end: 截至时间
+        :return: 将用户在时间段内的数据迁移到标准表中
+        '''
+        pass
+        # from django.db import connection
+        # with transaction.atomic():
+        #     cursor = connection.cursor()
+        #     sql = " select human_identifier,offsets_to_text,sentences from corpus_iedocument where edituser is null"
+        #     cursor.execute(sql)
+        #     cursor1 = connection.cursor()
+        #     _index = 0
+        #     rows = True
+        #     while(rows):
+        #         rows=cursor.fetchmany(1000)
+        #         for row in rows:
+        #             _index += 1
+        #             print(_index)
+        #             human_identifier,offsets_to_text,sentences = row
+        #             if sentences!="[]":
+        #                 _off = offsets_to_text.split(", ")[-1][:-1]
+        #                 _sen = sentences.split(", ")[-1][:-1]
+        #                 print(_off,_sen)
+        #                 if int(_off)!=int(_sen):
+        #                     offsets_to_text = offsets_to_text[:-1]+", "+str(int(_sen))+"]"
+        #                     print(offsets_to_text)
+        #                     cursor1.execute("update corpus_iedocument set offsets_to_text='%s' where human_identifier='%s'"%(offsets_to_text,human_identifier))
+
+
+
+            # ieDocuments = IEDocument.objects.filter(Q(edituser=_user) & Q(edittime__range=(time_begin,time_end)))
+            # for obj in ieDocuments:
+            #     _dict = object_to_dict(obj,IEDocument)
+            #     _dict_meta = object_to_dict(obj.metadata,IEDocumentMetadata)
+            #     labeledMeta = LabeledIEDocumentMetadata.objects.create(**_dict_meta)
+            #     labeledMeta.save()
+            #     _dict["metadata"] = labeledMeta
+            #     tmp = LabeledIEDocument.objects.create(**_dict)
+            #     tmp.save()
+            #
+            #     bratAnnotations = BratAnnotation.objects.filter(Q(document_id=obj.human_identifier))
+            #     for ann in bratAnnotations:
+            #         _dict_ann = object_to_dict(ann,BratAnnotation)
+            #         labeledAnn = LabeledBratAnnotation.objects.create(**_dict_ann)
+            #         labeledAnn.save()
+
+
+    def getPercentOfPass(self,_user,time_begin,time_end):
+        '''
+        :param _user:用户名
+        :param time_begin: 起始时间
+        :param time_end: 截至时间
+        :return: 获得用户在时间段内标注数据的合格率
+        '''
+
+    def makePayrolls(self,time_begin,time_end):
+        '''
+        :param time_begin:起始时间
+        :param time_end: 截至时间
+        :return: 获得所有用户的工资表
+        '''
+        for _user in self.getAllUser():
+            self.makePayroll(_user,time_begin,time_end)
+        self.exportPayroll(time_begin,time_end)
+
+    def createUser_batch(self,batch_size=90):
+        '''
+        :param batch_size: 用户个数
+        :return:
+        '''
+        list_user = [User.objects.create_user(username="bidi%d"%(i+1),password="bidi%d"%(i+1)) for i in range(batch_size)]
+
+    def exportLabels(self):
+        groups = [[1,7],[8,14],[15,22],[23,29],[30,36],[37,43],[44,50],[51,56],[57,62],[63,71]]
+        from django.db import connection
+        cursor = connection.cursor()
+        for _i in range(len(groups)):
+            _begin,_end = groups[_i]
+            list_username = []
+            list_user = []
+            list_label = []
+            list_time = []
+            for _j in range(_begin,_end+1):
+                username = "bidi%d"%_j
+                list_username.append("'%s'"%username)
+            sql = " select edituser,human_identifier,to_char(edittime,'yyyy-mm-dd') from corpus_iedocument where edituser in(%s) order by edittime asc"%(",".join(list_username))
+            print(sql)
+            cursor.execute(sql)
+            rows = cursor.fetchall()
+            for row in rows:
+                list_user.append(row[0])
+                list_label.append(row[1])
+                list_time.append(row[2])
+            df = pd.DataFrame({"时间":list_time,"用户":list_user,"文章编号":list_label})
+            df.to_excel("分组_%d.xls"%(_i+1),columns=["时间","用户","文章编号"])
+
+    def filter(self):
+        '''
+        过滤拍卖公告
+        :return:
+        '''
+        import re
+        ieDocuments = IEDocument.objects.all()
+        for obj in ieDocuments:
+            if re.search("拍卖",obj.text) is not None:
+                obj.jump_signal = 1
+                obj.save()
+                print(obj.human_identifier)
+
+
+
+if __name__=="__main__":
+    settle = Settlement()
+    # settle.makeMigrate("test","2020-08-01","2020-08-31")
+    settle.makePayroll(["test2","test9","test11","test12","test1","test7","test8","test3","test19"],"2020-08-01","2020-11-25")
+    # settle.makePayrolls("2020-08-01","2020-08-31")
+    settle.exportPayroll(begin_time=None,end_time='2020-11-25')
+    # settle.createUser_batch(batch_size=102)
+    # settle.exportLabels()
+    # settle.filter()

BIN
examples/test/bin/分组_1.xls


BIN
examples/test/bin/分组_10.xls


BIN
examples/test/bin/分组_2.xls


BIN
examples/test/bin/分组_3.xls


BIN
examples/test/bin/分组_4.xls


BIN
examples/test/bin/分组_5.xls


BIN
examples/test/bin/分组_6.xls


BIN
examples/test/bin/分组_7.xls


BIN
examples/test/bin/分组_8.xls


BIN
examples/test/bin/分组_9.xls


+ 20 - 0
examples/test/extractor_config.json

@@ -0,0 +1,20 @@
+{
+    "sparse_features": [
+        "bag_of_words",
+        "bag_of_pos",
+        "bag_of_words_in_between",
+        "bag_of_pos_in_between"
+    ],
+    "dense_features": [
+        "entity_order",
+        "entity_distance",
+        "other_entities_in_between",
+        "verbs_count_in_between",
+        "verbs_count",
+        "total_number_of_entities",
+        "symbols_in_between",
+        "number_of_tokens"
+    ],
+    "classifier_args": {},
+    "classifier": "svc"
+}

+ 2 - 0
examples/test/rules.py

@@ -0,0 +1,2 @@
+# Write here your rules
+# RELATION = 'your relation here'

+ 180 - 0
examples/test/settings.py

@@ -0,0 +1,180 @@
+"""
+For more information on this file, see
+https://docs.djangoproject.com/en/1.7/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/1.7/ref/settings/
+"""
+
+from iepy.webui.webui.settings import *
+from django.conf import settings
+
+IEPY_VERSION = '0.9.6'
+IEPY_LANG = 'en'
+SECRET_KEY = 'u==!fueit=wxo&j8!5u+sfasp4prjluk@*s=7!-wz_&r@pn))r'
+DEBUG = True
+TEMPLATE_DEBUG = True
+
+# Database
+# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
+# DATABASES = {
+#     'default': {
+#         'ENGINE': 'django.db.backends.sqlite3',
+#         'NAME': '/home/python/luojiehua/dl_nlp/iepy-develop/examples/test/test.sqlite',
+#     }
+# }
+DATABASES = {
+    'default': {
+        'ENGINE': 'django.db.backends.postgresql_psycopg2',
+        'NAME': 'iepy',
+        'USER': 'postgres',
+        'PASSWORD': 'postgres',
+        'HOST': '192.168.2.101',
+        'PORT': '5432'
+    }
+}
+
+# For changing tokenization options, read here.
+# http://nlp.stanford.edu/nlp/javadoc/javanlp/edu/stanford/nlp/process/PTBTokenizer.html
+# You can use as key any of the "known options" listed on that page, and as value,
+# use True or False (python names) for booleans, or strings when option requires a text
+# CORENLP_TKN_OPTS = {
+#     'latexQuotes': False
+# }
+
+#default brat settings
+CONFIG_BRAT = {
+    "acl.conf":"""
+User-agent: *
+Allow: /
+Disallow: /hidden/
+
+User-agent: guest
+Disallow: /confidential/
+""",
+    "annotation.conf":"""
+[spans]
+code
+name
+money
+	money_tendereeMoney
+	money_tendererMoney
+org
+	org_tenderee
+	org_agency
+	org_tenderer
+	org_secondTenderer
+	org_thirdTenderer
+company
+	company_tenderee
+	company_agency
+	company_tenderer
+	company_secondTenderer
+	company_thirdTenderer
+job
+person
+	person_tendereePerson
+	person_agencyPerson
+	person_person
+	person_review
+time
+	time_release
+	time_bidopen
+	time_bidclose
+location
+package
+phone
+moneysource
+bidway
+serviceTime
+[relations]
+Equiv	Arg1:org|company|org_tenderee|org_agency|org_tenderer|org_secondTenderer|org_thirdTenderer|company_tenderee|company_agency|company_tenderer|company_secondTenderer|company_thirdTenderer, Arg2:org|company|org_tenderee|org_agency|org_tenderer|org_secondTenderer|org_thirdTenderer|company_tenderee|company_agency|company_tenderer|company_secondTenderer|company_thirdTenderer, <REL-TYPE>:symmetric-transitive
+rel_tendererMoney	Arg1:org_tenderer|org_secondTenderer|org_thirdTenderer|company_tenderer|company_secondTenderer|company_thirdTenderer|org|company, Arg2:money_tendererMoney
+rel_tendereeMoney	Arg1:package, Arg2:money_tendereeMoney|money
+rel_person	Arg1:org|company|org_tenderee|org_agency|org_tenderer|org_secondTenderer|org_thirdTenderer|company_tenderee|company_agency|company_tenderer|company_secondTenderer|company_thirdTenderer, Arg2:person_tendereePerson|person_agencyPerson|person_person
+rel_pack	Arg1:org_tenderer|org_secondTenderer|org_thirdTenderer|company_tenderer|company_secondTenderer|company_thirdTenderer, Arg2:package
+rel_address	Arg1:org|company|org_tenderee|org_agency|org_tenderer|org_secondTenderer|org_thirdTenderer|company_tenderee|company_agency|company_tenderer|company_secondTenderer|company_thirdTenderer, Arg2:location
+rel_phone	Arg1:person_tendereePerson|person_agencyPerson|person_person, Arg2:phone
+rel_pack_code	Arg1:package, Arg2:code
+rel_pack_name	Arg1:package, Arg2:name
+
+
+[events]
+#Protein_binding|GO:0005515	Theme+:Protein
+#Gene_expression|GO:0010467	Theme:Protein
+
+[attributes]
+#att_role	Arg:<ENTITY>, Value:招标人|代理人|中标人|第二候选人|第三候选人|att_noRole
+#att_role	Arg:<ENTITY>, Value:att_tenderee|att_agency|att_tenderer|att_secondTenderer|att_thirdTenderer|att_noRole
+#att_money	Arg:<ENTITY>, Value:att_tendereeMoney|att_tendererMoney|att_nomoney
+#att_person	Arg:<ENTITY>, Value:att_noperson|att_tendereePerson|att_agencyPerson|att_person
+#Negation	Arg:<EVENT>
+#Speculation	Arg:<EVENT>
+""",
+    "visual.conf":"""
+[labels]
+code | 项目编号
+name | 项目名称
+org | 组织
+company | 公司
+job | 职业
+person | 人名
+time | 时间
+location | 地址
+package | 包号
+phone | 电话
+money | 金额
+money_tendereeMoney | 招标金额
+money_tendererMoney | 中投标金额
+
+org_tenderee | 招标人
+org_agency | 代理人
+org_tenderer | 中标人
+org_secondTenderer | 第二候选人
+org_thirdTenderer | 第三候选人
+company_tenderee | 招标人
+company_agency | 代理人
+company_tenderer | 中标人
+company_secondTenderer | 第二候选人
+company_thirdTenderer | 第三候选人
+
+person_tendereePerson | 招标联系人
+person_agencyPerson | 代理联系人
+person_person | 联系人
+
+rel_tendererMoney | 中投标金额
+rel_tendereeMoney | 招标金额
+rel_person | 联系人
+rel_pack | 所属包
+rel_address | 地址
+rel_phone | 联系电话
+rel_pack_code | 包件编号
+rel_pack_name | 包件名称
+
+person_review | 评审专家
+time_release | 发布时间
+time_bidopen | 开标时间
+time_bidclose | 截标时间
+moneysource | 资金来源
+bidway | 招标方式
+serviceTime | 服务期限
+
+#Protein | Protein | Pro | P
+#Protein_binding | Protein binding | Binding | Bind
+#Gene_expression | Gene expression | Expression | Exp
+#Theme | Theme | Th
+
+[drawing]
+Protein	bgColor:#7fa2ff
+SPAN_DEFAULT	fgColor:black, bgColor:lightgreen, borderColor:black
+ARC_DEFAULT	color:black
+ATTRIBUTE_DEFAULT	glyph:*
+""",
+    "tools.conf":"""
+[search]
+google     <URL>:http://www.google.com/search?q=%s
+""",
+    "kb_shortcuts.conf":"""
+P	Protein
+"""
+}

BIN
examples/test/test.sqlite


BIN
iepy/selfpreprocess/BiddingKG/dl/entityLink/list_entitys_pair.pk


BIN
iepy/selfpreprocess/BiddingKG/dl/entityLink/list_entitys_pair_0_150.pk


BIN
iepy/selfpreprocess/BiddingKG/dl/entityLink/list_entitys_pair_150_3000.pk


+ 2 - 0
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-0/checkpoint

@@ -0,0 +1,2 @@
+model_checkpoint_path: "model.ckpt"
+all_model_checkpoint_paths: "model.ckpt"

BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-0/model.ckpt.data-00000-of-00001


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-0/model.ckpt.index


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-0/model.ckpt.meta


+ 3 - 0
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-1/checkpoint

@@ -0,0 +1,3 @@
+model_checkpoint_path: "model.ckpt"
+all_model_checkpoint_paths: "..\\0-0\\model.ckpt"
+all_model_checkpoint_paths: "model.ckpt"

BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-1/model.ckpt.data-00000-of-00001


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-1/model.ckpt.index


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-1/model.ckpt.meta


+ 12 - 0
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-10/checkpoint

@@ -0,0 +1,12 @@
+model_checkpoint_path: "model.ckpt"
+all_model_checkpoint_paths: "..\\0-0\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-1\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-2\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-3\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-4\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-5\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-6\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-7\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-8\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-9\\model.ckpt"
+all_model_checkpoint_paths: "model.ckpt"

BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-10/model.ckpt.data-00000-of-00001


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-10/model.ckpt.index


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-10/model.ckpt.meta


+ 13 - 0
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-11/checkpoint

@@ -0,0 +1,13 @@
+model_checkpoint_path: "model.ckpt"
+all_model_checkpoint_paths: "..\\0-0\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-1\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-2\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-3\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-4\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-5\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-6\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-7\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-8\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-9\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-10\\model.ckpt"
+all_model_checkpoint_paths: "model.ckpt"

BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-11/model.ckpt.data-00000-of-00001


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-11/model.ckpt.index


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-11/model.ckpt.meta


+ 14 - 0
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-12/checkpoint

@@ -0,0 +1,14 @@
+model_checkpoint_path: "model.ckpt"
+all_model_checkpoint_paths: "..\\0-0\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-1\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-2\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-3\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-4\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-5\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-6\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-7\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-8\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-9\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-10\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-11\\model.ckpt"
+all_model_checkpoint_paths: "model.ckpt"

BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-12/model.ckpt.data-00000-of-00001


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-12/model.ckpt.index


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-12/model.ckpt.meta


+ 15 - 0
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-13/checkpoint

@@ -0,0 +1,15 @@
+model_checkpoint_path: "model.ckpt"
+all_model_checkpoint_paths: "..\\0-0\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-1\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-2\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-3\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-4\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-5\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-6\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-7\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-8\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-9\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-10\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-11\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-12\\model.ckpt"
+all_model_checkpoint_paths: "model.ckpt"

BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-13/model.ckpt.data-00000-of-00001


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-13/model.ckpt.index


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-13/model.ckpt.meta


+ 16 - 0
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-14/checkpoint

@@ -0,0 +1,16 @@
+model_checkpoint_path: "model.ckpt"
+all_model_checkpoint_paths: "..\\0-0\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-1\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-2\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-3\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-4\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-5\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-6\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-7\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-8\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-9\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-10\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-11\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-12\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-13\\model.ckpt"
+all_model_checkpoint_paths: "model.ckpt"

BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-14/model.ckpt.data-00000-of-00001


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-14/model.ckpt.index


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-14/model.ckpt.meta


+ 17 - 0
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-15/checkpoint

@@ -0,0 +1,17 @@
+model_checkpoint_path: "model.ckpt"
+all_model_checkpoint_paths: "..\\0-0\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-1\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-2\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-3\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-4\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-5\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-6\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-7\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-8\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-9\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-10\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-11\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-12\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-13\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-14\\model.ckpt"
+all_model_checkpoint_paths: "model.ckpt"

BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-15/model.ckpt.data-00000-of-00001


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-15/model.ckpt.index


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-15/model.ckpt.meta


+ 18 - 0
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-16/checkpoint

@@ -0,0 +1,18 @@
+model_checkpoint_path: "model.ckpt"
+all_model_checkpoint_paths: "..\\0-0\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-1\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-2\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-3\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-4\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-5\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-6\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-7\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-8\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-9\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-10\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-11\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-12\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-13\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-14\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-15\\model.ckpt"
+all_model_checkpoint_paths: "model.ckpt"

BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-16/model.ckpt.data-00000-of-00001


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-16/model.ckpt.index


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-16/model.ckpt.meta


+ 19 - 0
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-17/checkpoint

@@ -0,0 +1,19 @@
+model_checkpoint_path: "model.ckpt"
+all_model_checkpoint_paths: "..\\0-0\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-1\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-2\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-3\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-4\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-5\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-6\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-7\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-8\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-9\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-10\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-11\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-12\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-13\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-14\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-15\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-16\\model.ckpt"
+all_model_checkpoint_paths: "model.ckpt"

BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-17/model.ckpt.data-00000-of-00001


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-17/model.ckpt.index


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-17/model.ckpt.meta


+ 20 - 0
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-18/checkpoint

@@ -0,0 +1,20 @@
+model_checkpoint_path: "model.ckpt"
+all_model_checkpoint_paths: "..\\0-0\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-1\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-2\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-3\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-4\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-5\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-6\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-7\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-8\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-9\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-10\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-11\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-12\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-13\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-14\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-15\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-16\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-17\\model.ckpt"
+all_model_checkpoint_paths: "model.ckpt"

BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-18/model.ckpt.data-00000-of-00001


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-18/model.ckpt.index


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-18/model.ckpt.meta


+ 21 - 0
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-19/checkpoint

@@ -0,0 +1,21 @@
+model_checkpoint_path: "model.ckpt"
+all_model_checkpoint_paths: "..\\0-0\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-1\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-2\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-3\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-4\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-5\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-6\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-7\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-8\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-9\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-10\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-11\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-12\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-13\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-14\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-15\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-16\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-17\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-18\\model.ckpt"
+all_model_checkpoint_paths: "model.ckpt"

BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-19/model.ckpt.data-00000-of-00001


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-19/model.ckpt.index


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-19/model.ckpt.meta


+ 4 - 0
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-2/checkpoint

@@ -0,0 +1,4 @@
+model_checkpoint_path: "model.ckpt"
+all_model_checkpoint_paths: "..\\0-0\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-1\\model.ckpt"
+all_model_checkpoint_paths: "model.ckpt"

BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-2/model.ckpt.data-00000-of-00001


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-2/model.ckpt.index


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-2/model.ckpt.meta


+ 22 - 0
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-20/checkpoint

@@ -0,0 +1,22 @@
+model_checkpoint_path: "model.ckpt"
+all_model_checkpoint_paths: "..\\0-0\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-1\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-2\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-3\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-4\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-5\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-6\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-7\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-8\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-9\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-10\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-11\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-12\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-13\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-14\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-15\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-16\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-17\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-18\\model.ckpt"
+all_model_checkpoint_paths: "..\\0-19\\model.ckpt"
+all_model_checkpoint_paths: "model.ckpt"

BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-20/model.ckpt.data-00000-of-00001


BIN
iepy/selfpreprocess/BiddingKG/dl/foolnltk/model/0-20/model.ckpt.index


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff