-
Notifications
You must be signed in to change notification settings - Fork 0
/
Nützliche_Befehle.txt
68 lines (62 loc) · 1.68 KB
/
Nützliche_Befehle.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Zeigt alle Klassen des Datasets an
pt_dataset = pt.get_dataset('irds:ir-lab-sose-2024/ir-acl-anthology-20240504-training')
print("Verfügbare Methoden und Eigenschaften des Datasets:")
print(dir(pt_dataset))
# '__class__',
'__delattr__',
'__dict__',
'__dir__',
'__doc__',
'__eq__',
'__format__',
'__ge__',
'__getattribute__',
'__gt__',
'__hash__',
'__init__',
'__init_subclass__',
'__le__',
'__lt__',
'__module__',
'__ne__',
'__new__',
'__reduce__',
'__reduce_ex__',
'__repr__',
'__setattr__',
'__sizeof__',
'__str__',
'__subclasshook__',
'__weakref__',
'_configure',
'_describe_component',
'_irds_id',
'_irds_ref',
'get_corpus',
'get_corpus_iter',
'get_corpus_lang',
'get_index',
'get_qrels',
'get_results',
'get_topics',
'get_topics_lang',
'get_topicsqrels',
'info_url',
'irds_ref'
#Suchen
bm25.search('pagerank')
# #Benötigt um Permission error beim entpacken zu umgehen
# import os
# import shutil
# source = "/root/.tira/extracted_datasets/ir-lab-sose-2024/ir-acl-anthology-20240504-training/ir-acl-anthology-20240504-training"
# destination = "/root/.tira/extracted_datasets/ir-lab-sose-2024/ir-acl-anthology-20240504-training/input-data"
# try:
# os.rename(source, destination)
# except PermissionError as e:
# print(f"PermissionError encountered: {e}. Trying to copy instead.")
# shutil.copytree(source, destination)
# shutil.rmtree(source)
pt_dataset.get_corpus_iter()
pt_dataset.get_corpus()
pt_dataset.get_topics()
pt_dataset.get_qrels()