The Data Mining Forum                             open-source data mining software data mining conferences Data Science for Social and Behavioral Analytics DSSBA 2022 data science journal
IMPORTANT: This is the old Data Mining forum.
I keep it online so that you can read the old messages.

Please post your new messages in the new forum: https://forum2.philippe-fournier-viger.com/index.php
 
Convert text data to SPMF format via command line
Posted by: Za-Re
Date: August 14, 2020 02:04AM

Hi,

First, I should thank you for this wonderful open source library.

Currently, I work with text data- more specifically with tweets. I found an example on documentation (Example 213) regarding how to convert text files to SPMF format. I am wondering whether there are also some commands to achieve this via terminal and if so, what it is.

Options: ReplyQuote
Re: Convert text data to SPMF format via command line
Date: August 14, 2020 02:59AM

Hi,

Welcome to the forum and thanks for using SPMF.

Yes, example #213 explains how to use the text file from the source code.

But if you use the GUI or the command line to call SPMF, then it will all be done automatically. So you can just call the algorithm that you want to use from the command line with a file with .text as extension, and it should work!

For example, if you want to apply the TKS algorithm from the command line you can check the example for TKS (#135), and you will see that the command should be like this:

java -jar spmf.jar run TKS input.text output.txt 5

Here, input.text is my input file in text format.

Best regards,

Philippe

Options: ReplyQuote
Re: Convert text data to SPMF format via command line
Posted by: Za-Re
Date: August 14, 2020 03:29AM

Thank you so much. That perfectly worked.

Kind regards,
Zahra

Options: ReplyQuote


This forum is powered by Phorum and provided by P. Fournier-Viger (© 2012).
Terms of use.