-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
371 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
|
||
contextcorrection = 'Context Correction' | ||
repetition = 'Repetition' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,9 @@ pee | |
's | ||
pele | ||
pelen | ||
toeten | ||
toeten | ||
heelboel | ||
pantoet | ||
wintik | ||
afpoelen | ||
int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
from dataclasses import dataclass | ||
import os | ||
from sastadev.conf import settings | ||
from sastadev.sastatypes import MethodName | ||
from sastadev.xlsx import getxlsxdata | ||
from typing import List | ||
|
||
space = ' ' | ||
MethodVariant = str | ||
|
||
|
||
datasetfilename = 'DatasetOverview.xlsx' | ||
datasetfolder = settings.DATAROOT | ||
datasetfullname = os.path.join(datasetfolder, datasetfilename) | ||
|
||
|
||
def robustint(x) -> int: | ||
if x == '' or x == space: | ||
result = 0 | ||
else: | ||
result = int(x) | ||
return result | ||
|
||
|
||
@dataclass | ||
class DataSet: | ||
name: str | ||
methodname: MethodName | ||
use: str | ||
infigures: bool | ||
variant: MethodVariant | ||
samples: int | ||
bronzecount: int | ||
source_org: str | ||
sourcepersons: str | ||
description: str | ||
|
||
|
||
def row2dataset(row: List[str]) -> DataSet: | ||
rawname = row[0] | ||
lcname = rawname.strip() | ||
rawmethodname = row[1] | ||
methodname = rawmethodname.strip().lower() | ||
infigures = "yes" in row[3].lower() | ||
rawvariant = row[4] | ||
variant = rawvariant.strip().lower() | ||
|
||
result = DataSet(name=lcname, methodname=methodname, use=row[2], infigures=infigures, variant=variant, | ||
samples=robustint(row[5]), bronzecount=robustint(row[6]), source_org=row[7], sourcepersons=row[8], | ||
description=row[9]) | ||
return result | ||
|
||
|
||
def getalldatasets(): | ||
datasets = [] | ||
header, data = getxlsxdata(datasetfullname) | ||
for row in data: | ||
newdataset = row2dataset(row) | ||
datasets.append(newdataset) | ||
return datasets | ||
|
||
alldatasets = getalldatasets() | ||
infiguresdatasets = [d for d in alldatasets if d.infigures] | ||
dsname2method = {d.name: d.methodname for d in alldatasets} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.