• 大小: 97.91MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2022-04-28
  • 语言: 其他
  • 标签: ai  围棋  leela  

资源简介

本分析工具已集成了目前最火的Leelazero,使用的Leelazero权重文件为最新的2da8

资源截图

代码片段和文件信息


import subprocess

#updating the list of english entries
python_files=[“main.py“ “toolbox.py“ “settings.py“ “gnugo_analysis.py“ “leela_analysis.py“ “leela_zero_analysis.py“ “aq_analysis.py“ “ray_analysis.py“ “dual_view.py“ “live_analysis.py“ “gtp_terminal.py“ “r2sgf.py“ “r2csv.py“ “tabbed.py“]


cmd=“xgettext --no-wrap -E --keyword=_ --language=python -o en.po --sort-by-file “
output = subprocess.check_output(cmd.split()+[“../“+f for f in python_files])

def get_sentences_old(langcheck_for_double=False):

data_file_url=lang+“.po“
print “Loading translation file:“data_file_url

data_file = open(data_file_url“r“)
translation_data=data_file.read()
data_file.close()

sentences=[]
translated_sentences=[]
for line in translation_data.split(‘\n‘):
key=“msgid“
if line[:len(key)+2]==key+‘ “‘:
entry=line[len(key)+2:-1]
if check_for_double:
if entry in sentences:
print “[Warning] double entries for:“entry
sentences.append(entry)

key=“msgstr“
if line[:len(key)+2]==key+‘ “‘:
translation=line[len(key)+2:-1]
translation=translation.replace(“\\\“““\““)
translated_sentences.append(translation)

return sentencestranslated_sentences

def get_translations(langcheck_for_double=False):
translations={}

data_file_url=lang+“.po“
print “Loading translation file:“data_file_url

data_file = open(data_file_url“r“)
translation_data=data_file.read()
data_file.close()

entry=““
translation=““

for line in translation_data.split(‘\n‘):

key=“msgid“
if line[:len(key)+2]==key+‘ “‘:
entry=line[len(key)+2:-1]
translation=““

key=“msgstr“
if line[:len(key)+2]==key+‘ “‘:
translation=line[len(key)+2:-1]
translation=translation.replace(“\\\“““\““)
if len(entry)>0:
if check_for_double:
if entry in translations:
print “[Warning] double entries for:“entry
translations[entry]=translation


entry=““
translation=““
return translations

print
print “================================================================“
print “================================================================“
print “================================================================“
print

english=get_translations(“en“True)

available_translations=[“fr““de““kr““zh““new_translation“]

from sys import argv
if len(argv)==2:
if argv[1] in available_translations:
print “Selection of lang=“argv[1]
available_translations=[argv[1]]

statistics={}

for lang in available_translations:
print
print “============= Checking language=“+lang“=============“
translations=get_translations(lang)
statistics[lang]={“total“:len(translations.keys())“missing“:0“empty“:0“extra“:0}
print
print “==== English sentences missing in“lang+“.po ====“
found=False
for sentence in english.keys():
if sentence not in translations.keys():
print ‘msgid “‘+sentence+‘“‘
print ‘msgstr ““‘
print
found=True
statistics[lang][“missing“]+=1
if not found:
print “(none)“

if lang!=“ne

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      76734  2018-10-31 12:42  goreviewpartner-v0.14.2\2018-10-31_10-43_人_vs_人.rsgf

    .......       199  2018-07-28 12:47  goreviewpartner-v0.14.2\AUTHORS

    .......     68608  2014-12-10 18:25  goreviewpartner-v0.14.2\bz2.pyd

     文件       1858  2018-10-31 12:28  goreviewpartner-v0.14.2\config.ini

    .......   1612504  2017-08-08 00:04  goreviewpartner-v0.14.2\CRYPT32.dll

    .......   3086604  2018-07-28 12:47  goreviewpartner-v0.14.2\GoReviewPartner.exe

    .......      7407  2018-07-28 12:47  goreviewpartner-v0.14.2\icon.gif

     文件   93466662  2018-10-30 09:53  goreviewpartner-v0.14.2\leela-zero\2da8

    .......   2353664  2018-06-22 18:57  goreviewpartner-v0.14.2\leela-zero\leelaz.exe

     文件        221  2018-10-31 10:41  goreviewpartner-v0.14.2\leela-zero\leelaz_opencl_tuning

    .......  30533118  2018-06-22 18:57  goreviewpartner-v0.14.2\leela-zero\libopenblas.dll

    .......     35141  2018-07-28 12:47  goreviewpartner-v0.14.2\LICENSE

    .......    127488  2014-12-10 18:25  goreviewpartner-v0.14.2\pyexpat.pyd

    .......   2459136  2014-12-10 18:25  goreviewpartner-v0.14.2\python27.dll

    .......      2448  2018-07-28 12:47  goreviewpartner-v0.14.2\README.md

    .......     10240  2014-12-10 18:25  goreviewpartner-v0.14.2\select.pyd

    .......     20622  2014-04-22 17:06  goreviewpartner-v0.14.2\tcl\tcl8.5\auto.tcl

    .......    130266  2014-04-22 17:06  goreviewpartner-v0.14.2\tcl\tcl8.5\clock.tcl

    .......      1090  2014-04-22 17:06  goreviewpartner-v0.14.2\tcl\tcl8.5\encoding\ascii.enc

    .......     92873  2014-04-22 17:06  goreviewpartner-v0.14.2\tcl\tcl8.5\encoding\big5.enc

    .......      1091  2014-04-22 17:06  goreviewpartner-v0.14.2\tcl\tcl8.5\encoding\cp1250.enc

    .......      1091  2014-04-22 17:06  goreviewpartner-v0.14.2\tcl\tcl8.5\encoding\cp1251.enc

    .......      1091  2014-04-22 17:06  goreviewpartner-v0.14.2\tcl\tcl8.5\encoding\cp1252.enc

    .......      1091  2014-04-22 17:06  goreviewpartner-v0.14.2\tcl\tcl8.5\encoding\cp1253.enc

    .......      1091  2014-04-22 17:06  goreviewpartner-v0.14.2\tcl\tcl8.5\encoding\cp1254.enc

    .......      1091  2014-04-22 17:06  goreviewpartner-v0.14.2\tcl\tcl8.5\encoding\cp1255.enc

    .......      1091  2014-04-22 17:06  goreviewpartner-v0.14.2\tcl\tcl8.5\encoding\cp1256.enc

    .......      1091  2014-04-22 17:06  goreviewpartner-v0.14.2\tcl\tcl8.5\encoding\cp1257.enc

    .......      1091  2014-04-22 17:06  goreviewpartner-v0.14.2\tcl\tcl8.5\encoding\cp1258.enc

    .......      1090  2014-04-22 17:06  goreviewpartner-v0.14.2\tcl\tcl8.5\encoding\cp437.enc

............此处省略1018个文件信息

评论

共有 条评论