rmraya / OpenXLIFF

An open source set of Java filters for creating, merging and validating XLIFF 1.2, 2.0 and 2.1 files.
https://www.maxprograms.com/products/openxliff.html
Eclipse Public License 1.0
65 stars 17 forks source link

-srx option doesn't work #11

Closed handhikadj closed 3 years ago

handhikadj commented 3 years ago

I used LanguageTool's SRX file and can't see the extracted file is segmented according to the SRX file. I've compared the unsegmented with the segmented one but still can't see the difference

command I ran: ./convert.sh -file ~/Documents/sample.xliff -srcLang en -srx ~/Documents/languagetoolorg-srx.srx

I've attached sample file

Archive.zip

rmraya commented 3 years ago

Works as designed. Your source file is XLIFF 2.0 and it will not be re-segmented if you convert it to XLIFF 1.2.

If you convert your source file to XLIFF 2.0, it is re-segmented using the provided SRX file. You can check it with this command:

./convert.sh -file ~/Documents/sample.xliff -srcLang en -srx ~/Documents/languagetoolorg-srx.srx -2.0