<jupyter_start><jupyter_text>Load the moduleIf you added the folder in which `jpkfile.py` is to you site-packages, you should be able to import the module.<jupyter_code>import jpkfile<jupyter_output><empty_output><jupyter_text>Create a JPKFile object<jupyter_code>jpk = jpkfile.JPKFile("../examples/force-save-2016.06.15-13.17.08.jpk-force")<jupyter_output><empty_output><jupyter_text>Structure of JPKFile objects * Data is separated in segments in jpk archives. Thus, it is separated in JPKFile objects as well. The member JPKFile.segments is a list of JPKSegment objects.<jupyter_code>jpk.segments<jupyter_output><empty_output><jupyter_text>* To get some basic information on the jpk archive behin the JPKFile object, you can use the JPKFile.get_info function. Note that 'segments' is currently the only working keyword here ...<jupyter_code>print(jpk.get_info('segments'))<jupyter_output>======================================================================
SEGMENT	TYPE	NUM POINTS	DURATION
-------	----	----------	--------
0	extend	60000		10.0
1	pause	30000		5.0
2	retract	60000		10.0
3	pause	2		5.0
======================================================================
{'fraction_non_alphanumeric': 0.2153191489361702, 'fraction_numerical': 0.0374468085106383, 'mean_word_length': 5.569832402234637, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, '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}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '35813', 'license': 'MIT', 'n_tokens_mistral': 404, 'n_tokens_neox': 375, 'n_words': 107, 'path': 'examples/.ipynb_checkpoints/read_data_from_jpk_archive-checkpoint.ipynb', 'repo_name': 'JelleWestra/jpkfile', 'size': '1175'}