Open
Conversation
.split(".")[0] を os.path.splitext()[0] / Path.stem に置き換え、
最後の拡張子のみを除去するように修正。(ndl-lab#36)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
abc.def.pdfのようなドット入りファイル名を処理すると、出力がabc.xml/abc.txtとなり.defが欠落する問題を修正.split(".")[0]をos.path.splitext()[0]/Path.stemに置き換え、最後の拡張子のみを除去するように変更Closes #36
試験内容
1
digidepo_2531162.0024.jpg等のドット入りファイル名でOCR実行し、出力ファイル名がdigidepo_2531162.0024.xml/digidepo_2531162.0024.txtとなることdigidepo_2531162.0024_tei.xml,digidepo_2531162.0024.json,digidepo_2531162.0024.txt,digidepo_2531162.0024.xml,viz_digidepo_2531162.0024.jpg2
digidepo_2531162_0024.jpg等の通常ファイル名で従来通り動作することdigidepo_2531162_0024_tei.xml,digidepo_2531162_0024.json,digidepo_2531162_0024.txt,digidepo_2531162_0024.xml,viz_digidepo_2531162_0024.jpg