Zip file format for uploading pre-annotated data in Watson Knowledge Studio - ibm-watson

I am trying to figure out how to include a pre-annotated model in Watson Knowledge Studio. I have followed the information found here but it doesn't seem to generalize. As a start I have tried exporting an annotated set from Knowledge Studio to re-upload (using the "Import corpus documents and include ground truth" option). If I re-upload the exported zip as-is this works but if I unzip the folder and then recompress it I get the following error:
A file could not be imported: The imported ZIP file is not in the expected format. Check whether the file was exported from another project. The type system from the same project must be imported first. (You selected 'Import corpus documents and include ground truth').
I have tried using the zip command in Linux (both with and without the -k flag which tries to force to MS-DOS style naming) and also used the compress utility in Windows but I get the same error each time. This is without making any changes to the contents of the folder.
Any help would be greatly appreciated!

Would you please check internal structure of your created ZIP with comparing the original ZIP ? Sometime I got the similar trouble report and found that their created ZIP contains root folder in ZIP structure. WKS expects the same folder structure in the ZIP file.

Related

Get file content acitivity on a Logic App in Azure

I'm running issues with an Azure's Logic App activity. I've got a 'for each' activity which is checking and copying some files (Excel) from a source into a blob storage. Now in the path (URL) where the files (Excel) are locate there is also a Folder which is giving me trouble in the 'for each' activity. Before the folder was created, the files were alone inside that path. Once this new folder was created, the for each activity is erroring out reading the 'folder' and succeding in the Excel files. I now it can be solved just moving the folder out or the files into a different path but the source is managed by a different team. I'd like to know if there is some kind of filter that allow me just to pick the files (Excel)and skipping the existing Folder in the source path. Thanks in advance
Instead of Get file content you can use Get file content using path.
Get file content gives the file content using the file identifier. The contents can be copied somewhere else or be used as an attachment.
But in Get file content using path gives the file contents using the path.
So, It’s Get file content using path we get the file only it cannot identify the folder.
Refer here for sharepoint actions

Drupal 7 export Excel cannot open the file

Using Drupal 7, I do an excel export of a webform report.
When I try to open the excel file, I get an error: "Excel cannot open the file myfile.xlsx because the file format of file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file."
I open the file in an editor and I see an xml file which specifies the row data fine.
Can someone explain to me why Drupal is building excel files as xml as you can see in:
modules/contrib/webform/includes/exporters/webform_exporter_excel_xlsx.inc
and what's causing it not to load in excel?
MS Office docs are just zip files containing xml docs and resources like images. You can change the extension of an xlsx (or docx) file and open it to see what is inside. I'm assuming a simple xml file could define a simple Excel file.
I've had issues in the past opening xlsx files from Drupal modules (and other systems) and I found that I could almost always open them in LibreOffice. I don't know enough about the format of an Excel file to determine the reason, it just became my workaround.
This issue is related to overwriting existing temp zip files. You can update the webform module to the latest version or fix this single bug.

Kentico v10 Is it possible to do a bulk export of files from the CMS media library to a folder on a PC?

We have built a file upload facility on our Kentico v10 website. External users upload documents into folders within the media library, and internal staff then need to extract these uploaded documents in order to work with them.
Is it possible to extract the documents in media library in bulk?
We have been told it is only possible to extract the files 1 at a time. There are over 500 a month being uploaded so this has been an unpopular solution with the staff who extract these documents.
It seems unlikely that Kentico would build a CMS that doesn't allow bulk exports from a media library, especially when they have a facility that allows files to be uploaded.
The link below shows a screenshot example of the problem. It is numerous files in the media library that require extracting in bulk. Currently we extract one by one.
![media library with documents requiring bulk extraction]https://drive.google.com/file/d/1lDV1sL7CEtQoVqLoawgtd8r2m7O-bPBr/view?usp=sharing!
If anyone knows a way we can extract these files in bulk to a PC, your help is very much appreciated!
Thank you
Technically speaking, all files for media library are sitting already in a folder on server, so you could get an access to the particular folder and download it (maybe via FTP)...
Or there is an export feature which you may find handy in this case:
https://blogs.jeroenfurst.nl/blog/october-2015/quick-tip-how-to-export-a-media-library-with-files
Open zip folder, extract files in export{timestamp}.zip\Data\Files\media_files##SITENAME##{LibraryFolder}{LibraryName} and change the extension from File_Name.jpg.export to File_Name.jpg
In this case, there is no way to simply export a given selection of files from the Media Library. You can use the example Michal Samuhel gave from Kentico MVP, Jeroen Furst although that exports the whole library.
Your best case would be to create a custom webpart which will allow users to filter the media library files by date, then perform an export on them. The downside, is if the media library files aren't "imported" into the media library, there is no database representation of them at all.
Another option is to modify your upload and email processing process:
users upload to a directory in the media library
you create a custom scheduled task which takes those new files, zips them up, saves the zip file to a download directory, then and sends an email with a link to download the files.
the scheduled task takes those "exported" files and relocates them to a new directory for safe keeping.

Is it possible to get data out of .lightspeedBackup file without using Lightspeed POS?

I have a Lightspeed POS 3.x Backup file. I would like to abstract the database out of it. Is this at all possible? The file extension of the backup file is .lightspeedBackup.
I believe you should be able to just rename it as a .zip and extract it. Once you do you should have several directories and files with all your data in it.
Not sure why they try to hide that or are using their own extension.

2 files with same name in eclipse

I have 2 source folders in my project:
src/main/resources/sql/oracle
src/main/resources/sql/sqlserver
They both have a file called mh1.sql.
The project I'm working on used to support only oracle database, so it just use ClassPathResource("mh1.sql") to load the sql file directly, now I need to support different kinds of database, and switch to the correct sql file according to the database type we're using. So, is there any good way to go? without any big impact on the old project. any rough ideas?
BTW, I find that after compilation, I can only find one mh1.sql under bin folder, I'm a new guy in using Eclipse, and I'm curious to know if it's possible to output these 2 folder oracle and sqlserver to the bin folder and each contains its own mh1.sql file?
As for your second question without knowing your exact Eclipse project settings it's of course close to impossible to tell why you're not seeing the oracle and sqlserver subfolders in your bin folder. However, it should be obvious that this being fixed is a prerequisite for your first problem.
Have a look at the ClassPathResource docs, they tell you that you can/should provide a path to your resource rather than just the name. Hence, you can use ClassPathResource("sql/oracle/mh1.sql").
Having said all that you might also just dump the two files in src/main/resources/sql/ (omitting the subfolders) and give them unique names: ora-mh1.sql and mssql-mh1.sql.

Resources