Skip to content

Commit

Permalink
Add plot argument to CLI parser
Browse files Browse the repository at this point in the history
  • Loading branch information
louislefevre committed Mar 27, 2021
1 parent e60ee40 commit 9d435e8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions start.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ def main():
parser = argparse.ArgumentParser(description='Information retrieval models.')
parser.add_argument('dataset', help='dataset for retrieving passages and queries')
parser.add_argument('model', help='model for ranking passages against queries')
parser.add_argument('-p', '--plot', action='store_true', help='generate term frequency graph')
parser.add_argument('-s', '--smoothing', help='smoothing for the Query Likelihood model')

args = parser.parse_args()
model = args.model
smoothing = args.smoothing

parser = DatasetParser(args.dataset)
results = parser.parse(model, smoothing=smoothing)
results = parser.parse(args.model, plot_freq=args.plot, smoothing=args.smoothing)


if __name__ == '__main__':
Expand Down

0 comments on commit 9d435e8

Please sign in to comment.