From 626abd40c008b18c079d78749308664fb0c585fd Mon Sep 17 00:00:00 2001 From: Milan P Samuel <75712741+milansamuel609@users.noreply.github.com> Date: Sun, 13 Oct 2024 21:23:32 +0530 Subject: [PATCH] Create ErrorCode.py Process finished with exit code -1073741819 (0xC0000005) #13659 --- ErrorCode.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ErrorCode.py diff --git a/ErrorCode.py b/ErrorCode.py new file mode 100644 index 000000000..0f9356763 --- /dev/null +++ b/ErrorCode.py @@ -0,0 +1,25 @@ +# Process finished with exit code -1073741819 (0xC0000005) #13659 +# I have tried the below solution. Please check it once if this helps please let me know. + +import spacy + +# Load the SpaCy language model +nlp = spacy.load('en_core_web_lg') + +# Open the file and process each line +with open('data/1971 Davis Cup.txt', encoding='utf-8') as file: + for line in file: + line = line.strip() + if not line: # Skip empty lines + continue + + doc = nlp(line) # Process the line with SpaCy + tokens = [token.text for token in doc] # Extract tokens + + dependencies = set() + for token in doc: + for child in token.children: + dependencies.add((token.i, token.dep_, child.i)) # Collect dependency relations + + print(f"Tokens: {tokens}") # Display tokens + print(f"Dependencies: {dependencies}") # Display dependency relations