1

If I run Mallet in cmd for a path without spaces, it is ok.

Mallet import-dir --input E:\Mallet\mallet-2.0.8RC3\sample-data\web\en --output E:\Mallet\topicout\weben.mallet --keep-sequence --remove-stopwords

Above is ok. I copy those files under \en into another folder whose path contains spaces. I use quotation marks below, but it does not work. Cmd prompts error data\eco. Can you help me how to deal with spaces in path for this command?

Mallet import-dir --input "F:\0economist data\eco data\final economist 1991-2016 8 country from Abi Proquest\All article\cn article\cn_1991" --output "F:\0economist data\eco data\final economist 1991-2016 8 country from Abi Proquest\All article\cn article\cn_1991_lda\cn91.mallet" --keep-sequence --remove-stopwords

How can I handle spaces in paths on the cmd line?

I am using Mallet 2.0.8, on Windows 7.

Dylan
  • 1,183
  • 4
  • 13
  • 26
  • First, are you confident that the directory paths which contain a SPACE character are correct? Does this answer help? https://stackoverflow.com/questions/38796435/trick-to-use-file-paths-with-spaces-in-mallet-terminal-osx – lit Mar 09 '19 at 17:32

1 Answers1

1
  1. Please look for Mallet error messages. If you find any, please update your post accordingly.

  2. Perhaps the DOS command prompt doesn't like your path. SUGGESTION:

    • Type dir "F:\0economist data\eco data\final economist 1991-2016 8 country from Abi Proquest\All article\cn article\cn_1991" and dir "F:\0economist data\eco data\final economist 1991-2016 8 country from Abi Proquest\All article\cn article\cn_1991_lda\cn91.mallet" to verify both paths
  3. Perhaps Java (by way of Mallet) can't handle the spaces. SUGGESTIONS:

    • Consider changing your path arguments to F:/0economist data/eco data/final economist 1991-2016 8 country from Abi Proquest/All article/cn article/cn_1991" and "F:/0economist data/eco data/final economist 1991-2016 8 country from Abi Proquest/All article/cn article/cn_1991_lda/cn91.mallet"`

    • Consider using dir/x and use the 8.3 equivalent

paulsm4
  • 114,292
  • 17
  • 138
  • 190