mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nlp.git
				synced 2025-10-31 12:52:47 +00:00 
			
		
		
		
	Mark required arguments in scripts as required
This commit is contained in:
		| @@ -23,7 +23,8 @@ parser = ArgumentParser( | ||||
| ) | ||||
| parser.add_argument( | ||||
|     '-i', '--input-file', | ||||
|     help='Input file' | ||||
|     help='Input file', | ||||
|     required=True | ||||
| ) | ||||
| parser.add_argument( | ||||
|     '-o', '--output-file', | ||||
|   | ||||
| @@ -6,16 +6,19 @@ from stand_off_data import StandOffData | ||||
| import hashlib | ||||
| import json | ||||
|  | ||||
|  | ||||
| parser = ArgumentParser( | ||||
|     description='Convert plain text and JSON stand off to a CWB vrt file' | ||||
| ) | ||||
| parser.add_argument( | ||||
|     '-s', '--stand-off-data-file', | ||||
|     help='JSON stand off data input file' | ||||
|     help='JSON stand off data input file', | ||||
|     required=True | ||||
| ) | ||||
| parser.add_argument( | ||||
|     '-t', '--text-file', | ||||
|     help='Plain text input file' | ||||
|     help='Plain text input file', | ||||
|     required=True | ||||
| ) | ||||
| parser.add_argument( | ||||
|     '-o', '--output-file', | ||||
| @@ -24,6 +27,7 @@ parser.add_argument( | ||||
| ) | ||||
| args = parser.parse_args() | ||||
|  | ||||
|  | ||||
| with open(args.stand_off_data_file) as stand_of_data_file: | ||||
|     stand_off_data = StandOffData(json.load(stand_of_data_file)) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user