Skip to content

Instantly share code, notes, and snippets.

@ravenscroftj
Created March 29, 2016 08:43
Show Gist options
  • Save ravenscroftj/2420abe3aab348bcd979 to your computer and use it in GitHub Desktop.
Save ravenscroftj/2420abe3aab348bcd979 to your computer and use it in GitHub Desktop.
import csv
import sys
import argparse
import random
def main():
ap = argparse.ArgumentParser(description="Split your NLC groundtruth into test and train data")
ap.add_argument("gtfile", help="Ground truth CSV file")
ap.add_argument("ratio", help="ratio split, for example 80:20 or 70:20:10 for a blind truth set")
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment