Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Oct 17, 2024
1 parent 672b73d commit 2c210c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion foliatools/alpino2folia.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ def extract_dependencies(alpinonode, deplayer, foliasentence):

def makefoliadoc(outputfile):
baseid = os.path.basename(outputfile).replace('.folia.xml','').replace('.xml','')
if not folia.isncname(baseid):
try:
folia.isncname(baseid):
except ValueError:
baseid = folia.makencname(baseid)
processor = folia.Processor.create("alpino2folia", version=TOOLVERSION)
foliadoc = folia.Document(id=baseid, processor=processor)
Expand Down

0 comments on commit 2c210c6

Please sign in to comment.