请访问我们的网页以获取有关META的信息和教程!
元是现代的C ++数据科学工具包
Doxygen文档可以在此处找到。
我们在元主页上进行了几个不同部分的元部分演练。
如果您在研究中使用Meta,我们将非常感谢我们的ACL演示论文引用:
@InProceedings{meta-toolkit,
author = {Massung, Sean and Geigle, Chase and Zhai, Cheng{X}iang},
title = {{MeTA: A Unified Toolkit for Text Retrieval and Analysis}},
booktitle = {Proceedings of ACL-2016 System Demonstrations},
month = {August},
year = {2016},
address = {Berlin, Germany},
publisher = {Association for Computational Linguistics},
pages = {91--96},
url = {http://anthology.aclweb.org/P16-4016}
}Mac OS X 10.6或更高是需要的。您可能在10.5方面取得了成功,但这未进行测试。
您将需要安装自制型,以及Xcode的命令行工具(Homebrew也需要这些工具,并且它将在安装过程中提示它们,或者您可以在OS X的最新版本上使用xcode-select --install安装它们。
安装自制后,请运行以下命令以获取元的依赖项:
brew update
brew install cmake jemalloc lzlib icu4c首先,运行以下命令:
# clone the project
git clone https://github.com/meta-toolkit/meta.git
cd meta/
# set up submodules
git submodule update --init --recursive
# set up a build directory
mkdir build
cd build
cp ../config.toml .
# configure and build the project
CXX=clang++ cmake ../ -DCMAKE_BUILD_TYPE=Release -DICU_ROOT=/usr/local/opt/icu4c
make您现在可以通过运行以下命令来测试系统:
./unit-test --reporter=spec如果一切都过去,恭喜! Meta似乎正在研究您的系统。
这里的说明在很大程度上取决于您已安装的Ubuntu版本。要检查您的版本,请运行以下命令:
cat /etc/issue根据您看到的内容,您应该继续进行以下指南之一:
如果您的版本小于12.04 LTS,则不支持操作系统(即使是供应商!),如果可能的话,您应该升级至至少12.04 LTS(或14.04 LTS,如果可能)。
在Ubuntu 12.04 LTS上建立的工作需要比最新的14.04姐妹更多的工作,但可以相对容易地完成。但是,您将需要从PPA安装较新的C ++编译器,然后切换到它以构建元数据。我们还需要安装比本地可用的更新的CMAKE版本。
首先运行以下命令,以获取构建元的依赖项。
# this might take a while
sudo apt-get update
sudo apt-get install python-software-properties
# add the ppa that contains an updated g++
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
# this will probably take a while
sudo apt-get install g++ g++-4.8 git make wget libjemalloc-dev zlib1g-dev
wget http://www.cmake.org/files/v3.2/cmake-3.2.0-Linux-x86_64.sh
sudo sh cmake-3.2.0-Linux-x86_64.sh --prefix=/usr/local在CMAKE安装期间,您应该同意许可证,然后说“ N”以包括子目录。您应该能够运行以下命令并查看以下输出:
g++-4.8 --version应该打印
g++-4.8 (Ubuntu 4.8.1-2ubuntu1~12.04) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
和
/usr/local/bin/cmake --version应该打印
cmake version 3.2.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).
依赖关系全部安装后,您应该准备好构建。运行以下命令以开始:
# clone the project
git clone https://github.com/meta-toolkit/meta.git
cd meta/
# set up submodules
git submodule update --init --recursive
# set up a build directory
mkdir build
cd build
cp ../config.toml .
# configure and build the project
CXX=g++-4.8 /usr/local/bin/cmake ../ -DCMAKE_BUILD_TYPE=Release
make您现在可以通过运行以下命令来测试系统:
./unit-test --reporter=spec如果一切都过去,恭喜! Meta似乎正在研究您的系统。
Ubuntu 14.04最近有足够的GCC来构建Meta,但是我们需要为CMAKE的最新版本添加PPA。
首先运行以下命令以安装Meta的依赖项。
# this might take a while
sudo apt-get update
sudo apt-get install software-properties-common
# add the ppa for cmake
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update
# install dependencies
sudo apt-get install g++ cmake libicu-dev git libjemalloc-dev zlib1g-dev一旦安装了依赖项,您应该通过运行以下命令来仔细检查版本。
g++ --version应该输出
g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
和
cmake --version应该输出
cmake version 3.2.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
依赖关系全部安装后,您应该准备好构建。运行以下命令以开始:
# clone the project
git clone https://github.com/meta-toolkit/meta.git
cd meta/
# set up submodules
git submodule update --init --recursive
# set up a build directory
mkdir build
cd build
cp ../config.toml .
# configure and build the project
cmake ../ -DCMAKE_BUILD_TYPE=Release
make您现在可以通过运行以下命令来测试系统:
./unit-test --reporter=spec如果一切都过去,恭喜! Meta似乎正在研究您的系统。
Ubuntu在15.10中提供的非LTS桌面产品在其存储库中具有足够的现代软件,可以构建Meta而不会出现太多麻烦。要安装依赖项,请运行以下命令。
apt update
apt install g++ git cmake make libjemalloc-dev zlib1g-dev依赖关系全部安装后,您应该准备好构建。运行以下命令以开始:
# clone the project
git clone https://github.com/meta-toolkit/meta.git
cd meta/
# set up submodules
git submodule update --init --recursive
# set up a build directory
mkdir build
cd build
cp ../config.toml .
# configure and build the project
cmake ../ -DCMAKE_BUILD_TYPE=Release
make您现在可以通过运行以下命令来测试系统:
./unit-test --reporter=spec如果一切都过去,恭喜! Meta似乎正在研究您的系统。
由于其滚动发布设置,Arch Linux始终具有最新的包装,因此通常是最简单的平台。
要安装依赖项,请运行以下命令。
sudo pacman -Sy
sudo pacman -S clang cmake git icu libc++ make jemalloc zlib依赖关系全部安装后,您应该准备好构建。运行以下命令以开始:
# clone the project
git clone https://github.com/meta-toolkit/meta.git
cd meta/
# set up submodules
git submodule update --init --recursive
# set up a build directory
mkdir build
cd build
cp ../config.toml .
# configure and build the project
CXX=clang++ cmake ../ -DCMAKE_BUILD_TYPE=Release
make您现在可以通过运行以下命令来测试系统:
./unit-test --reporter=spec如果一切都过去,恭喜! Meta似乎正在研究您的系统。
这已经通过Fedora 22+(截至写作时最古老的Fedora)进行了测试。您可能在较早的版本方面取得了成功,但这未进行测试。 (如果您使用的是Fedora的较旧版本,请使用yum代替dnf作为下面给出的命令。)
首先,安装一些依赖项:
# These may be already installed
sudo dnf install make git wget gcc-c++ jemalloc-devel cmake zlib-devel您应该能够运行以下命令并查看以下输出:
g++ --version应该打印
g++ (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
和
cmake --version应该打印
cmake version 3.3.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
依赖关系全部安装后,您应该准备好构建。运行以下命令以开始:
# clone the project
git clone https://github.com/meta-toolkit/meta.git
cd meta/
# set up submodules
git submodule update --init --recursive
# set up a build directory
mkdir build
cd build
cp ../config.toml .
# configure and build the project
cmake ../ -DCMAKE_BUILD_TYPE=Release
make您现在可以使用以下命令测试系统:
./unit-test --reporter=spec可以在CentOS 7及以上建造元。 Centos 7附带了足够的编译器(GCC 4.8.5),但旧版本的Cmake版本。因此,我们将从软件包管理器中安装编译器和相关库,并自己安装自己的最新cmake 。
# install build dependencies (this will probably take a while)
sudo yum install gcc gcc-c++ git make wget zlib-devel epel-release
sudo yum install jemalloc-devel
wget http://www.cmake.org/files/v3.2/cmake-3.2.0-Linux-x86_64.sh
sudo sh cmake-3.2.0-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir您应该能够运行以下命令并查看以下输出:
g++ --version应该打印
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
和
/usr/local/bin/cmake --version应该打印
cmake version 3.2.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).
依赖关系全部安装后,您应该准备好构建。运行以下命令以开始:
# clone the project
git clone https://github.com/meta-toolkit/meta.git
cd meta/
# set up submodules
git submodule update --init --recursive
# set up a build directory
mkdir build
cd build
cp ../config.toml .
# configure and build the project
/usr/local/bin/cmake ../ -DCMAKE_BUILD_TYPE=Release
make您现在可以通过运行以下命令来测试系统:
./unit-test --reporter=spec如果一切都过去,恭喜! Meta似乎正在研究您的系统。
注意:如果您能够以任何其他可能的方式工作,请不要这样做,因为EWS文件系统习惯了难以忍受的缓慢,并且编译时间增加了几个数量级。例如,在我的桌面与EWS上比较cmake , make和unit-test步骤,给出以下内容:
| 系统 | cmake时间 | make | unit-test时间 |
|---|---|---|---|
| 我的桌面 | 0m7.523s | 2M30.715S | 0m36.631s |
| EWS | 1M28 | 11M28.473S | 1M25.326S |
如果您正在使用UIUC进行工程管理的机器,则应遵循本指南。这些系统的软件太旧了,无法构建元数据,但是Engrit很友好,可以将更新版本的研究软件作为模块包装。 GCC和CMAKE提供的模块最近足以构建元数据,因此实际上很简单。
要设置您的依赖项(每次登录到系统时,都需要执行此操作),请运行以下命令:
module load gcc
module load cmake/3.5.0完成此操作后,通过运行以下命令来仔细检查版本。
g++ --version应该输出
g++ (GCC) 5.3.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
和
cmake --version应该输出
cmake version 3.5.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).
如果您的版本正确,则应准备好构建。首先,运行以下命令:
# clone the project
git clone https://github.com/meta-toolkit/meta.git
cd meta/
# set up submodules
git submodule update --init --recursive
# set up a build directory
mkdir build
cd build
cp ../config.toml .
# configure and build the project
CXX= ` which g++ ` CC= ` which gcc ` cmake ../ -DCMAKE_BUILD_TYPE=Release
make您现在可以通过运行以下命令来测试系统:
./unit-test --reporter=spec如果一切都过去,恭喜! Meta似乎正在研究您的系统。
可以使用带有GCC的MINGW-W64工具链在Windows上构建META。我们强烈建议使用MSYS2,因为这使得提取编译器和相关库明显比其他类似的库变得容易得多,并且相对于其他类似的MINGW分布,它往往具有非常最新的包装。
注意:如果您发现以下说明感到困惑或丢失,请参阅我们的Windows Visual设置指南,其中包括每个步骤的屏幕截图,包括更新MSYS2和MINGW-W64工具链。
首先,请从链接网站下载MSYS2的安装程序,并按照该页面上的说明进行操作。安装后,您应该使用mingw shell启动一个新的终端,在该终端中,您应该在其中运行以下命令以下载依赖项和构建所需的相关软件:
pacman -Syu git make patch mingw-w64-x86_64-{gcc,cmake,icu,jemalloc,zlib} --force (截至写作时,需要使用最新的MSYS2安装程序来解决一个--force 。)
然后,退出外壳并启动“ mingw-w64 win64”外壳。您可以获取工具箱并开始:
# clone the project
git clone https://github.com/meta-toolkit/meta.git
cd meta
# set up submodules
git submodule update --init --recursive
# set up a build directory
mkdir build
cd build
cp ../config.toml .
# configure and build the project
cmake .. -G " MSYS Makefiles " -DCMAKE_BUILD_TYPE=Release
make您现在可以通过运行以下命令来测试系统:
./unit-test --reporter=spec如果一切都过去,恭喜! Meta似乎正在研究您的系统。
有清洁,整洁和文档的规则。运行cmake命令一次后,您将能够在开发时像往常一样make - 它将检测到CMakelists.txt文件何时更改并在需要的情况下重建makefiles。
要在调试模式下编译,只需在适当的cmake命令中替换上述操作系统中Debug Release然后使用make Repuild Repuild。
如果您遇到问题设置问题,请随时在论坛上联系。我们通过连续的集成设置(linux和os X的Travis-CI和Windows的AppVeyor)通常使用各种编译器和操作系统构建,因此我们可以肯定的是,几乎所有主要平台都应该建立在所有主要平台上。