<commit_before># emuValidationNodeServer

Simple validation server to validate json files used by the new EMU speech database management system

#Usage:



#CURL commands:

## Validate `_DBconfig.json` files

### curl

`curl -XPOST -H 'Content-Type:application/json' -H 'Accept: application/json' --data-binary @/path/2/emuLVC/validators/exampleInstances/instanceOfglobalDBconfig.json http://localhost:9263/_DBconfig`

### RCurl

`library('RCurl')`

`json_file = '/path/2/emuLVC/validators/exampleInstances/instanceOfglobalDBconfig.json'`
`json_data = fromJSON(paste(readLines(json_file), collapse=""))`
`headers <- list('Accept' = 'application/json', 'Content-Type' = 'application/json')`
`postForm("http://localhost:9263/_DBconfig", .opts=list(postfields=paste(readLines(json_file), collapse=""), httpheader=headers))`


## Validate `_annot.json` files

### curl

`curl -XPOST -H 'Content-Tpe:application/json' -H 'Accept: application/json' --data-binary @/path/2/emuLVC/validators/exampleInstances/instanceOfAnnotationFile.json http://localhost:9263/_annot`

### RCurl

`library('RCurl')`

`json_file = '/path/2/emuLVC/validators/exampleInstances/instanceOfAnnotationFile.json'
`json_data = fromJSON(paste(readLines(json_file), collapse=""))`
`headers <- list('Accept' = 'application/json', 'Content-Type' = 'application/json')`
`postForm("http://localhost:9263/_annot", .opts=list(postfields=paste(readLines(json_file), collapse=""), httpheader=headers))`<commit_msg>missing '<commit_after># emuValidationNodeServer

Simple validation server to validate json files used by the new EMU speech database management system


#CURL commands:

## Validate `_DBconfig.json` files

### curl

`curl -XPOST -H 'Content-Type:application/json' -H 'Accept: application/json' --data-binary @/path/2/emuLVC/validators/exampleInstances/instanceOfglobalDBconfig.json http://localhost:9263/_DBconfig`

### RCurl

`library('RCurl')`

`json_file = '/path/2/emuLVC/validators/exampleInstances/instanceOfglobalDBconfig.json'`
`json_data = fromJSON(paste(readLines(json_file), collapse=""))`
`headers <- list('Accept' = 'application/json', 'Content-Type' = 'application/json')`
`postForm("http://localhost:9263/_DBconfig", .opts=list(postfields=paste(readLines(json_file), collapse=""), httpheader=headers))`


## Validate `_annot.json` files

### curl

`curl -XPOST -H 'Content-Tpe:application/json' -H 'Accept: application/json' --data-binary @/path/2/emuLVC/validators/exampleInstances/instanceOfAnnotationFile.json http://localhost:9263/_annot`

### RCurl

`library('RCurl')`

`json_file = '/path/2/emuLVC/validators/exampleInstances/instanceOfAnnotationFile.json'`
`json_data = fromJSON(paste(readLines(json_file), collapse=""))`
`headers <- list('Accept' = 'application/json', 'Content-Type' = 'application/json')`
`postForm("http://localhost:9263/_annot", .opts=list(postfields=paste(readLines(json_file), collapse=""), httpheader=headers))`
{'fraction_non_alphanumeric': 0.16729259132809832, 'fraction_numerical': 0.013656538067599864, 'mean_word_length': 6.983651226158038, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3646968', 'n_tokens_mistral': 978, 'n_tokens_neox': 944, 'n_words': 161}