def load_text_data(dataset, directory, centre=True):
points, point_names = parse_text(os.path.join(directory, dataset + '<STR_LIT>'))[<NUM_LIT:0>:<NUM_LIT:2>]<EOL>present_index = [i for i in range(points[<NUM_LIT:0>].shape[<NUM_LIT:1>]) if not (np.any(np.isnan(points[<NUM_LIT:0>][:, i])) or np.any(np.isnan(points[<NUM_LIT:0>][:, i])) or np.any(np.isnan(points[<NUM_LIT:0>][:, i])))]<EOL>point_names = point_names[present_index]<EOL>for i in range(<NUM_LIT:3>):<EOL><INDENT>points[i] = points[i][:, present_index]<EOL>if centre:<EOL><INDENT>points[i] = (points[i].T - points[i].mean(axis=<NUM_LIT:1>)).T <EOL><DEDENT><DEDENT>Y = np.concatenate((points[<NUM_LIT:0>], points[<NUM_LIT:1>], points[<NUM_LIT:2>]), axis=<NUM_LIT:1>)<EOL>Y = Y/<NUM_LIT><EOL>connect = read_connections(os.path.join(directory, '<STR_LIT>'), point_names)<EOL>return Y, connect<EOL>
Load in a data set of marker points from the Ohio State University C3D motion capture files (http://accad.osu.edu/research/mocap/mocap_data.htm).