Skip to content

Commit

Permalink
Created using Colaboratory
Browse files Browse the repository at this point in the history
  • Loading branch information
mille-s committed Nov 24, 2022
1 parent 68e640a commit c8d9255
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions UD_Converter_release.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"metadata": {
"id": "gW1f_juqCmNC"
},
"execution_count": null,
"execution_count": 1,
"outputs": []
},
{
Expand Down Expand Up @@ -89,7 +89,7 @@
"# CONVERSION PARAMETERS ('yes'/'no')\n",
"# Specifications of the T1 and T2 structures and links to papers can be found on the SRST page: http://taln.upf.edu/pages/msr2020-ws/SRST.html\n",
"#============================================================================================================\n",
"# generate input strutures for surface ('t1') or deep ('t2') tracks\n",
"# generate input strutures for surface only ('t1') or deep ('t2') tracks\n",
"track = 't2'\n",
"# keep deep structures from previous executions (for SRST data, we need 2 executions, first for deep and then for surf files): 'yes' or whatever\n",
"keep_deep = 'no'\n",
Expand Down Expand Up @@ -123,15 +123,19 @@
"# keep quotation marks in the deep structure (SRST: 'no')\n",
"quotationMarks = default\n",
"\n",
"#============================================================================================================\n",
"# DO NOT EDIT BELOW\n",
"#============================================================================================================\n",
"\n",
"# path to temporary folders\n",
"tmpIn = os.path.join(path_jars, 'tmpIn')\n",
"tmpOut = os.path.join(path_jars, 'tmpOut')\n",
"# path to the folder in which the debug info is stored\n",
"debugFolder = os.path.join(outputFolder, 'debug')\n",
"# Define output subfolders\n",
"deepOut = os.path.join(outputFolder, 'deep')\n",
"surfOut = os.path.join(outputFolder, 'surf')\n",
"sentOut = os.path.join(outputFolder, 'sent')\n",
"deepOut = os.path.join(outputFolder, 'T2')\n",
"surfOut = os.path.join(outputFolder, 'T1')\n",
"sentOut = os.path.join(outputFolder, 'Sent')\n",
"\n",
"# Clear the debug folder before starting the conversion\n",
"try:\n",
Expand Down Expand Up @@ -180,14 +184,14 @@
"if not os.path.exists(sentOut):\n",
" os.makedirs(sentOut)\n",
"\n",
"deepOutTmp = os.path.join(tmpOut, 'deep')\n",
"deepOutTmp = os.path.join(tmpOut, 'T2')\n",
"if track == 't2':\n",
" if not os.path.exists(deepOutTmp):\n",
" os.makedirs(deepOutTmp)\n",
"surfOutTmp = os.path.join(tmpOut, 'surf')\n",
"surfOutTmp = os.path.join(tmpOut, 'T1')\n",
"if not os.path.exists(surfOutTmp):\n",
" os.makedirs(surfOutTmp)\n",
"sentOutTmp = os.path.join(tmpOut, 'sent')\n",
"sentOutTmp = os.path.join(tmpOut, 'Sent')\n",
"if not os.path.exists(sentOutTmp):\n",
" os.makedirs(sentOutTmp)\n",
"\n",
Expand Down

0 comments on commit c8d9255

Please sign in to comment.