简体   繁体   English

如何使用linux命令传递输入和配置文件

[英]how to pass input and configurations files by using linux command

I have an executable file vs-vectorize for which I want to pass af ile to analyze along side its configuration files. 我有一个可执行文件vs-vectorize ,我想对其进行传递, 对其配置文件进行分析 I am Very very new to linux so excuse my question. 我对linux非常陌生,请原谅。


The file to analyze is in xml format: 要分析的文件为xml格式:

<doc id="E0211315">
<text>
Gimme Dat

For the Chris Brown song, see Gimme That

"Gimme Dat" is the second single released off of Chingy's fourth album, Hate It
or Love It. The single features Ludacris and Bobby Valentino.

The video premiered on MTV's TRL and BET's 106 & Park on February 8, 2008. The
song however failed to chart making it his second consecutive single flop from
the album.

 Charts
</text>
</doc>

The parameters are the following: 参数如下:

Usage:
  vectorize --conf=.. --language=.. [--xml-conf=..] --output=.. files 
Options:
  -h [ --help ]         Display this help message
  --conf arg            XML config file
  --xml-conf arg        configuration file for xml analysis (to interpret xml 
                        format of input file)
  --language arg        language of the documents
  --output arg          prefix of the files for outputs


--conf
This option allows to specify the name of the configuration file to use: this file contains all the parameters used for the different steps of the construction of the vector representation (Analyzers, LexiconBuilder, VectorBuilder). More details on the content of the configuration file are given in this page: Configuration File.

--xml-conf
This option allows to specify the name of a configuration file that indicates how to parse the xml input file. This configuration file should respect the XML format defined here: XML Format for the input file parser configuration.

--language
This option specifies the language of the documents (useful in the linguistic analysis step).

--output
This option specifies the base name for the output files created by this program. The main output file containing the vectors will be base.data. If this argument is not set, the base name of the first input file is used (without .xml or .txt extension).

I am passing the arguments as follows: 我传递的参数如下:

./vs-vectorize documents.xml --conf vs-config.xml --xml-conf configuration.xml

Where documents.xml is the input file to analyze and others are the parameter files. 其中documents.xml是要分析的输入文件,其他是参数文件。

Some modification: 一些修改:

./vs-vectorize --conf="/home/hani/workspace/textvector/conf/vs-config.xml" --language="Eng" --xml-conf="/home/hani/workspace/textvector/release/src/vs-vectorize/configuration.xml" /home/hani/workspace/textvector/release/src/vs-vectorize/documents.xml

Nothing is coming out why? 什么都没出来为什么呢? What am I doing wrong? 我究竟做错了什么?

传递文件的完整路径,例如:/home/hani/documents.xml,而不只是文件名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在命令中传递多个参数以使用C / C ++和SSH在远程Linux计算机上执行exe - How to pass multiple arguments in a command to execute an exe on remote linux machine using C/C++ and SSH 如何在“top”linux命令中进行控制台输入? - How to do console input like in the “top” linux command? 在Linux中使用库文件 - Using library files in Linux 如何在 windows 的命令行中读取 input.in 文件 - How do I read input .in files in command line on windows 用于用户输入的Linux C ++ gdb命令 - Linux C++ gdb command for user input Qt Creator(不是CMake)如何为不同的构建配置指定不同的文件? - Qt Creator (not CMake) how to specify different files for different build configurations? 如何为LLVM BitCode .bc文件配置备用Eclipse运行配置? - How to Configure Alternate Eclipse Run Configurations - for LLVM BitCode .bc files? 是否可以在命令行中将输入参数传递给可执行文件 - Is it possible to pass input arguments to an executable in the command line 如何在Linux中使用Google Protobufs确保相同的输出文件(* .o) - How to ensure identical output files (*.o) using Google Protobufs in Linux 将 cin 转换为 argc argv 输入。 使用命令行传递值的新手 - Convert cin to argc argv input. New to using command line to pass values
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM