@@ -69,7 +69,7 @@ function main() {
69
69
UIstate [ "version" ] = checkUIversion ( false ) ;
70
70
UIstate [ "scorestep" ] = 0.1 ;
71
71
UIstate [ "maxresults" ] = 1000 ;
72
- UIstate [ "maxsyns" ] = 50 ;
72
+ UIstate [ "maxsyns" ] = 1000 ;
73
73
UIstate [ "prevtimestampobj" ] = null ;
74
74
document . getElementById ( "menuapiurl" ) . href = providers [ "ARAX" ] . url + "/ui/" ;
75
75
@@ -752,7 +752,7 @@ async function sendSyn() {
752
752
syndiv . innerHTML = "" ;
753
753
754
754
var maxsyn = UIstate [ "maxsyns" ] ;
755
- var allweknow = await check_entity ( word , true , maxsyn ) ;
755
+ var allweknow = await check_entity ( word , true , maxsyn , document . getElementById ( "showConceptGraph" ) . checked ) ;
756
756
757
757
if ( 0 ) { // set to 1 if you just want full JSON dump instead of html tables
758
758
syndiv . innerHTML = "<pre>" + JSON . stringify ( allweknow , null , 2 ) + "</pre>" ;
@@ -870,6 +870,9 @@ async function sendSyn() {
870
870
span . append ( ' to change this value ]' ) ;
871
871
text . appendChild ( span ) ;
872
872
}
873
+ else
874
+ text . append ( ' (' + allweknow [ word ] . total_synonyms + ")" ) ;
875
+
873
876
div . appendChild ( text ) ;
874
877
875
878
table = document . createElement ( "table" ) ;
@@ -7654,6 +7657,8 @@ function check_entities_batch(batchsize) {
7654
7657
if ( thisbatch ) batches . push ( thisbatch ) ;
7655
7658
7656
7659
for ( let batch of batches ) {
7660
+ if ( batch . length < 1 )
7661
+ continue ;
7657
7662
fetch ( providers [ "ARAX" ] . url + "/entity" , {
7658
7663
method : 'post' ,
7659
7664
body : JSON . stringify ( { "format" :"minimal" , "terms" :batch } ) ,
@@ -7756,7 +7761,7 @@ function check_entities() {
7756
7761
}
7757
7762
7758
7763
7759
- async function check_entity ( term , wantall , maxsyn = 0 ) {
7764
+ async function check_entity ( term , wantall , maxsyn = 0 , getgraph = false ) {
7760
7765
var data = { } ;
7761
7766
var ent = { } ;
7762
7767
ent . found = false ;
@@ -7772,6 +7777,8 @@ async function check_entity(term,wantall,maxsyn=0) {
7772
7777
queryObj [ 'terms' ] = [ term ] ;
7773
7778
if ( maxsyn > 0 )
7774
7779
queryObj [ 'max_synonyms' ] = maxsyn ;
7780
+ if ( ! getgraph )
7781
+ queryObj [ 'format' ] = 'slim' ;
7775
7782
7776
7783
var response = await fetch ( providers [ "ARAX" ] . url + "/entity" , {
7777
7784
method : 'post' ,
@@ -7933,7 +7940,7 @@ function update_url(urlkey,value) {
7933
7940
else if ( urlkey == 'maxsyns' ) {
7934
7941
var sy = parseInt ( document . getElementById ( urlkey + "_url" ) . value . trim ( ) ) ;
7935
7942
if ( isNaN ( sy ) )
7936
- sy = 50 ;
7943
+ sy = 1000 ;
7937
7944
UIstate [ urlkey ] = sy ;
7938
7945
document . getElementById ( urlkey + "_url" ) . value = UIstate [ urlkey ] ;
7939
7946
}
0 commit comments