diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..b6b0c097a421ba1902628c082386b5839e7f73e1 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,15 @@ +stages: + - check_style + - build + +build_image: + stage: build + image: docker:18.09.7 + only: + - deb + services: + - docker:18.09.7-dind + script: + - APT_USERNAME=aptuser + - docker build . -t corpus2 --build-arg APT_USERNAME --build-arg APT_PASSWORD + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..bd3a9d63343c0486a85ef6f1a073c89f4dff8ccc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,37 @@ +FROM clarinpl/python:3.6 + +ARG APT_USERNAME +ARG APT_PASSWORD +RUN test -n "$APT_USERNAME" +RUN test -n "$APT_PASSWORD" + +RUN apt-get update && apt-get install -y \ + libxml++2.6-dev \ + libloki-dev \ + libboost-all-dev \ + libicu-dev \ + libffi-dev \ + libssl-dev \ + libxml2-utils \ + cmake \ + swig \ + pwrutils \ + gdebi-core + +RUN mkdir -p /home/install +WORKDIR /home/install +COPY ./src ./corpus2 + +RUN mkdir corpus2/build && \ + cd corpus2/build && \ + cmake .. && \ + cmake --build . && \ + cpack + +RUN apt-get install -y curl + + +WORKDIR /home/install/corpus2/build +COPY ./uploaddeb.sh ./ + +RUN bash uploaddeb.sh $APT_USERNAME $APT_PASSWORD https://apt.clarin-pl.eu diff --git a/libpwrutils/CMakeLists.txt b/libpwrutils/CMakeLists.txt deleted file mode 100644 index 14f197191424da0427c295af575ce3150bd50320..0000000000000000000000000000000000000000 --- a/libpwrutils/CMakeLists.txt +++ /dev/null @@ -1,77 +0,0 @@ -########## libpwrutils ############### - -PROJECT(pwrutils) - -set(pwrutils_ver_major "1") -set(pwrutils_ver_minor "0") -set(pwrutils_ver_patch "1") - -set(LIBPWRUTILS_VERSION - "${pwrutils_ver_major}.${pwrutils_ver_minor}.${pwrutils_ver_patch}") - - -configure_file(version.in include/libpwrutils/version.h) -include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/) -add_definitions(-DHAVE_VERSION_H) -set(LIBS "") -if(UNIX) - set(LIBS ${LIBS} dl) -endif(UNIX) - -include_directories( ${CMAKE_SOURCE_DIR} ) - -find_package(ICU REQUIRED) -include_directories(${ICU_INCLUDE_DIR}) -include_directories(${Boost_INCLUDE_DIR}) -link_directories(${ICU_LIBRARY_DIRS}) -set(LIBS ${LIBS} icuuc icuio) - -link_directories(${Boost_LIBRARY_DIRS}) -set(LIBS ${LIBS} ${Boost_LIBRARIES}) - -SET(libpwrutils_STAT_SRC - exception.cpp - whitespace.cpp - pathsearch.cpp - plugin.cpp - plural.cpp - util.cpp -) - -file(GLOB_RECURSE INCS "*.h") - -if(WIN32) -# For DLLs on Windows (aka SHARED libraries) you have to explicitly -# specify the external API of the library. Nothing is exported -# by default. -# For UNIX on the other hand everything is exported by default. -# Until external API is specified explicitly, build STATIC for WIN32 - add_library(pwrutils SHARED ${libpwrutils_STAT_SRC} ${INCS}) -else(WIN32) - add_library(pwrutils SHARED ${libpwrutils_STAT_SRC} ${INCS}) -endif(WIN32) -target_link_libraries(pwrutils ${LIBS} ) -set_target_properties(pwrutils PROPERTIES - VERSION "${pwrutils_ver_major}.${pwrutils_ver_minor}" - SOVERSION ${pwrutils_ver_major}) - - install(TARGETS pwrutils - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib) - - install( - DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DESTINATION include - FILES_MATCHING PATTERN "*.h" - PATTERN ".svn" EXCLUDE - PATTERN "bin" EXCLUDE - PATTERN "build" EXCLUDE - PATTERN "CMake*" EXCLUDE - ) - install( - DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ - DESTINATION include - FILES_MATCHING PATTERN "version.h" - ) - diff --git a/libpwrutils/bitset.h b/libpwrutils/bitset.h deleted file mode 100644 index 528568f88e4cdf3b3eb254118bf0f47b379c45d2..0000000000000000000000000000000000000000 --- a/libpwrutils/bitset.h +++ /dev/null @@ -1,236 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - Part of the libcorpus2 project - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -#ifndef PWRNLP_BITSET_H -#define PWRNLP_BITSET_H - -#include <boost/foreach.hpp> -#include <boost/range.hpp> -#include <bitset> -#include <boost/functional/hash.hpp> -#include <boost/pending/lowest_bit.hpp> -#include <climits> - -#ifdef _MSC_VER -#include <intrin.h> -#pragma intrinsic(_BitScanForward) -#endif - -namespace PwrNlp { - -using std::bitset; - -static const size_t ulong_bits = sizeof(unsigned long) * CHAR_BIT; - -typedef bitset<ulong_bits> word_bitset; - -template<size_t S> -std::bitset<S> filled_bitset() -{ - std::bitset<S> b = std::bitset<S>(); - b.flip(); - return b; -} - -/** - * Count set bits in a integral type. - * http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel - */ -template <typename T> inline -int count_bits_set(T v) -{ - v = v - ((v >> 1) & (T)~(T)0/3); // temp - v = (v & (T)~(T)0/15*3) + ((v >> 2) & (T)~(T)0/15*3); // temp - v = (v + (v >> 4)) & (T)~(T)0/255*15; // temp - return (T)(v * ((T)~(T)0/255)) >> (sizeof(T) - 1) * CHAR_BIT; // count -} - -template <size_t S> inline -size_t count_bits_set(const std::bitset<S>& b) -{ - return b.count(); -} - -/** - * Get index of lowest set bit in an integral type - */ -inline size_t lowest_bit(const unsigned long long& t) -{ - if (t <= 0) return static_cast<size_t>(-1); - return boost::lowest_bit(t); -} - -inline size_t lowest_bit(const unsigned long& t) -{ -#ifndef _MSC_VER - if (t <= 0) return static_cast<size_t>(-1); - return boost::lowest_bit(t); -#else - unsigned long index = 0; - if(_BitScanForward(&index, t)) return index; - return static_cast<size_t>(-1); -#endif -} - -template <size_t S> inline -size_t lowest_bit(const bitset<S>& b) -{ -#ifdef __GNUC__ - return b._Find_first(); -#elif _MSC_VER - for(size_t w = 0; w <= S / ulong_bits; ++w) { - unsigned long index = 0; - if(_BitScanForward(&index, b._Getword(w))) { - return index + w * PwrNlp::ulong_bits; - } - } - return static_cast<size_t>(-1); -#else - if(b.none()) return static_cast<size_t>(-1); - - const bitset<S> mask(std::numeric_limits<unsigned long>::max()); - bitset<S> c(b); - unsigned long offset = 0; - unsigned long ul = (c & mask).to_ulong(); - while(ul == 0) { - c >>= PwrNlp::ulong_bits; - offset += PwrNlp::ulong_bits; - ul = (c & mask).to_ulong(); - } - return lowest_bit(ul) + offset; -#endif -} - -template<> inline -size_t lowest_bit(const word_bitset& b) -{ - return lowest_bit(b.to_ulong()); -} - -/// Helper iterator class for iterating through set bits -template<typename T> -struct set_bits_iterator -{ - typedef T value_type; - typedef std::forward_iterator_tag iterator_category; - typedef int difference_type; - typedef const T *pointer; - typedef const T &reference; - set_bits_iterator(const set_bits_iterator &i): i_(i.i_), c_(i.c_) {} - set_bits_iterator(const T& i) : i_(i), c_(0) { - adv(); - } - - set_bits_iterator &operator++() { - adv(); return *this; - } - set_bits_iterator operator++(int) { - set_bits_iterator c(*this); - c.adv(); - return c; - } - bool operator==(const set_bits_iterator &i) const { - return i_ == i.i_ && c_ == i.c_; - } - bool operator!=(const set_bits_iterator &i) const { - return i_ != i.i_ || c_ != i.c_; - } - const T &operator*() const { return c_; } - -private: - void adv() { - c_.reset(); - if (i_.any()) { - c_.set(lowest_bit(i_)); - i_ ^= c_; - } - } - - T i_; - T c_; -}; - -/** - * Function that returns a foreach-compatible iterator range that allows - * iterating through the set bits of a bitset. It only makes sense to read - * from the returned range. - * - * Example usage: \code - * BOOST_FOREACH(const bitset<32>& b, my_bitset) { - * foo_with(b); - * } - * \endcode - */ -template<size_t S> -boost::iterator_range< set_bits_iterator< std::bitset<S> > > set_bits( - const bitset<S>& bs) -{ - return boost::iterator_range< set_bits_iterator< std::bitset<S> > >( - bs, bitset<S>() - ); -} - -} /* end ns PwrNlp */ - -namespace std { - -template<size_t S> inline -size_t hash_value(bitset<S> b) -{ - size_t seed = 0; - const bitset<S> mask(std::numeric_limits<unsigned long>::max()); - while (b.any()) { - boost::hash_combine(seed, (b & mask).to_ulong()); - b >>= PwrNlp::ulong_bits; - } - return seed; -} - -template<> inline -size_t hash_value(bitset<PwrNlp::ulong_bits> b) -{ - size_t seed = 0; - boost::hash_combine(seed, b.to_ulong()); - return seed; -} - -template<size_t S> inline -bool operator<(bitset<S> left, bitset<S> right) -{ - const bitset<S> mask(std::numeric_limits<unsigned long>::max()); - while (left.any()) { - unsigned long l1 = (left & mask).to_ulong(); - unsigned long r1 = (right & mask).to_ulong(); - if (l1 < r1) { - return true; - } else if (l1 > r1) { - return false; - } - left >>= PwrNlp::ulong_bits; - right >>= PwrNlp::ulong_bits; - } - return right.any(); -} - -template<> inline -bool operator<(bitset<PwrNlp::ulong_bits> left, bitset<PwrNlp::ulong_bits> right) -{ - return left.to_ulong() < right.to_ulong(); -} - -} /* end ns std */ - -#endif // PWRNLP_BITSET_H diff --git a/libpwrutils/exception.cpp b/libpwrutils/exception.cpp deleted file mode 100644 index 17c3e7284b76cef6416fc241a9f81e76edca6723..0000000000000000000000000000000000000000 --- a/libpwrutils/exception.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -#include <libpwrutils/exception.h> -#include <sstream> - -namespace PwrNlp { - -PwrNlpError::PwrNlpError(const std::string &what) - : std::runtime_error(what) -{ -} - -PwrNlpError::~PwrNlpError() throw() -{ -} - -std::string PwrNlpError::info() const -{ - return what(); -} - -std::string PwrNlpError::scope() const -{ - return "general"; -} - -} /* end ns PwrNlp */ diff --git a/libpwrutils/exception.h b/libpwrutils/exception.h deleted file mode 100644 index 74b1825b0bf56f1deee50a57199ee436355f16d6..0000000000000000000000000000000000000000 --- a/libpwrutils/exception.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -#ifndef PWRNLP_EXCEPTION_H -#define PWRNLP_EXCEPTION_H - -#include <stdexcept> - -namespace PwrNlp { - -/** - * Base class for all errors. Derives from @c std::runtime_error. - * - * Call member function @c what to get a short human-readable message - * associated with the error. Call member function @c info to get verbose - * information about the error in possibly multi-line form. - */ -class PwrNlpError : public std::runtime_error -{ -public: - /** - * Instantiate an Error instance with the given message. - * @param what The message to associate with this error. - */ - PwrNlpError(const std::string &what); - - /// Destructor - ~PwrNlpError() throw(); - - /// verbose-info function - virtual std::string info() const; - - /// scope information (subproject-like) - virtual std::string scope() const; -}; - -} /* end ns PwrNlp */ - -#endif // PWRNLP_EXCEPTION_H diff --git a/libpwrutils/foreach.h b/libpwrutils/foreach.h deleted file mode 100644 index 71d0d191bd8d64bc14d675c6719702abe6ecacfc..0000000000000000000000000000000000000000 --- a/libpwrutils/foreach.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -#ifndef PWRNLP_FOREACH_H -#define PWRNLP_FOREACH_H - -#include <boost/foreach.hpp> - -#define foreach BOOST_FOREACH - -#endif // PWRNLP_FOREACH_H diff --git a/libpwrutils/pathsearch.cpp b/libpwrutils/pathsearch.cpp deleted file mode 100644 index a10f3cde50ea4e866b5921f126fa2b3521989a78..0000000000000000000000000000000000000000 --- a/libpwrutils/pathsearch.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -#include <libpwrutils/pathsearch.h> - -#include <libpwrutils/exception.h> -#include <boost/foreach.hpp> - -#include <boost/algorithm/string.hpp> -#include <boost/foreach.hpp> -#include <boost/filesystem.hpp> - -#include <fstream> -#include <iostream> - -namespace PwrNlp { - -PathSearcherBase::PathSearcherBase(const std::string& separator) - : paths_(), separator_(separator), verbose_loading_(false) -{ - if (separator.empty()) { - std::cerr << "No path separator! Defaulting to :\n"; - } else if (separator.size() > 1) { - std::cerr << "Separator size > 1, truncating: '" - << separator << "'\n"; - separator_ = separator_[0]; - } -} - -PathSearcherBase::~PathSearcherBase() -{ -} - -const std::vector<std::string>& PathSearcherBase::get_search_path() const -{ - return paths_; -} - -std::string PathSearcherBase::get_search_path_string() const -{ - return boost::algorithm::join(paths_, separator_); -} - -void PathSearcherBase::set_search_path( - const std::vector<std::string> &paths) -{ - paths_ = paths; -} - -void PathSearcherBase::set_search_path(const std::string &paths) -{ - paths_.clear(); - boost::algorithm::split(paths_, paths, - boost::algorithm::is_any_of(separator_)); -} - -const std::string& PathSearcherBase::get_path_separator() const -{ - return separator_; -} - -std::string PathSearcherBase::find_file(const std::string& filename, - const std::string& info) const -{ - boost::filesystem::path i(filename); - if (i.is_complete()) { - if (boost::filesystem::exists(i) && - !boost::filesystem::is_directory(i)) { - if (verbose_loading_) { - std::cerr << "Found " << info << " file: " - << i.string() << "\n"; - } - return i.string(); - } - return ""; - } - BOOST_FOREACH(const std::string& s, paths_) { - boost::filesystem::path pi = s / i; - if (boost::filesystem::exists(pi) && - !boost::filesystem::is_directory(pi)) { - if (verbose_loading_) { - std::cerr << "Found " << info << " file: " - << pi.string() << "\n"; - } - return pi.string(); - } - } - return ""; -} - -bool PathSearcherBase::open_stream(const std::string& filename, - std::ifstream& ifs, const std::string& info) const -{ - std::string f = find_file(filename, info); - if (!f.empty()) { - ifs.open(f.c_str()); - return true; - } - return false; -} - -std::vector<std::string> PathSearcherBase::list_files(const std::string& suffix) const -{ - using boost::filesystem::directory_iterator; - std::vector<std::string> out; - BOOST_FOREACH(const std::string& s, get_search_path()) { - boost::filesystem::path p(s); - if (boost::filesystem::is_directory(s)) { - for (directory_iterator i(p); i != directory_iterator(); ++i) { - boost::filesystem::path in = i->path(); - if (in.extension() == suffix) { -#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - out.push_back(in.stem()); -#else - out.push_back(in.stem().string()); -#endif - } - } - } - } - return out; -} - - -ConfigPathSetter::ConfigPathSetter(PathSearcherBase& ps, - const std::string &new_path) - : ps_(ps), old_path_(ps.get_search_path()) -{ - ps_.set_search_path(new_path); -} - -ConfigPathSetter::~ConfigPathSetter() -{ - ps_.set_search_path(old_path_); -} - -} /* end namespace PwrNlp */ diff --git a/libpwrutils/pathsearch.h b/libpwrutils/pathsearch.h deleted file mode 100644 index 81c1999b968171d9100379f472e392801a4f5bb0..0000000000000000000000000000000000000000 --- a/libpwrutils/pathsearch.h +++ /dev/null @@ -1,196 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -#ifndef PWRNLP_PATHSEARCH_H -#define PWRNLP_PATHSEARCH_H - -#include <unicode/unistr.h> - -#include <map> -#include <ostream> -#include <string> -#include <vector> - -namespace PwrNlp { - -/** - * A class to find files in a given search path. - * - */ -class PathSearcherBase -{ -public: - /** - * Create a new PathSearcher with a separator and no paths. - * Note: the separator MUST be a single character. - */ - PathSearcherBase(const std::string& separator); - - /// Destructor - virtual ~PathSearcherBase(); - - bool get_verbose() const { - return verbose_loading_; - } - - void set_verbose(bool v) { - verbose_loading_ = v; - } - - /// Search path vector accessor - const std::vector<std::string>& get_search_path() const; - - /// Search path string representation accessor - std::string get_search_path_string() const; - - /// Seacrh path setter, vector of already-split paths - void set_search_path(const std::vector<std::string> &paths); - - /// Search path setter, string with the paths separated by the - /// separator char - void set_search_path(const std::string &); - - /// Separator accessor - const std::string& get_path_separator() const; - - /** - * Look for a filename under the search path and return a path to a - * file that exists, or an empty string in case of failure - * @param filename the filename to look for - * @param info info about the file to be displayed if verbose loading - * is on. Empty info string suppreses loading info. - */ - std::string find_file(const std::string& filename, - const std::string& info = "") const; - - /** - * Open a file stream for a file in the library search path - * @param filename the filename to look for - * @param ifs the stream to use - * @param info info about the file to be displayed if verbose loading - * is on. Empty info string suppreses loading info. - */ - bool open_stream(const std::string& filename, std::ifstream& ifs, - const std::string& info = "") const; - - /** - * Convenience wrapper around find_file to throw an exception - * when the file is not found. - * Virtual, as it throws the exception defined by the child class. - */ - virtual std::string find_file_or_throw(const std::string& filename, - const std::string& where) const = 0; - - /** - * Wrapper around open_stream to throw an exception when the file is not - * found. Virtual, as it throws the exception defined by the child class. - */ - virtual void open_stream_or_throw(const std::string& filename, - std::ifstream& ifs, const std::string& where) const = 0; - - /** - * Look for files matching a condition. - */ - std::vector<std::string> list_files(const std::string& suffix) const; - -private: - /// The search paths - std::vector<std::string> paths_; - - /// The path separator - std::string separator_; - - /// Flag to control outputting actual loaded files - bool verbose_loading_; -}; - -/** - * The templated bit of the path search utility. - * - * The passed exception class' constructor should take three parameters: - * the filename, the current search path string and the circumstance - * string (where). - */ -template<typename E> -class PathSearcher : public PathSearcherBase -{ -public: - PathSearcher(const std::string& separator) - : PathSearcherBase(separator) - { - } - - /** - * Convenience wrapper around find_file to throw an exception - * when the file is not found. - */ - std::string find_file_or_throw(const std::string& filename, - const std::string& where) const; - - /** - * Convenience template wrapper around open_stream to throw an - * exception when the file is not found. - */ - void open_stream_or_throw(const std::string& filename, - std::ifstream& ifs, const std::string& where) const; - -}; - -/** - * Convenience class to set the library config path and have it - * automatically reset to the original value upon destruction - */ -class ConfigPathSetter -{ -public: - /// Constructor - ConfigPathSetter(PathSearcherBase& ps, const std::string& new_path); - - /// Destructor - ~ConfigPathSetter(); -private: - /// The affected PathSearcher - PathSearcherBase& ps_; - - /// Stored old path - std::vector<std::string> old_path_; -}; - - -/* Implementation */ - -template<class E> -std::string PathSearcher<E>::find_file_or_throw( - const std::string& filename, const std::string& info) const -{ - std::string fn = find_file(filename, info); - if (fn.empty()) { - throw E(filename, get_search_path_string(), info); - } - return fn; -} - -template<class E> -void PathSearcher<E>::open_stream_or_throw(const std::string& filename, - std::ifstream& ifs, const std::string& info) const -{ - if (!open_stream(filename, ifs, info)) { - throw E(filename, get_search_path_string(), info); - } -} - -} /* end ns PwrNlp */ - -#endif // PWRNLP_PATHSEARCH_H diff --git a/libpwrutils/plugin.cpp b/libpwrutils/plugin.cpp deleted file mode 100644 index dbb96951dad590d0c84b428a9f60b1906f02413e..0000000000000000000000000000000000000000 --- a/libpwrutils/plugin.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ -#include <libpwrutils/plugin.h> -#ifdef __unix__ -#include <dlfcn.h> -#endif -#include <iostream> - -namespace PwrNlp { -namespace Plugin { - -std::string make_soname(const std::string &scope, const std::string &name) -{ - if (name.size() > 1 && name.find('/') != name.npos) { - return name; - } else { - return "lib" + scope + "_" + name + ".so"; - } -} - -bool load(const std::string &scope, const std::string &name, bool quiet) -{ -#ifdef __unix__ - std::string soname = make_soname(scope, name); - // std::cerr << "PLUGIN LOAD " << scope << " " << name << " " << soname << "\n"; - // first check if the plugin was already loaded - void* handle = dlopen(soname.c_str(), RTLD_NOW | RTLD_NOLOAD); - if (handle != NULL) { - if (!quiet) { - std::cerr << "Warning: " << scope << " plugin '" << name - << "'' already loaded\n"; - } - return false; - } - // actually load the library - dlerror(); - handle = dlopen(soname.c_str(), RTLD_NOW); - if (handle == NULL) { - if (!quiet) { - const char* dle = dlerror(); - std::cerr << "Error: dlopen error while loading " << scope - << " plugin '" << name << "' (" << soname << "): "; - if (dle != NULL) { - std::cerr << dle << "\n"; - } - } - return false; - } - // run plugin init function if it exists - typedef void (*init_func_t)(); - init_func_t init_func = reinterpret_cast<init_func_t>( - dlsym(handle, "pwrnlp_plugin_init")); - if (init_func) { - init_func(); - } - if (!quiet) { - std::cerr << "Loaded " << scope << " plugin '" << name << "'\n"; - } -#endif - return true; -} - -bool load_check(const std::string &scope, const std::string &name, bool quiet, - boost::function<size_t (void)> counter, const std::string &what) -{ -#ifdef __unix__ - size_t before = counter(); - if (load(scope, name, quiet)) { - size_t after = counter(); - if (after <= before) { - if (!quiet) { - std::cerr << "Warning: " << scope << " plugin '" - << name << "'' loaded, but" - << what << " count did not increase\n"; - } - return false; - } - return true; - } else { - return false; - } -#else - return true; -#endif -} - -} /* end ns Plugin */ -} /* end ns PwrNlp */ diff --git a/libpwrutils/plugin.h b/libpwrutils/plugin.h deleted file mode 100644 index f7f3d6545f2155fcb83fa145a7df8aeca008db4c..0000000000000000000000000000000000000000 --- a/libpwrutils/plugin.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -#ifndef LIBPWRNLP_PLUGIN_H -#define LIBPWRNLP_PLUGIN_H - -#include <boost/function.hpp> - -namespace PwrNlp { -namespace Plugin { - -/** - * Convert a plugin name to a shared library name that is expected to - * contain the plugin. - */ -std::string make_soname(const std::string& scope, const std::string& name); - -/** - * Load a plugin - */ -bool load(const std::string& scope, const std::string& name, bool quiet); - -/** - * Load a plugin, checking if a counter increases after the load, - * and outputting a disgnostic message if it does not - */ -bool load_check(const std::string& scope, const std::string& name, bool quiet, - boost::function<size_t(void)> counter, const std::string& what); - -} /* end ns Plugin */ -} /* end ns PwrNlp */ - -#endif // LIBPWRNLP_PLUGIN_H diff --git a/libpwrutils/plural.cpp b/libpwrutils/plural.cpp deleted file mode 100644 index 6e6800e90ab06625bb0fa0b71978ab89cf619cf6..0000000000000000000000000000000000000000 --- a/libpwrutils/plural.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -#include <libpwrutils/plural.h> -#include <sstream> - -namespace PwrNlp { - -std::string enpl(int amount, const std::string& sg) -{ - if (amount == 1) { - return sg; - } else { - return sg + "s"; - } -} - -std::string enpln(int amount, const std::string& sg) -{ - std::stringstream ss; - ss << amount << " " << enpl(amount, sg); - return ss.str(); -} - -std::string enpl(int amount, const std::string& sg, const std::string& pl) -{ - if (amount == 1) { - return sg; - } else { - return pl; - } -} - -std::string enpln(int amount, const std::string& sg, const std::string& pl) -{ - std::stringstream ss; - ss << amount << " " << enpl(amount, sg, pl); - return ss.str(); -} - - -std::string plpl(int amount, const std::string& gen0, const std::string& nom1, const std::string& acc2) -{ - if (amount == 1) { - return nom1; - } else { - amount %= 100; - if (amount > 10 && amount < 20) { - return gen0; - } else { - amount %= 10; - if (amount == 2 || amount == 3 || amount == 4) { - return acc2; - } else { - return gen0; - } - } - } -} - -std::string plpln(int amount, const std::string& gen0, const std::string& nom1, const std::string& acc2) -{ - std::stringstream ss; - ss << amount << " " << plpl(amount, gen0, nom1, acc2); - return ss.str(); -} - -} /* end namespace PwrNlp */ diff --git a/libpwrutils/plural.h b/libpwrutils/plural.h deleted file mode 100644 index c4beb320297122abdf18d4b1b8645cce971b4e00..0000000000000000000000000000000000000000 --- a/libpwrutils/plural.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -#ifndef PWRNLP_PLURAL_H -#define PWRNLP_PLURAL_H - -#include <string> - -namespace PwrNlp { - -/// Pluralize sg according to amount, regular English plural -std::string enpl(int amount, const std::string& sg); - -/// Pluralize (English), output the number and the pluralized word -std::string enpln(int amount, const std::string& sg); - -/// Pluralize according to amount, custom English-style plural -std::string enpl(int amount, const std::string& sg, const std::string& pl); - -/// Pluralize (English), output the number and the pluralized word -std::string enpln(int amount, const std::string& sg, const std::string& pl); - -/// Pluralize according to amount, Polish plural -std::string plpl(int amount, const std::string& gen0, const std::string& nom1, const std::string& acc2); - -/// Pluralize (Polish) output the number and the pluralized word -std::string plpln(int amount, const std::string& gen0, const std::string& nom1, const std::string& acc2); - -} /* end ns PwrNlp */ - -#endif // PWRNLP_PATHSEARCH_H diff --git a/libpwrutils/sentence.h b/libpwrutils/sentence.h deleted file mode 100644 index 22a469d6c9a59b67947a4e604104481302761f17..0000000000000000000000000000000000000000 --- a/libpwrutils/sentence.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - Part of the libcorpus2 project - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -#ifndef PWRNLP_SENTENCE_H -#define PWRNLP_SENTENCE_H - -#include <boost/foreach.hpp> -#include <boost/range.hpp> -#include <vector> - -namespace PwrNlp { - - /** - * A simple sentence wrapper template, a template not a plain class since - * it is intended for use with various types of tokens. - * - * A sentence owns its Tokens. - */ - template<typename TT> - class SentenceTemplate : private boost::noncopyable - { - public: - /// Empty constructor - SentenceTemplate() - : tokens_() - { - } - - /// Range constructor - template <typename T> - explicit SentenceTemplate(const T& range) - : tokens_() - { - std::copy(range.begin(), range.end(), std::back_inserter(tokens_)); - } - - SentenceTemplate* clone() const; - - /// Destructor - ~SentenceTemplate() - { - BOOST_FOREACH(TT* t, tokens_) { - delete t; - } - } - - bool empty() const { - return tokens_.empty(); - } - - /// Size accessor - size_t size() const { - return tokens_.size(); - } - - /// Token accessor - TT* operator[](size_t idx) { - return tokens_[idx]; - } - - /// Token accessor, const - const TT* operator[](size_t idx) const { - return tokens_[idx]; - } - - /// Underlying vector accessor, const - const std::vector<TT*>& tokens() const { - return tokens_; - } - - /// Underlying vector accessor - std::vector<TT*>& tokens() { - return tokens_; - } - - /// Helper function for appending tokens - void append(TT* t) { - tokens_.push_back(t); - } - - /// convenience first token accessor - const TT* first_token() const { - assert(!tokens_.empty()); - return tokens_[0]; - } - - private: - /// The tokens this sentence contains and owns - std::vector<TT*> tokens_; - }; - - template<class TT> - SentenceTemplate<TT>* SentenceTemplate<TT>::clone() const - { - SentenceTemplate<TT>* s = new SentenceTemplate<TT>; - BOOST_FOREACH(const TT* t, tokens_) { - s->append(t->clone()); - } - return s; - } - -} /* end ns PwrNlp */ - -#endif // PWRNLP_SENTENCE_H diff --git a/libpwrutils/tokensource.h b/libpwrutils/tokensource.h deleted file mode 100644 index 0fcbaa1005649b385e810032444b6536aa711bf2..0000000000000000000000000000000000000000 --- a/libpwrutils/tokensource.h +++ /dev/null @@ -1,156 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -#ifndef PWRNLP_TOKENSOURCE_H -#define PWRNLP_TOKENSOURCE_H - -#include <boost/function.hpp> -#include <boost/range.hpp> - -#include <iosfwd> -#include <vector> - -namespace PwrNlp { - -/** - * A simple interface for classes that can be used as token sources, for - * example token processing layers. This is actually a template since it - * might be used with different types of Tokens, and avoiding code - * duplication is good. - */ -template<typename T> -class TokenSourceTemplate -{ -public: - /// Constructor - TokenSourceTemplate() - { - } - - /// Destructor - virtual ~TokenSourceTemplate() - { - } - - /** - * Get the next token, or NULL if there are no more tokens. - * Caller takes ownership of the token. - */ - virtual T* get_next_token() = 0; - - /** - * Tokenization helper. Tokenizes the entire input, calling the sink - * functor or each token. The sink takes ownership of the token. - */ - void tokenize(boost::function<void (T*)> sink) { - while (T* t = get_next_token()) { - sink(t); - } - } -}; - -namespace detail { - // Helper template class to get type T when all we have is a type T* - // This bit does nothing by default... - template<typename T> - struct deptr - { - }; - - // ...and this has a typedef for T when the template is used with T* - template<typename T> - struct deptr<T*> - { - typedef T type; - }; - template<typename T> - struct deptr<const T*> - { - typedef T type; - }; - template<typename T> - struct deptr<T* const> - { - typedef const T type; - }; -} /* end ns detail */ - -/** - * Generic TokenSource wrapper for containers of tagger Token pointers, - * e.g. a std::vector<Token*> or a boost::range of Token* iterators. - * - * The container should not be modified as long as it is being accesed - * by a RangeSource wrapper. - * - * There is some mild template magic here to make it work with the - * templated TokenSource. Basically when given a container of some Token*, - * we want to end up with a TokenSource<Token>, hence the deptr. - */ -template<typename T> -class RangeSource : public TokenSourceTemplate< - typename detail::deptr<typename T::value_type>::type> -{ -public: - /// convenience typedef - typedef typename T::const_iterator const_iterator; - - /// Constructor from a range of type T, where T is iterable - /// (i.e. has const_iterator and value_type typedefs and begin / end - /// member functions. - RangeSource(const T& range) - : end_(range.end()), ptr_(range.begin()) - { - } - - /// TokenSource override - typename T::value_type get_next_token() - { - if (ptr_ != end_) { - return *ptr_++; - } else { - return NULL; - } - } - -private: - /// The end iterator - const_iterator end_; - - /// Cuurrent position iterator - const_iterator ptr_; -}; - -/// Helper function to make a RangeSource from a range, -/// avoiding lenghty template instantiation -template<class T> -RangeSource<T>* make_range_source(const T& range) -{ - return new RangeSource<T>(range); -} - -/// Helper function to make a RangeSource from two iterators, -/// avoiding lenghty template instantiation -template<class T> -RangeSource<boost::iterator_range<T> >* make_range_source(const T& b, - const T& e) -{ - boost::iterator_range<T> range(b, e); - return new RangeSource< boost::iterator_range<T> >(range); -} - -} /* end ns PwrNlp */ - - -#endif // PWRNLP_TOKENSOURCE_H diff --git a/libpwrutils/typedefs_includes.in.h b/libpwrutils/typedefs_includes.in.h deleted file mode 100644 index 93bdaeacd460143a0842ed6512870bd1f1fa76b4..0000000000000000000000000000000000000000 --- a/libpwrutils/typedefs_includes.in.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - Part of the libcorpus2 project - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -// no namespace or header guard, should not be used directly - -#include <boost/range.hpp> -#include <string> -#include <vector> - diff --git a/libpwrutils/typedefs_typedefs.in.h b/libpwrutils/typedefs_typedefs.in.h deleted file mode 100644 index 49baa166dcaa4b15650147353524c26c4e4d4ffe..0000000000000000000000000000000000000000 --- a/libpwrutils/typedefs_typedefs.in.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - Part of the libcorpus2 project - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -// no namespace or header guard, should not be used directly - -typedef boost::iterator_range<std::string::const_iterator> string_range; - -typedef std::vector<string_range> string_range_vector; - -typedef boost::iterator_range<std::string::iterator> string_range_mutable; - diff --git a/libpwrutils/util.cpp b/libpwrutils/util.cpp deleted file mode 100644 index 74f65a3c2bcaa56b47b3ce479627f1115a089511..0000000000000000000000000000000000000000 --- a/libpwrutils/util.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -#include <libpwrutils/util.h> - -namespace PwrNlp { - -std::string unescape_utf8(const std::string& str) -{ - std::string out; - UnicodeString u = UnicodeString::fromUTF8(str).unescape(); - u.toUTF8String(out); - return out; -} - -std::string to_utf8(const UnicodeString &ustr) -{ - std::string s; - ustr.toUTF8String(s); - return s; - } - -} /* end namespace PwrNlp */ diff --git a/libpwrutils/util.h b/libpwrutils/util.h deleted file mode 100644 index b309bd029d12d9fbc74c4e1edebe4acbdac68be2..0000000000000000000000000000000000000000 --- a/libpwrutils/util.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -#ifndef PWRNLP_UTIL_H -#define PWRNLP_UTIL_H - -#include <unicode/uniset.h> -#include <unicode/unistr.h> - -#include <iostream> -#include <string> -#include <climits> - -namespace PwrNlp { - -/** - * Helper function to 'unescape' an UTF8 string, which is done by - * converting to a UnicodeString, ICU-unescaping and converting back to - * UTF8. - */ -std::string unescape_utf8(const std::string& str); - -/** - * Helper function to convert an UnicodeString to a UTF-8 std::string - */ -std::string to_utf8(const UnicodeString& ustr); - -/** - * Helper function to put all characters from a std::string and put them - * in a (set-like) container. The string is converted to a UnicodeString, - * unescaping is performed and UChars are fed into the container. As a - * special case, if the string starts with a '[' character, ends with ']' - * and is more than two characters long it is treated like a ICU-style - * UnicodeSet e.g. [a-zA-Z_] and parsed as such using ICU facilities. This - * allows sepcyfying Unicode properties of the characters and more, see - * http://userguide.icu-project.org/strings/unicodeset for details. - */ -template <typename TContainer> -void utf8_string_to_uchar_container(const std::string& s, - TContainer& container) -{ - UnicodeString pres = UnicodeString::fromUTF8(s); - if (pres.length() > 2 && pres.startsWith("[") && pres.endsWith("]")) { - UErrorCode status = U_ZERO_ERROR; - UnicodeSet uset(pres, status); - //std::cerr << "-----UNICODE SET FOR " << s << "\n"; - if (!U_SUCCESS(status)) { - std::cerr << "Unicode character set invalid: " << s << " \n"; - } else { - for (int i = 0; i < uset.size(); ++i) { - UChar32 c = uset.charAt(i); - if (U_IS_BMP(c)) { - container.insert(c); - //std::cerr << - //to_utf8(UnicodeString((UChar)uset.charAt((i)))); - } - } - } - //std::cerr << "\n----END UNICODE SET FOR " << s << "\n"; - } else { - pres = pres.unescape(); - for (int i = 0; i < pres.length(); ++i) { - container.insert(pres.charAt(i)); - } - } -} - - - -} /* end ns PwrNlp */ - -#endif // PWRNLP_UTIL_H diff --git a/libpwrutils/version.in b/libpwrutils/version.in deleted file mode 100644 index 38493aee5b3f944b786a6d6ff406595d56aea890..0000000000000000000000000000000000000000 --- a/libpwrutils/version.in +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef LIBPWRUTILS_VERSION_H -#define LIBPWRUTILS_VERSION_H - -#define LIBPWRUTILS_VERSION_MAJOR @pwrutils_ver_major@ -#define LIBPWRUTILS_VERSION_MINOR @pwrutils_ver_minor@ -#define LIBPWRUTILS_VERSION_PATCH @pwrutils_ver_patch@ -#define LIBPWRUTILS_VERSION "@LIBPWRUTILS_VERSION@" - -#endif diff --git a/libpwrutils/whitespace.cpp b/libpwrutils/whitespace.cpp deleted file mode 100644 index 65aa39d8028d482ff77d2ff6e29aab6da0c050c7..0000000000000000000000000000000000000000 --- a/libpwrutils/whitespace.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -#include <libpwrutils/whitespace.h> - -namespace PwrNlp { - -std::string Whitespace::to_string(Whitespace::Enum wa) -{ - switch (wa) { - case Whitespace::None: - return "none"; - case Whitespace::Space: - return "space"; - case Whitespace::ManySpaces: - return "spaces"; - case Whitespace::Newline: - return "newline"; - case Whitespace::ManyNewlines: - return "newlines"; - default: - return "???"; - } -} - -const char* Whitespace::to_whitespace(Whitespace::Enum wa) -{ - switch (wa) { - case Whitespace::None: - return ""; - case Whitespace::Space: - return " "; - case Whitespace::ManySpaces: - return " "; - case Whitespace::Newline: - return "\n"; - case Whitespace::ManyNewlines: - return "\n\n"; - default: - return "???"; - } -} - -Whitespace::Enum Whitespace::from_string(const std::string &s) -{ - int w = Whitespace::None; - while (w < Whitespace::PostLast - && Whitespace::to_string((Whitespace::Enum)w) != s) ++w; - return (Whitespace::Enum)w; -} - -bool Whitespace::is_valid(Whitespace::Enum w) { - return w >= 0 && w < Whitespace::PostLast; -} - -} /* end namespace PwrNlp */ diff --git a/libpwrutils/whitespace.h b/libpwrutils/whitespace.h deleted file mode 100644 index d39b5544250ffb3b986584fc9f2503758859fa61..0000000000000000000000000000000000000000 --- a/libpwrutils/whitespace.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2010 Tomasz Śniatowski, Adam Radziszewski - - This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or (at your option) -any later version. - - This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. - - See the LICENCE, COPYING.LESSER and COPYING files for more details. -*/ - -#ifndef PWRNLP_WHITESPACE_H -#define PWRNLP_WHITESPACE_H - -#include <string> - -namespace PwrNlp { - -/** - * A whitespace amount enumeration, namespaced. - */ -namespace Whitespace -{ - enum Enum { - None, - Space, - ManySpaces, - Newline, - ManyNewlines, - PostLast // last item guard - }; - - std::string to_string(Enum wa); - - const char* to_whitespace(Enum wa); - - Enum from_string(const std::string& s); - - bool is_valid(Enum w); -} - -} /* end ns PwrNlp */ - -#endif // PWRNLP_WHITESPACE_H diff --git a/CMakeLists.txt b/src/CMakeLists.txt similarity index 74% rename from CMakeLists.txt rename to src/CMakeLists.txt index 7e2b5875b2733b7e316603c93a17948b87e8d48a..cbaa9dab3608c4b012b473b40beac084647aadd6 100644 --- a/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,10 +1,14 @@ -PROJECT(Corpus2Library) +PROJECT(corpus2) set(corpus2_ver_major "1") set(corpus2_ver_minor "8") set(corpus2_ver_patch "0") +set(CORPUS2_VERSION "${corpus2_ver_major}.${corpus2_ver_minor}.${corpus2_ver_patch}") + +set(CMAKE_INSTALL_PREFIX /usr) cmake_minimum_required(VERSION 2.8.0) +set (CMAKE_CXX_STANDARD 11) # use some of our own Find* scripts set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeScripts) @@ -49,7 +53,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) endif(CMAKE_COMPILER_IS_GNUCXX) set(LIBS "") -include_directories(${Corpus2Library_SOURCE_DIR}) +include_directories(${corpus2_SOURCE_DIR}) find_package(Boost 1.41 REQUIRED COMPONENTS program_options system filesystem regex iostreams) MARK_AS_ADVANCED(Boost_DIR) @@ -78,7 +82,6 @@ else() message(STATUS "Not building Poliqarp library and wrapper") endif(CORPUS2_BUILD_POLIQARP) -add_subdirectory(libpwrutils) add_subdirectory(libcorpus2) add_subdirectory(libcorpus2_whole) add_subdirectory(corpus2tools) @@ -112,3 +115,34 @@ else(NOT CORPUS2_BUILD_POLIQARP) message(STATUS "Use cmake wizard mode: -i; to exclude it from the build.") message(STATUS "*****************************************************") endif(NOT CORPUS2_BUILD_POLIQARP) + + +# Sets a default install location for packages installed from deb - we use +# the same location as it's used when we build projects directly from source +set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Detect python version descriptor +if(SWIG_FOUND) + find_package(PythonLibs) + find_package(PythonInterp) + set(PYTHON_VERSION "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") +endif(SWIG_FOUND) + +# Requires to install dependencies +set(CPACK_DEBIAN_PACKAGE_DEPENDS "libxml++2.6-dev, libloki-dev, libboost-all-dev, libicu-dev, libffi-dev, libssl-dev, libxml2-utils, swig, gdebi-core, pwrutils") + +# Set *.deb package name and version +if(PYTHON_VERSION) + SET(CPACK_PACKAGE_NAME "${PROJECT_NAME}-${PYTHON_VERSION}") + SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CORPUS2_VERSION}-all") +else() + SET(CPACK_PACKAGE_NAME "${PROJECT_NAME}") + SET(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CORPUS2_VERSION}-all") +endif(PYTHON_VERSION) + +SET(CPACK_PACKAGE_VERSION "${CORPUS2_VERSION}") + +# Include CPack +SET(CPACK_GENERATOR "DEB") +SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "g419") +INCLUDE(CPack) diff --git a/CMakeScripts/FindCorpus2.cmake b/src/CMakeScripts/FindCorpus2.cmake similarity index 100% rename from CMakeScripts/FindCorpus2.cmake rename to src/CMakeScripts/FindCorpus2.cmake diff --git a/CMakeScripts/FindGlib.cmake b/src/CMakeScripts/FindGlib.cmake similarity index 100% rename from CMakeScripts/FindGlib.cmake rename to src/CMakeScripts/FindGlib.cmake diff --git a/CMakeScripts/FindGlibmm.cmake b/src/CMakeScripts/FindGlibmm.cmake similarity index 100% rename from CMakeScripts/FindGlibmm.cmake rename to src/CMakeScripts/FindGlibmm.cmake diff --git a/CMakeScripts/FindICU.cmake b/src/CMakeScripts/FindICU.cmake similarity index 100% rename from CMakeScripts/FindICU.cmake rename to src/CMakeScripts/FindICU.cmake diff --git a/CMakeScripts/FindLibXML++.cmake b/src/CMakeScripts/FindLibXML++.cmake similarity index 100% rename from CMakeScripts/FindLibXML++.cmake rename to src/CMakeScripts/FindLibXML++.cmake diff --git a/CMakeScripts/FindLibXML2.cmake b/src/CMakeScripts/FindLibXML2.cmake similarity index 100% rename from CMakeScripts/FindLibXML2.cmake rename to src/CMakeScripts/FindLibXML2.cmake diff --git a/CMakeScripts/FindLibedit.cmake b/src/CMakeScripts/FindLibedit.cmake similarity index 100% rename from CMakeScripts/FindLibedit.cmake rename to src/CMakeScripts/FindLibedit.cmake diff --git a/CMakeScripts/FindLoki.cmake b/src/CMakeScripts/FindLoki.cmake similarity index 100% rename from CMakeScripts/FindLoki.cmake rename to src/CMakeScripts/FindLoki.cmake diff --git a/CMakeScripts/FindMorfeusz.cmake b/src/CMakeScripts/FindMorfeusz.cmake similarity index 100% rename from CMakeScripts/FindMorfeusz.cmake rename to src/CMakeScripts/FindMorfeusz.cmake diff --git a/CMakeScripts/FindPwrUtils.cmake b/src/CMakeScripts/FindPwrUtils.cmake similarity index 100% rename from CMakeScripts/FindPwrUtils.cmake rename to src/CMakeScripts/FindPwrUtils.cmake diff --git a/CMakeScripts/FindSigC++.cmake b/src/CMakeScripts/FindSigC++.cmake similarity index 100% rename from CMakeScripts/FindSigC++.cmake rename to src/CMakeScripts/FindSigC++.cmake diff --git a/CMakeScripts/LibFindMacros.cmake b/src/CMakeScripts/LibFindMacros.cmake similarity index 100% rename from CMakeScripts/LibFindMacros.cmake rename to src/CMakeScripts/LibFindMacros.cmake diff --git a/corpus2data/beatca.tagset b/src/corpus2data/beatca.tagset similarity index 100% rename from corpus2data/beatca.tagset rename to src/corpus2data/beatca.tagset diff --git a/corpus2data/extupos.tagset b/src/corpus2data/extupos.tagset similarity index 100% rename from corpus2data/extupos.tagset rename to src/corpus2data/extupos.tagset diff --git a/corpus2data/ikipi.tagset b/src/corpus2data/ikipi.tagset similarity index 100% rename from corpus2data/ikipi.tagset rename to src/corpus2data/ikipi.tagset diff --git a/corpus2data/kipi.tagset b/src/corpus2data/kipi.tagset similarity index 100% rename from corpus2data/kipi.tagset rename to src/corpus2data/kipi.tagset diff --git a/corpus2data/morfeusz.tagset b/src/corpus2data/morfeusz.tagset similarity index 100% rename from corpus2data/morfeusz.tagset rename to src/corpus2data/morfeusz.tagset diff --git a/corpus2data/morfeusz2.tagset b/src/corpus2data/morfeusz2.tagset similarity index 99% rename from corpus2data/morfeusz2.tagset rename to src/corpus2data/morfeusz2.tagset index 927b7e141386e0ab5d47ee84ee5e7db55923a5e7..f1e5e292a5747c01ec294c6ce93a6a0c0ae349b7 100644 --- a/corpus2data/morfeusz2.tagset +++ b/src/corpus2data/morfeusz2.tagset @@ -64,3 +64,4 @@ siebie cas subst nmb cas gnd [col] [ptt] substa winien nmb gnd asp +xxx diff --git a/corpus2data/my.tagset b/src/corpus2data/my.tagset similarity index 100% rename from corpus2data/my.tagset rename to src/corpus2data/my.tagset diff --git a/corpus2data/nkjp.tagset b/src/corpus2data/nkjp.tagset similarity index 100% rename from corpus2data/nkjp.tagset rename to src/corpus2data/nkjp.tagset diff --git a/corpus2data/sgjp.tagset b/src/corpus2data/sgjp.tagset similarity index 100% rename from corpus2data/sgjp.tagset rename to src/corpus2data/sgjp.tagset diff --git a/corpus2data/simple.tagset b/src/corpus2data/simple.tagset similarity index 100% rename from corpus2data/simple.tagset rename to src/corpus2data/simple.tagset diff --git a/corpus2data/skladnica.tagset b/src/corpus2data/skladnica.tagset similarity index 100% rename from corpus2data/skladnica.tagset rename to src/corpus2data/skladnica.tagset diff --git a/corpus2data/spacy.tagset b/src/corpus2data/spacy.tagset similarity index 100% rename from corpus2data/spacy.tagset rename to src/corpus2data/spacy.tagset diff --git a/corpus2data/upos.tagset b/src/corpus2data/upos.tagset similarity index 100% rename from corpus2data/upos.tagset rename to src/corpus2data/upos.tagset diff --git a/corpus2mwe/CMakeLists.txt b/src/corpus2mwe/CMakeLists.txt similarity index 100% rename from corpus2mwe/CMakeLists.txt rename to src/corpus2mwe/CMakeLists.txt diff --git a/corpus2mwe/CMakeScripts/FindCorpus2.cmake b/src/corpus2mwe/CMakeScripts/FindCorpus2.cmake similarity index 100% rename from corpus2mwe/CMakeScripts/FindCorpus2.cmake rename to src/corpus2mwe/CMakeScripts/FindCorpus2.cmake diff --git a/corpus2mwe/CMakeScripts/FindCorpus2Whole.cmake b/src/corpus2mwe/CMakeScripts/FindCorpus2Whole.cmake similarity index 100% rename from corpus2mwe/CMakeScripts/FindCorpus2Whole.cmake rename to src/corpus2mwe/CMakeScripts/FindCorpus2Whole.cmake diff --git a/corpus2mwe/CMakeScripts/FindGlib.cmake b/src/corpus2mwe/CMakeScripts/FindGlib.cmake similarity index 100% rename from corpus2mwe/CMakeScripts/FindGlib.cmake rename to src/corpus2mwe/CMakeScripts/FindGlib.cmake diff --git a/corpus2mwe/CMakeScripts/FindGlibmm.cmake b/src/corpus2mwe/CMakeScripts/FindGlibmm.cmake similarity index 100% rename from corpus2mwe/CMakeScripts/FindGlibmm.cmake rename to src/corpus2mwe/CMakeScripts/FindGlibmm.cmake diff --git a/corpus2mwe/CMakeScripts/FindICU.cmake b/src/corpus2mwe/CMakeScripts/FindICU.cmake similarity index 100% rename from corpus2mwe/CMakeScripts/FindICU.cmake rename to src/corpus2mwe/CMakeScripts/FindICU.cmake diff --git a/corpus2mwe/CMakeScripts/FindLibXML++.cmake b/src/corpus2mwe/CMakeScripts/FindLibXML++.cmake similarity index 100% rename from corpus2mwe/CMakeScripts/FindLibXML++.cmake rename to src/corpus2mwe/CMakeScripts/FindLibXML++.cmake diff --git a/corpus2mwe/CMakeScripts/FindLibXML2.cmake b/src/corpus2mwe/CMakeScripts/FindLibXML2.cmake similarity index 100% rename from corpus2mwe/CMakeScripts/FindLibXML2.cmake rename to src/corpus2mwe/CMakeScripts/FindLibXML2.cmake diff --git a/corpus2mwe/CMakeScripts/FindMWEReader.cmake b/src/corpus2mwe/CMakeScripts/FindMWEReader.cmake similarity index 100% rename from corpus2mwe/CMakeScripts/FindMWEReader.cmake rename to src/corpus2mwe/CMakeScripts/FindMWEReader.cmake diff --git a/corpus2mwe/CMakeScripts/FindSigC++.cmake b/src/corpus2mwe/CMakeScripts/FindSigC++.cmake similarity index 100% rename from corpus2mwe/CMakeScripts/FindSigC++.cmake rename to src/corpus2mwe/CMakeScripts/FindSigC++.cmake diff --git a/corpus2mwe/CMakeScripts/LibFindMacros.cmake b/src/corpus2mwe/CMakeScripts/LibFindMacros.cmake similarity index 100% rename from corpus2mwe/CMakeScripts/LibFindMacros.cmake rename to src/corpus2mwe/CMakeScripts/LibFindMacros.cmake diff --git a/corpus2mwe/README b/src/corpus2mwe/README similarity index 100% rename from corpus2mwe/README rename to src/corpus2mwe/README diff --git a/corpus2mwe/cclmwe/CMakeLists.txt b/src/corpus2mwe/cclmwe/CMakeLists.txt similarity index 100% rename from corpus2mwe/cclmwe/CMakeLists.txt rename to src/corpus2mwe/cclmwe/CMakeLists.txt diff --git a/corpus2mwe/cclmwe/cclmwereader.cpp b/src/corpus2mwe/cclmwe/cclmwereader.cpp similarity index 100% rename from corpus2mwe/cclmwe/cclmwereader.cpp rename to src/corpus2mwe/cclmwe/cclmwereader.cpp diff --git a/corpus2mwe/cclmwe/cclmwereader.h b/src/corpus2mwe/cclmwe/cclmwereader.h similarity index 100% rename from corpus2mwe/cclmwe/cclmwereader.h rename to src/corpus2mwe/cclmwe/cclmwereader.h diff --git a/corpus2mwe/cclmwe/mwemanager.cpp b/src/corpus2mwe/cclmwe/mwemanager.cpp similarity index 100% rename from corpus2mwe/cclmwe/mwemanager.cpp rename to src/corpus2mwe/cclmwe/mwemanager.cpp diff --git a/corpus2mwe/cclmwe/mwemanager.h b/src/corpus2mwe/cclmwe/mwemanager.h similarity index 100% rename from corpus2mwe/cclmwe/mwemanager.h rename to src/corpus2mwe/cclmwe/mwemanager.h diff --git a/corpus2mwe/cclmwe/tests/CMakeLists.txt b/src/corpus2mwe/cclmwe/tests/CMakeLists.txt similarity index 100% rename from corpus2mwe/cclmwe/tests/CMakeLists.txt rename to src/corpus2mwe/cclmwe/tests/CMakeLists.txt diff --git a/corpus2mwe/cclmwe/tests/ccl_gz_tests/__init__.py b/src/corpus2mwe/cclmwe/tests/ccl_gz_tests/__init__.py similarity index 100% rename from corpus2mwe/cclmwe/tests/ccl_gz_tests/__init__.py rename to src/corpus2mwe/cclmwe/tests/ccl_gz_tests/__init__.py diff --git a/corpus2mwe/cclmwe/tests/ccl_gz_tests/documents.py b/src/corpus2mwe/cclmwe/tests/ccl_gz_tests/documents.py similarity index 100% rename from corpus2mwe/cclmwe/tests/ccl_gz_tests/documents.py rename to src/corpus2mwe/cclmwe/tests/ccl_gz_tests/documents.py diff --git a/corpus2mwe/cclmwe/tests/ccl_gz_tests/testMWE.py b/src/corpus2mwe/cclmwe/tests/ccl_gz_tests/testMWE.py similarity index 100% rename from corpus2mwe/cclmwe/tests/ccl_gz_tests/testMWE.py rename to src/corpus2mwe/cclmwe/tests/ccl_gz_tests/testMWE.py diff --git a/corpus2mwe/cclmwe/tests/cclmwe_test.cpp b/src/corpus2mwe/cclmwe/tests/cclmwe_test.cpp similarity index 100% rename from corpus2mwe/cclmwe/tests/cclmwe_test.cpp rename to src/corpus2mwe/cclmwe/tests/cclmwe_test.cpp diff --git a/corpus2mwe/cclmwe/tests/testdata/ccl.xml b/src/corpus2mwe/cclmwe/tests/testdata/ccl.xml similarity index 100% rename from corpus2mwe/cclmwe/tests/testdata/ccl.xml rename to src/corpus2mwe/cclmwe/tests/testdata/ccl.xml diff --git a/corpus2mwe/cclmwe/tests/testdata/ccl1.xml b/src/corpus2mwe/cclmwe/tests/testdata/ccl1.xml similarity index 100% rename from corpus2mwe/cclmwe/tests/testdata/ccl1.xml rename to src/corpus2mwe/cclmwe/tests/testdata/ccl1.xml diff --git a/corpus2mwe/cclmwe/tests/testdata/ccl2.xml b/src/corpus2mwe/cclmwe/tests/testdata/ccl2.xml similarity index 100% rename from corpus2mwe/cclmwe/tests/testdata/ccl2.xml rename to src/corpus2mwe/cclmwe/tests/testdata/ccl2.xml diff --git a/corpus2mwe/data/lod.xml b/src/corpus2mwe/data/lod.xml similarity index 100% rename from corpus2mwe/data/lod.xml rename to src/corpus2mwe/data/lod.xml diff --git a/corpus2mwe/data/mwe.xml b/src/corpus2mwe/data/mwe.xml similarity index 100% rename from corpus2mwe/data/mwe.xml rename to src/corpus2mwe/data/mwe.xml diff --git a/corpus2mwe/swig/CMakeLists.txt b/src/corpus2mwe/swig/CMakeLists.txt similarity index 100% rename from corpus2mwe/swig/CMakeLists.txt rename to src/corpus2mwe/swig/CMakeLists.txt diff --git a/corpus2mwe/swig/cclmwereader.i b/src/corpus2mwe/swig/cclmwereader.i similarity index 100% rename from corpus2mwe/swig/cclmwereader.i rename to src/corpus2mwe/swig/cclmwereader.i diff --git a/corpus2mwe/swig/corpus2mwe.i b/src/corpus2mwe/swig/corpus2mwe.i similarity index 100% rename from corpus2mwe/swig/corpus2mwe.i rename to src/corpus2mwe/swig/corpus2mwe.i diff --git a/corpus2mwe/swig/mwemanager.i b/src/corpus2mwe/swig/mwemanager.i similarity index 100% rename from corpus2mwe/swig/mwemanager.i rename to src/corpus2mwe/swig/mwemanager.i diff --git a/corpus2mwe/tools/mwe_converter.py b/src/corpus2mwe/tools/mwe_converter.py similarity index 100% rename from corpus2mwe/tools/mwe_converter.py rename to src/corpus2mwe/tools/mwe_converter.py diff --git a/corpus2tools/CMakeLists.txt b/src/corpus2tools/CMakeLists.txt similarity index 100% rename from corpus2tools/CMakeLists.txt rename to src/corpus2tools/CMakeLists.txt diff --git a/corpus2tools/corpus-get b/src/corpus2tools/corpus-get similarity index 100% rename from corpus2tools/corpus-get rename to src/corpus2tools/corpus-get diff --git a/corpus2tools/corpus-merge b/src/corpus2tools/corpus-merge similarity index 100% rename from corpus2tools/corpus-merge rename to src/corpus2tools/corpus-merge diff --git a/corpus2tools/tagset-tool.cpp b/src/corpus2tools/tagset-tool.cpp similarity index 100% rename from corpus2tools/tagset-tool.cpp rename to src/corpus2tools/tagset-tool.cpp diff --git a/debian/changelog b/src/debian/changelog similarity index 100% rename from debian/changelog rename to src/debian/changelog diff --git a/debian/compat b/src/debian/compat similarity index 100% rename from debian/compat rename to src/debian/compat diff --git a/debian/control b/src/debian/control similarity index 100% rename from debian/control rename to src/debian/control diff --git a/debian/copyright b/src/debian/copyright similarity index 100% rename from debian/copyright rename to src/debian/copyright diff --git a/debian/docs b/src/debian/docs similarity index 100% rename from debian/docs rename to src/debian/docs diff --git a/debian/files b/src/debian/files similarity index 100% rename from debian/files rename to src/debian/files diff --git a/debian/rules b/src/debian/rules similarity index 100% rename from debian/rules rename to src/debian/rules diff --git a/doc/ccl.dtd b/src/doc/ccl.dtd similarity index 100% rename from doc/ccl.dtd rename to src/doc/ccl.dtd diff --git a/doc/corpstats.py b/src/doc/corpstats.py similarity index 100% rename from doc/corpstats.py rename to src/doc/corpstats.py diff --git a/doc/xcesAnaIPI.dtd b/src/doc/xcesAnaIPI.dtd similarity index 100% rename from doc/xcesAnaIPI.dtd rename to src/doc/xcesAnaIPI.dtd diff --git a/doc/xheaderIPI.elt b/src/doc/xheaderIPI.elt similarity index 100% rename from doc/xheaderIPI.elt rename to src/doc/xheaderIPI.elt diff --git a/learn_to_guess/CMakeLists.txt b/src/learn_to_guess/CMakeLists.txt similarity index 100% rename from learn_to_guess/CMakeLists.txt rename to src/learn_to_guess/CMakeLists.txt diff --git a/learn_to_guess/config.cpp b/src/learn_to_guess/config.cpp similarity index 100% rename from learn_to_guess/config.cpp rename to src/learn_to_guess/config.cpp diff --git a/learn_to_guess/config.h b/src/learn_to_guess/config.h similarity index 100% rename from learn_to_guess/config.h rename to src/learn_to_guess/config.h diff --git a/learn_to_guess/main.cpp b/src/learn_to_guess/main.cpp similarity index 100% rename from learn_to_guess/main.cpp rename to src/learn_to_guess/main.cpp diff --git a/learn_to_guess/tree.cpp b/src/learn_to_guess/tree.cpp similarity index 100% rename from learn_to_guess/tree.cpp rename to src/learn_to_guess/tree.cpp diff --git a/learn_to_guess/tree.h b/src/learn_to_guess/tree.h similarity index 100% rename from learn_to_guess/tree.h rename to src/learn_to_guess/tree.h diff --git a/libcorpus2/CMakeLists.txt b/src/libcorpus2/CMakeLists.txt similarity index 100% rename from libcorpus2/CMakeLists.txt rename to src/libcorpus2/CMakeLists.txt diff --git a/libcorpus2/ann/annotatedsentence.cpp b/src/libcorpus2/ann/annotatedsentence.cpp similarity index 100% rename from libcorpus2/ann/annotatedsentence.cpp rename to src/libcorpus2/ann/annotatedsentence.cpp diff --git a/libcorpus2/ann/annotatedsentence.h b/src/libcorpus2/ann/annotatedsentence.h similarity index 100% rename from libcorpus2/ann/annotatedsentence.h rename to src/libcorpus2/ann/annotatedsentence.h diff --git a/libcorpus2/ann/channel.cpp b/src/libcorpus2/ann/channel.cpp similarity index 100% rename from libcorpus2/ann/channel.cpp rename to src/libcorpus2/ann/channel.cpp diff --git a/libcorpus2/ann/channel.h b/src/libcorpus2/ann/channel.h similarity index 100% rename from libcorpus2/ann/channel.h rename to src/libcorpus2/ann/channel.h diff --git a/libcorpus2/ann/iob.cpp b/src/libcorpus2/ann/iob.cpp similarity index 100% rename from libcorpus2/ann/iob.cpp rename to src/libcorpus2/ann/iob.cpp diff --git a/libcorpus2/ann/iob.h b/src/libcorpus2/ann/iob.h similarity index 100% rename from libcorpus2/ann/iob.h rename to src/libcorpus2/ann/iob.h diff --git a/libcorpus2/ann/view.cpp b/src/libcorpus2/ann/view.cpp similarity index 100% rename from libcorpus2/ann/view.cpp rename to src/libcorpus2/ann/view.cpp diff --git a/libcorpus2/ann/view.h b/src/libcorpus2/ann/view.h similarity index 100% rename from libcorpus2/ann/view.h rename to src/libcorpus2/ann/view.h diff --git a/libcorpus2/boilerplate.cpp.in b/src/libcorpus2/boilerplate.cpp.in similarity index 100% rename from libcorpus2/boilerplate.cpp.in rename to src/libcorpus2/boilerplate.cpp.in diff --git a/libcorpus2/boilerplate.h.in b/src/libcorpus2/boilerplate.h.in similarity index 100% rename from libcorpus2/boilerplate.h.in rename to src/libcorpus2/boilerplate.h.in diff --git a/libcorpus2/chunk.cpp b/src/libcorpus2/chunk.cpp similarity index 100% rename from libcorpus2/chunk.cpp rename to src/libcorpus2/chunk.cpp diff --git a/libcorpus2/chunk.h b/src/libcorpus2/chunk.h similarity index 100% rename from libcorpus2/chunk.h rename to src/libcorpus2/chunk.h diff --git a/libcorpus2/config_d.in b/src/libcorpus2/config_d.in similarity index 100% rename from libcorpus2/config_d.in rename to src/libcorpus2/config_d.in diff --git a/libcorpus2/exception.cpp b/src/libcorpus2/exception.cpp similarity index 100% rename from libcorpus2/exception.cpp rename to src/libcorpus2/exception.cpp diff --git a/libcorpus2/exception.h b/src/libcorpus2/exception.h similarity index 100% rename from libcorpus2/exception.h rename to src/libcorpus2/exception.h diff --git a/libcorpus2/guesser/auto_test.cpp b/src/libcorpus2/guesser/auto_test.cpp similarity index 100% rename from libcorpus2/guesser/auto_test.cpp rename to src/libcorpus2/guesser/auto_test.cpp diff --git a/libcorpus2/guesser/backwardtrie.h b/src/libcorpus2/guesser/backwardtrie.h similarity index 100% rename from libcorpus2/guesser/backwardtrie.h rename to src/libcorpus2/guesser/backwardtrie.h diff --git a/libcorpus2/guesser/backwardtrie.tpp b/src/libcorpus2/guesser/backwardtrie.tpp similarity index 100% rename from libcorpus2/guesser/backwardtrie.tpp rename to src/libcorpus2/guesser/backwardtrie.tpp diff --git a/libcorpus2/guesser/guesser.cpp b/src/libcorpus2/guesser/guesser.cpp similarity index 100% rename from libcorpus2/guesser/guesser.cpp rename to src/libcorpus2/guesser/guesser.cpp diff --git a/libcorpus2/guesser/guesser.h b/src/libcorpus2/guesser/guesser.h similarity index 100% rename from libcorpus2/guesser/guesser.h rename to src/libcorpus2/guesser/guesser.h diff --git a/libcorpus2/guesser/test.cpp b/src/libcorpus2/guesser/test.cpp similarity index 100% rename from libcorpus2/guesser/test.cpp rename to src/libcorpus2/guesser/test.cpp diff --git a/libcorpus2/io/boostcompressor.cpp b/src/libcorpus2/io/boostcompressor.cpp similarity index 100% rename from libcorpus2/io/boostcompressor.cpp rename to src/libcorpus2/io/boostcompressor.cpp diff --git a/libcorpus2/io/boostcompressor.h b/src/libcorpus2/io/boostcompressor.h similarity index 100% rename from libcorpus2/io/boostcompressor.h rename to src/libcorpus2/io/boostcompressor.h diff --git a/libcorpus2/io/cclgzreader.cpp b/src/libcorpus2/io/cclgzreader.cpp similarity index 100% rename from libcorpus2/io/cclgzreader.cpp rename to src/libcorpus2/io/cclgzreader.cpp diff --git a/libcorpus2/io/cclgzreader.h b/src/libcorpus2/io/cclgzreader.h similarity index 100% rename from libcorpus2/io/cclgzreader.h rename to src/libcorpus2/io/cclgzreader.h diff --git a/libcorpus2/io/cclgzwriter.cpp b/src/libcorpus2/io/cclgzwriter.cpp similarity index 100% rename from libcorpus2/io/cclgzwriter.cpp rename to src/libcorpus2/io/cclgzwriter.cpp diff --git a/libcorpus2/io/cclgzwriter.h b/src/libcorpus2/io/cclgzwriter.h similarity index 100% rename from libcorpus2/io/cclgzwriter.h rename to src/libcorpus2/io/cclgzwriter.h diff --git a/libcorpus2/io/cclreader.cpp b/src/libcorpus2/io/cclreader.cpp similarity index 100% rename from libcorpus2/io/cclreader.cpp rename to src/libcorpus2/io/cclreader.cpp diff --git a/libcorpus2/io/cclreader.h b/src/libcorpus2/io/cclreader.h similarity index 100% rename from libcorpus2/io/cclreader.h rename to src/libcorpus2/io/cclreader.h diff --git a/libcorpus2/io/cclwriter.cpp b/src/libcorpus2/io/cclwriter.cpp similarity index 100% rename from libcorpus2/io/cclwriter.cpp rename to src/libcorpus2/io/cclwriter.cpp diff --git a/libcorpus2/io/cclwriter.h b/src/libcorpus2/io/cclwriter.h similarity index 100% rename from libcorpus2/io/cclwriter.h rename to src/libcorpus2/io/cclwriter.h diff --git a/libcorpus2/io/compressor.cpp b/src/libcorpus2/io/compressor.cpp similarity index 100% rename from libcorpus2/io/compressor.cpp rename to src/libcorpus2/io/compressor.cpp diff --git a/libcorpus2/io/compressor.h b/src/libcorpus2/io/compressor.h similarity index 100% rename from libcorpus2/io/compressor.h rename to src/libcorpus2/io/compressor.h diff --git a/libcorpus2/io/conllwriter.cpp b/src/libcorpus2/io/conllwriter.cpp similarity index 100% rename from libcorpus2/io/conllwriter.cpp rename to src/libcorpus2/io/conllwriter.cpp diff --git a/libcorpus2/io/conllwriter.h b/src/libcorpus2/io/conllwriter.h similarity index 100% rename from libcorpus2/io/conllwriter.h rename to src/libcorpus2/io/conllwriter.h diff --git a/libcorpus2/io/fastxces.cpp b/src/libcorpus2/io/fastxces.cpp similarity index 100% rename from libcorpus2/io/fastxces.cpp rename to src/libcorpus2/io/fastxces.cpp diff --git a/libcorpus2/io/fastxces.h b/src/libcorpus2/io/fastxces.h similarity index 100% rename from libcorpus2/io/fastxces.h rename to src/libcorpus2/io/fastxces.h diff --git a/libcorpus2/io/helpers.cpp b/src/libcorpus2/io/helpers.cpp similarity index 100% rename from libcorpus2/io/helpers.cpp rename to src/libcorpus2/io/helpers.cpp diff --git a/libcorpus2/io/helpers.h b/src/libcorpus2/io/helpers.h similarity index 100% rename from libcorpus2/io/helpers.h rename to src/libcorpus2/io/helpers.h diff --git a/libcorpus2/io/iob-chan.cpp b/src/libcorpus2/io/iob-chan.cpp similarity index 100% rename from libcorpus2/io/iob-chan.cpp rename to src/libcorpus2/io/iob-chan.cpp diff --git a/libcorpus2/io/iob-chan.h b/src/libcorpus2/io/iob-chan.h similarity index 100% rename from libcorpus2/io/iob-chan.h rename to src/libcorpus2/io/iob-chan.h diff --git a/libcorpus2/io/linewriter.cpp b/src/libcorpus2/io/linewriter.cpp similarity index 100% rename from libcorpus2/io/linewriter.cpp rename to src/libcorpus2/io/linewriter.cpp diff --git a/libcorpus2/io/linewriter.h b/src/libcorpus2/io/linewriter.h similarity index 100% rename from libcorpus2/io/linewriter.h rename to src/libcorpus2/io/linewriter.h diff --git a/libcorpus2/io/nonewriter.cpp b/src/libcorpus2/io/nonewriter.cpp similarity index 100% rename from libcorpus2/io/nonewriter.cpp rename to src/libcorpus2/io/nonewriter.cpp diff --git a/libcorpus2/io/nonewriter.h b/src/libcorpus2/io/nonewriter.h similarity index 100% rename from libcorpus2/io/nonewriter.h rename to src/libcorpus2/io/nonewriter.h diff --git a/libcorpus2/io/orthwriter.cpp b/src/libcorpus2/io/orthwriter.cpp similarity index 100% rename from libcorpus2/io/orthwriter.cpp rename to src/libcorpus2/io/orthwriter.cpp diff --git a/libcorpus2/io/orthwriter.h b/src/libcorpus2/io/orthwriter.h similarity index 100% rename from libcorpus2/io/orthwriter.h rename to src/libcorpus2/io/orthwriter.h diff --git a/libcorpus2/io/pathwriter.cpp b/src/libcorpus2/io/pathwriter.cpp similarity index 100% rename from libcorpus2/io/pathwriter.cpp rename to src/libcorpus2/io/pathwriter.cpp diff --git a/libcorpus2/io/pathwriter.h b/src/libcorpus2/io/pathwriter.h similarity index 100% rename from libcorpus2/io/pathwriter.h rename to src/libcorpus2/io/pathwriter.h diff --git a/libcorpus2/io/plainreader.cpp b/src/libcorpus2/io/plainreader.cpp similarity index 100% rename from libcorpus2/io/plainreader.cpp rename to src/libcorpus2/io/plainreader.cpp diff --git a/libcorpus2/io/plainreader.h b/src/libcorpus2/io/plainreader.h similarity index 100% rename from libcorpus2/io/plainreader.h rename to src/libcorpus2/io/plainreader.h diff --git a/libcorpus2/io/plainwriter.cpp b/src/libcorpus2/io/plainwriter.cpp similarity index 100% rename from libcorpus2/io/plainwriter.cpp rename to src/libcorpus2/io/plainwriter.cpp diff --git a/libcorpus2/io/plainwriter.h b/src/libcorpus2/io/plainwriter.h similarity index 100% rename from libcorpus2/io/plainwriter.h rename to src/libcorpus2/io/plainwriter.h diff --git a/libcorpus2/io/premorphwriter.cpp b/src/libcorpus2/io/premorphwriter.cpp similarity index 100% rename from libcorpus2/io/premorphwriter.cpp rename to src/libcorpus2/io/premorphwriter.cpp diff --git a/libcorpus2/io/premorphwriter.h b/src/libcorpus2/io/premorphwriter.h similarity index 100% rename from libcorpus2/io/premorphwriter.h rename to src/libcorpus2/io/premorphwriter.h diff --git a/libcorpus2/io/reader.cpp b/src/libcorpus2/io/reader.cpp similarity index 100% rename from libcorpus2/io/reader.cpp rename to src/libcorpus2/io/reader.cpp diff --git a/libcorpus2/io/reader.h b/src/libcorpus2/io/reader.h similarity index 100% rename from libcorpus2/io/reader.h rename to src/libcorpus2/io/reader.h diff --git a/libcorpus2/io/rft.cpp b/src/libcorpus2/io/rft.cpp similarity index 100% rename from libcorpus2/io/rft.cpp rename to src/libcorpus2/io/rft.cpp diff --git a/libcorpus2/io/rft.h b/src/libcorpus2/io/rft.h similarity index 100% rename from libcorpus2/io/rft.h rename to src/libcorpus2/io/rft.h diff --git a/libcorpus2/io/sax.cpp b/src/libcorpus2/io/sax.cpp similarity index 100% rename from libcorpus2/io/sax.cpp rename to src/libcorpus2/io/sax.cpp diff --git a/libcorpus2/io/sax.h b/src/libcorpus2/io/sax.h similarity index 100% rename from libcorpus2/io/sax.h rename to src/libcorpus2/io/sax.h diff --git a/libcorpus2/io/statwriter.cpp b/src/libcorpus2/io/statwriter.cpp similarity index 100% rename from libcorpus2/io/statwriter.cpp rename to src/libcorpus2/io/statwriter.cpp diff --git a/libcorpus2/io/statwriter.h b/src/libcorpus2/io/statwriter.h similarity index 100% rename from libcorpus2/io/statwriter.h rename to src/libcorpus2/io/statwriter.h diff --git a/libcorpus2/io/writer.cpp b/src/libcorpus2/io/writer.cpp similarity index 100% rename from libcorpus2/io/writer.cpp rename to src/libcorpus2/io/writer.cpp diff --git a/libcorpus2/io/writer.h b/src/libcorpus2/io/writer.h similarity index 100% rename from libcorpus2/io/writer.h rename to src/libcorpus2/io/writer.h diff --git a/libcorpus2/io/xces.cpp b/src/libcorpus2/io/xces.cpp similarity index 100% rename from libcorpus2/io/xces.cpp rename to src/libcorpus2/io/xces.cpp diff --git a/libcorpus2/io/xces.h b/src/libcorpus2/io/xces.h similarity index 100% rename from libcorpus2/io/xces.h rename to src/libcorpus2/io/xces.h diff --git a/libcorpus2/io/xcescommon.cpp b/src/libcorpus2/io/xcescommon.cpp similarity index 100% rename from libcorpus2/io/xcescommon.cpp rename to src/libcorpus2/io/xcescommon.cpp diff --git a/libcorpus2/io/xcescommon.h b/src/libcorpus2/io/xcescommon.h similarity index 100% rename from libcorpus2/io/xcescommon.h rename to src/libcorpus2/io/xcescommon.h diff --git a/libcorpus2/io/xcesreader.cpp b/src/libcorpus2/io/xcesreader.cpp similarity index 100% rename from libcorpus2/io/xcesreader.cpp rename to src/libcorpus2/io/xcesreader.cpp diff --git a/libcorpus2/io/xcesreader.h b/src/libcorpus2/io/xcesreader.h similarity index 100% rename from libcorpus2/io/xcesreader.h rename to src/libcorpus2/io/xcesreader.h diff --git a/libcorpus2/io/xcesvalidate.cpp b/src/libcorpus2/io/xcesvalidate.cpp similarity index 100% rename from libcorpus2/io/xcesvalidate.cpp rename to src/libcorpus2/io/xcesvalidate.cpp diff --git a/libcorpus2/io/xcesvalidate.h b/src/libcorpus2/io/xcesvalidate.h similarity index 100% rename from libcorpus2/io/xcesvalidate.h rename to src/libcorpus2/io/xcesvalidate.h diff --git a/libcorpus2/io/xceswriter.cpp b/src/libcorpus2/io/xceswriter.cpp similarity index 100% rename from libcorpus2/io/xceswriter.cpp rename to src/libcorpus2/io/xceswriter.cpp diff --git a/libcorpus2/io/xceswriter.h b/src/libcorpus2/io/xceswriter.h similarity index 100% rename from libcorpus2/io/xceswriter.h rename to src/libcorpus2/io/xceswriter.h diff --git a/libcorpus2/io/xmlreader.cpp b/src/libcorpus2/io/xmlreader.cpp similarity index 100% rename from libcorpus2/io/xmlreader.cpp rename to src/libcorpus2/io/xmlreader.cpp diff --git a/libcorpus2/io/xmlreader.h b/src/libcorpus2/io/xmlreader.h similarity index 100% rename from libcorpus2/io/xmlreader.h rename to src/libcorpus2/io/xmlreader.h diff --git a/libcorpus2/io/xmlwriter.cpp b/src/libcorpus2/io/xmlwriter.cpp similarity index 100% rename from libcorpus2/io/xmlwriter.cpp rename to src/libcorpus2/io/xmlwriter.cpp diff --git a/libcorpus2/io/xmlwriter.h b/src/libcorpus2/io/xmlwriter.h similarity index 100% rename from libcorpus2/io/xmlwriter.h rename to src/libcorpus2/io/xmlwriter.h diff --git a/libcorpus2/lexeme.cpp b/src/libcorpus2/lexeme.cpp similarity index 100% rename from libcorpus2/lexeme.cpp rename to src/libcorpus2/lexeme.cpp diff --git a/libcorpus2/lexeme.h b/src/libcorpus2/lexeme.h similarity index 100% rename from libcorpus2/lexeme.h rename to src/libcorpus2/lexeme.h diff --git a/libcorpus2/mk.sh b/src/libcorpus2/mk.sh similarity index 100% rename from libcorpus2/mk.sh rename to src/libcorpus2/mk.sh diff --git a/libcorpus2/sentence.cpp b/src/libcorpus2/sentence.cpp similarity index 100% rename from libcorpus2/sentence.cpp rename to src/libcorpus2/sentence.cpp diff --git a/libcorpus2/sentence.h b/src/libcorpus2/sentence.h similarity index 100% rename from libcorpus2/sentence.h rename to src/libcorpus2/sentence.h diff --git a/libcorpus2/tag.cpp b/src/libcorpus2/tag.cpp similarity index 100% rename from libcorpus2/tag.cpp rename to src/libcorpus2/tag.cpp diff --git a/libcorpus2/tag.h b/src/libcorpus2/tag.h similarity index 100% rename from libcorpus2/tag.h rename to src/libcorpus2/tag.h diff --git a/libcorpus2/tagging.cpp b/src/libcorpus2/tagging.cpp similarity index 100% rename from libcorpus2/tagging.cpp rename to src/libcorpus2/tagging.cpp diff --git a/libcorpus2/tagging.h b/src/libcorpus2/tagging.h similarity index 100% rename from libcorpus2/tagging.h rename to src/libcorpus2/tagging.h diff --git a/libcorpus2/tagset.cpp b/src/libcorpus2/tagset.cpp similarity index 100% rename from libcorpus2/tagset.cpp rename to src/libcorpus2/tagset.cpp diff --git a/libcorpus2/tagset.h b/src/libcorpus2/tagset.h similarity index 100% rename from libcorpus2/tagset.h rename to src/libcorpus2/tagset.h diff --git a/libcorpus2/tagsetmanager.cpp b/src/libcorpus2/tagsetmanager.cpp similarity index 100% rename from libcorpus2/tagsetmanager.cpp rename to src/libcorpus2/tagsetmanager.cpp diff --git a/libcorpus2/tagsetmanager.h b/src/libcorpus2/tagsetmanager.h similarity index 100% rename from libcorpus2/tagsetmanager.h rename to src/libcorpus2/tagsetmanager.h diff --git a/libcorpus2/tagsetparser.cpp b/src/libcorpus2/tagsetparser.cpp similarity index 100% rename from libcorpus2/tagsetparser.cpp rename to src/libcorpus2/tagsetparser.cpp diff --git a/libcorpus2/tagsetparser.h b/src/libcorpus2/tagsetparser.h similarity index 100% rename from libcorpus2/tagsetparser.h rename to src/libcorpus2/tagsetparser.h diff --git a/libcorpus2/token.cpp b/src/libcorpus2/token.cpp similarity index 100% rename from libcorpus2/token.cpp rename to src/libcorpus2/token.cpp diff --git a/libcorpus2/token.h b/src/libcorpus2/token.h similarity index 100% rename from libcorpus2/token.h rename to src/libcorpus2/token.h diff --git a/libcorpus2/tokenmetadata.cpp b/src/libcorpus2/tokenmetadata.cpp similarity index 100% rename from libcorpus2/tokenmetadata.cpp rename to src/libcorpus2/tokenmetadata.cpp diff --git a/libcorpus2/tokenmetadata.h b/src/libcorpus2/tokenmetadata.h similarity index 100% rename from libcorpus2/tokenmetadata.h rename to src/libcorpus2/tokenmetadata.h diff --git a/libcorpus2/tokensource.h b/src/libcorpus2/tokensource.h similarity index 100% rename from libcorpus2/tokensource.h rename to src/libcorpus2/tokensource.h diff --git a/libcorpus2/typedefs.h b/src/libcorpus2/typedefs.h similarity index 100% rename from libcorpus2/typedefs.h rename to src/libcorpus2/typedefs.h diff --git a/libcorpus2/util/ioformat-options.cpp b/src/libcorpus2/util/ioformat-options.cpp similarity index 100% rename from libcorpus2/util/ioformat-options.cpp rename to src/libcorpus2/util/ioformat-options.cpp diff --git a/libcorpus2/util/ioformat-options.h b/src/libcorpus2/util/ioformat-options.h similarity index 100% rename from libcorpus2/util/ioformat-options.h rename to src/libcorpus2/util/ioformat-options.h diff --git a/libcorpus2/util/settings.cpp b/src/libcorpus2/util/settings.cpp similarity index 100% rename from libcorpus2/util/settings.cpp rename to src/libcorpus2/util/settings.cpp diff --git a/libcorpus2/util/settings.h b/src/libcorpus2/util/settings.h similarity index 100% rename from libcorpus2/util/settings.h rename to src/libcorpus2/util/settings.h diff --git a/libcorpus2/util/symboldictionary.cpp b/src/libcorpus2/util/symboldictionary.cpp similarity index 100% rename from libcorpus2/util/symboldictionary.cpp rename to src/libcorpus2/util/symboldictionary.cpp diff --git a/libcorpus2/util/symboldictionary.h b/src/libcorpus2/util/symboldictionary.h similarity index 100% rename from libcorpus2/util/symboldictionary.h rename to src/libcorpus2/util/symboldictionary.h diff --git a/libcorpus2/util/tokentimer.cpp b/src/libcorpus2/util/tokentimer.cpp similarity index 100% rename from libcorpus2/util/tokentimer.cpp rename to src/libcorpus2/util/tokentimer.cpp diff --git a/libcorpus2/util/tokentimer.h b/src/libcorpus2/util/tokentimer.h similarity index 100% rename from libcorpus2/util/tokentimer.h rename to src/libcorpus2/util/tokentimer.h diff --git a/libcorpus2/version.in b/src/libcorpus2/version.in similarity index 100% rename from libcorpus2/version.in rename to src/libcorpus2/version.in diff --git a/libcorpus2_whole/CMakeLists.txt b/src/libcorpus2_whole/CMakeLists.txt similarity index 100% rename from libcorpus2_whole/CMakeLists.txt rename to src/libcorpus2_whole/CMakeLists.txt diff --git a/libcorpus2_whole/corpus.cpp b/src/libcorpus2_whole/corpus.cpp similarity index 100% rename from libcorpus2_whole/corpus.cpp rename to src/libcorpus2_whole/corpus.cpp diff --git a/libcorpus2_whole/corpus.h b/src/libcorpus2_whole/corpus.h similarity index 100% rename from libcorpus2_whole/corpus.h rename to src/libcorpus2_whole/corpus.h diff --git a/libcorpus2_whole/document.cpp b/src/libcorpus2_whole/document.cpp similarity index 100% rename from libcorpus2_whole/document.cpp rename to src/libcorpus2_whole/document.cpp diff --git a/libcorpus2_whole/document.h b/src/libcorpus2_whole/document.h similarity index 100% rename from libcorpus2_whole/document.h rename to src/libcorpus2_whole/document.h diff --git a/libcorpus2_whole/io/basereader.cpp b/src/libcorpus2_whole/io/basereader.cpp similarity index 100% rename from libcorpus2_whole/io/basereader.cpp rename to src/libcorpus2_whole/io/basereader.cpp diff --git a/libcorpus2_whole/io/basereader.h b/src/libcorpus2_whole/io/basereader.h similarity index 100% rename from libcorpus2_whole/io/basereader.h rename to src/libcorpus2_whole/io/basereader.h diff --git a/libcorpus2_whole/io/baserelreader.cpp b/src/libcorpus2_whole/io/baserelreader.cpp similarity index 100% rename from libcorpus2_whole/io/baserelreader.cpp rename to src/libcorpus2_whole/io/baserelreader.cpp diff --git a/libcorpus2_whole/io/baserelreader.h b/src/libcorpus2_whole/io/baserelreader.h similarity index 100% rename from libcorpus2_whole/io/baserelreader.h rename to src/libcorpus2_whole/io/baserelreader.h diff --git a/libcorpus2_whole/io/cclrelreader.cpp b/src/libcorpus2_whole/io/cclrelreader.cpp similarity index 100% rename from libcorpus2_whole/io/cclrelreader.cpp rename to src/libcorpus2_whole/io/cclrelreader.cpp diff --git a/libcorpus2_whole/io/cclrelreader.h b/src/libcorpus2_whole/io/cclrelreader.h similarity index 100% rename from libcorpus2_whole/io/cclrelreader.h rename to src/libcorpus2_whole/io/cclrelreader.h diff --git a/libcorpus2_whole/io/corpusreader.cpp b/src/libcorpus2_whole/io/corpusreader.cpp similarity index 100% rename from libcorpus2_whole/io/corpusreader.cpp rename to src/libcorpus2_whole/io/corpusreader.cpp diff --git a/libcorpus2_whole/io/corpusreader.h b/src/libcorpus2_whole/io/corpusreader.h similarity index 100% rename from libcorpus2_whole/io/corpusreader.h rename to src/libcorpus2_whole/io/corpusreader.h diff --git a/libcorpus2_whole/io/documentcorpusreader.cpp b/src/libcorpus2_whole/io/documentcorpusreader.cpp similarity index 100% rename from libcorpus2_whole/io/documentcorpusreader.cpp rename to src/libcorpus2_whole/io/documentcorpusreader.cpp diff --git a/libcorpus2_whole/io/documentcorpusreader.h b/src/libcorpus2_whole/io/documentcorpusreader.h similarity index 100% rename from libcorpus2_whole/io/documentcorpusreader.h rename to src/libcorpus2_whole/io/documentcorpusreader.h diff --git a/libcorpus2_whole/io/documentreader.cpp b/src/libcorpus2_whole/io/documentreader.cpp similarity index 100% rename from libcorpus2_whole/io/documentreader.cpp rename to src/libcorpus2_whole/io/documentreader.cpp diff --git a/libcorpus2_whole/io/documentreader.h b/src/libcorpus2_whole/io/documentreader.h similarity index 100% rename from libcorpus2_whole/io/documentreader.h rename to src/libcorpus2_whole/io/documentreader.h diff --git a/libcorpus2_whole/io/poliqarpcorpusreader.cpp b/src/libcorpus2_whole/io/poliqarpcorpusreader.cpp similarity index 100% rename from libcorpus2_whole/io/poliqarpcorpusreader.cpp rename to src/libcorpus2_whole/io/poliqarpcorpusreader.cpp diff --git a/libcorpus2_whole/io/poliqarpcorpusreader.h b/src/libcorpus2_whole/io/poliqarpcorpusreader.h similarity index 100% rename from libcorpus2_whole/io/poliqarpcorpusreader.h rename to src/libcorpus2_whole/io/poliqarpcorpusreader.h diff --git a/libcorpus2_whole/io/poliqarpdocumentreader.cpp b/src/libcorpus2_whole/io/poliqarpdocumentreader.cpp similarity index 100% rename from libcorpus2_whole/io/poliqarpdocumentreader.cpp rename to src/libcorpus2_whole/io/poliqarpdocumentreader.cpp diff --git a/libcorpus2_whole/io/poliqarpdocumentreader.h b/src/libcorpus2_whole/io/poliqarpdocumentreader.h similarity index 100% rename from libcorpus2_whole/io/poliqarpdocumentreader.h rename to src/libcorpus2_whole/io/poliqarpdocumentreader.h diff --git a/libcorpus2_whole/io/reader_i.h b/src/libcorpus2_whole/io/reader_i.h similarity index 100% rename from libcorpus2_whole/io/reader_i.h rename to src/libcorpus2_whole/io/reader_i.h diff --git a/libcorpus2_whole/io/relreader.cpp b/src/libcorpus2_whole/io/relreader.cpp similarity index 100% rename from libcorpus2_whole/io/relreader.cpp rename to src/libcorpus2_whole/io/relreader.cpp diff --git a/libcorpus2_whole/io/relreader.h b/src/libcorpus2_whole/io/relreader.h similarity index 100% rename from libcorpus2_whole/io/relreader.h rename to src/libcorpus2_whole/io/relreader.h diff --git a/libcorpus2_whole/io/relwriter.cpp b/src/libcorpus2_whole/io/relwriter.cpp similarity index 100% rename from libcorpus2_whole/io/relwriter.cpp rename to src/libcorpus2_whole/io/relwriter.cpp diff --git a/libcorpus2_whole/io/relwriter.h b/src/libcorpus2_whole/io/relwriter.h similarity index 100% rename from libcorpus2_whole/io/relwriter.h rename to src/libcorpus2_whole/io/relwriter.h diff --git a/libcorpus2_whole/relation.cpp b/src/libcorpus2_whole/relation.cpp similarity index 100% rename from libcorpus2_whole/relation.cpp rename to src/libcorpus2_whole/relation.cpp diff --git a/libcorpus2_whole/relation.h b/src/libcorpus2_whole/relation.h similarity index 100% rename from libcorpus2_whole/relation.h rename to src/libcorpus2_whole/relation.h diff --git a/poliqarp-library/CHANGES_CORPUS2 b/src/poliqarp-library/CHANGES_CORPUS2 similarity index 100% rename from poliqarp-library/CHANGES_CORPUS2 rename to src/poliqarp-library/CHANGES_CORPUS2 diff --git a/poliqarp-library/CMakeLists.txt b/src/poliqarp-library/CMakeLists.txt similarity index 100% rename from poliqarp-library/CMakeLists.txt rename to src/poliqarp-library/CMakeLists.txt diff --git a/poliqarp-library/CMakeScripts/AC_HEADER_STDC.cmake b/src/poliqarp-library/CMakeScripts/AC_HEADER_STDC.cmake similarity index 100% rename from poliqarp-library/CMakeScripts/AC_HEADER_STDC.cmake rename to src/poliqarp-library/CMakeScripts/AC_HEADER_STDC.cmake diff --git a/poliqarp-library/CMakeScripts/CheckPrototypeExists.cmake b/src/poliqarp-library/CMakeScripts/CheckPrototypeExists.cmake similarity index 100% rename from poliqarp-library/CMakeScripts/CheckPrototypeExists.cmake rename to src/poliqarp-library/CMakeScripts/CheckPrototypeExists.cmake diff --git a/poliqarp-library/CMakeScripts/FindParsers.cmake b/src/poliqarp-library/CMakeScripts/FindParsers.cmake similarity index 100% rename from poliqarp-library/CMakeScripts/FindParsers.cmake rename to src/poliqarp-library/CMakeScripts/FindParsers.cmake diff --git a/poliqarp-library/cmake-config.h.in b/src/poliqarp-library/cmake-config.h.in similarity index 100% rename from poliqarp-library/cmake-config.h.in rename to src/poliqarp-library/cmake-config.h.in diff --git a/poliqarp-library/commondef.h b/src/poliqarp-library/commondef.h similarity index 100% rename from poliqarp-library/commondef.h rename to src/poliqarp-library/commondef.h diff --git a/poliqarp-library/doc/COPYING.GPL b/src/poliqarp-library/doc/COPYING.GPL similarity index 100% rename from poliqarp-library/doc/COPYING.GPL rename to src/poliqarp-library/doc/COPYING.GPL diff --git a/poliqarp-library/doc/COPYING.JGoodies b/src/poliqarp-library/doc/COPYING.JGoodies similarity index 100% rename from poliqarp-library/doc/COPYING.JGoodies rename to src/poliqarp-library/doc/COPYING.JGoodies diff --git a/poliqarp-library/doc/COPYING.LIB b/src/poliqarp-library/doc/COPYING.LIB similarity index 100% rename from poliqarp-library/doc/COPYING.LIB rename to src/poliqarp-library/doc/COPYING.LIB diff --git a/poliqarp-library/doc/COPYING.Libxml2 b/src/poliqarp-library/doc/COPYING.Libxml2 similarity index 100% rename from poliqarp-library/doc/COPYING.Libxml2 rename to src/poliqarp-library/doc/COPYING.Libxml2 diff --git a/poliqarp-library/doc/COPYING.Tcl b/src/poliqarp-library/doc/COPYING.Tcl similarity index 100% rename from poliqarp-library/doc/COPYING.Tcl rename to src/poliqarp-library/doc/COPYING.Tcl diff --git a/poliqarp-library/doc/COPYING.pthreads-win32 b/src/poliqarp-library/doc/COPYING.pthreads-win32 similarity index 100% rename from poliqarp-library/doc/COPYING.pthreads-win32 rename to src/poliqarp-library/doc/COPYING.pthreads-win32 diff --git a/poliqarp-library/doc/README b/src/poliqarp-library/doc/README similarity index 100% rename from poliqarp-library/doc/README rename to src/poliqarp-library/doc/README diff --git a/poliqarp-library/foostring/foostring.c b/src/poliqarp-library/foostring/foostring.c similarity index 100% rename from poliqarp-library/foostring/foostring.c rename to src/poliqarp-library/foostring/foostring.c diff --git a/poliqarp-library/foostring/foostring.h b/src/poliqarp-library/foostring/foostring.h similarity index 100% rename from poliqarp-library/foostring/foostring.h rename to src/poliqarp-library/foostring/foostring.h diff --git a/poliqarp-library/foostring/strnlen.c b/src/poliqarp-library/foostring/strnlen.c similarity index 100% rename from poliqarp-library/foostring/strnlen.c rename to src/poliqarp-library/foostring/strnlen.c diff --git a/poliqarp-library/poliqarp-config.h.in b/src/poliqarp-library/poliqarp-config.h.in similarity index 100% rename from poliqarp-library/poliqarp-config.h.in rename to src/poliqarp-library/poliqarp-config.h.in diff --git a/poliqarp-library/poliqarpd/async.c b/src/poliqarp-library/poliqarpd/async.c similarity index 100% rename from poliqarp-library/poliqarpd/async.c rename to src/poliqarp-library/poliqarpd/async.c diff --git a/poliqarp-library/poliqarpd/async.h b/src/poliqarp-library/poliqarpd/async.h similarity index 100% rename from poliqarp-library/poliqarpd/async.h rename to src/poliqarp-library/poliqarpd/async.h diff --git a/poliqarp-library/poliqarpd/configuration.c b/src/poliqarp-library/poliqarpd/configuration.c similarity index 100% rename from poliqarp-library/poliqarpd/configuration.c rename to src/poliqarp-library/poliqarpd/configuration.c diff --git a/poliqarp-library/poliqarpd/configuration.h b/src/poliqarp-library/poliqarpd/configuration.h similarity index 100% rename from poliqarp-library/poliqarpd/configuration.h rename to src/poliqarp-library/poliqarpd/configuration.h diff --git a/poliqarp-library/poliqarpd/errors.h b/src/poliqarp-library/poliqarpd/errors.h similarity index 100% rename from poliqarp-library/poliqarpd/errors.h rename to src/poliqarp-library/poliqarpd/errors.h diff --git a/poliqarp-library/poliqarpd/getpid.h b/src/poliqarp-library/poliqarpd/getpid.h similarity index 100% rename from poliqarp-library/poliqarpd/getpid.h rename to src/poliqarp-library/poliqarpd/getpid.h diff --git a/poliqarp-library/poliqarpd/log.c b/src/poliqarp-library/poliqarpd/log.c similarity index 100% rename from poliqarp-library/poliqarpd/log.c rename to src/poliqarp-library/poliqarpd/log.c diff --git a/poliqarp-library/poliqarpd/log.h b/src/poliqarp-library/poliqarpd/log.h similarity index 100% rename from poliqarp-library/poliqarpd/log.h rename to src/poliqarp-library/poliqarpd/log.h diff --git a/poliqarp-library/poliqarpd/msgqueue.c b/src/poliqarp-library/poliqarpd/msgqueue.c similarity index 100% rename from poliqarp-library/poliqarpd/msgqueue.c rename to src/poliqarp-library/poliqarpd/msgqueue.c diff --git a/poliqarp-library/poliqarpd/msgqueue.h b/src/poliqarp-library/poliqarpd/msgqueue.h similarity index 100% rename from poliqarp-library/poliqarpd/msgqueue.h rename to src/poliqarp-library/poliqarpd/msgqueue.h diff --git a/poliqarp-library/poliqarpd/od_unix.c b/src/poliqarp-library/poliqarpd/od_unix.c similarity index 100% rename from poliqarp-library/poliqarpd/od_unix.c rename to src/poliqarp-library/poliqarpd/od_unix.c diff --git a/poliqarp-library/poliqarpd/od_win32.c b/src/poliqarp-library/poliqarpd/od_win32.c similarity index 100% rename from poliqarp-library/poliqarpd/od_win32.c rename to src/poliqarp-library/poliqarpd/od_win32.c diff --git a/poliqarp-library/poliqarpd/osdep.h b/src/poliqarp-library/poliqarpd/osdep.h similarity index 100% rename from poliqarp-library/poliqarpd/osdep.h rename to src/poliqarp-library/poliqarpd/osdep.h diff --git a/poliqarp-library/poliqarpd/poliqarpd.c b/src/poliqarp-library/poliqarpd/poliqarpd.c similarity index 100% rename from poliqarp-library/poliqarpd/poliqarpd.c rename to src/poliqarp-library/poliqarpd/poliqarpd.c diff --git a/poliqarp-library/poliqarpd/protocol.c b/src/poliqarp-library/poliqarpd/protocol.c similarity index 100% rename from poliqarp-library/poliqarpd/protocol.c rename to src/poliqarp-library/poliqarpd/protocol.c diff --git a/poliqarp-library/poliqarpd/protocol.h b/src/poliqarp-library/poliqarpd/protocol.h similarity index 100% rename from poliqarp-library/poliqarpd/protocol.h rename to src/poliqarp-library/poliqarpd/protocol.h diff --git a/poliqarp-library/poliqarpd/server.c b/src/poliqarp-library/poliqarpd/server.c similarity index 100% rename from poliqarp-library/poliqarpd/server.c rename to src/poliqarp-library/poliqarpd/server.c diff --git a/poliqarp-library/poliqarpd/server.h b/src/poliqarp-library/poliqarpd/server.h similarity index 100% rename from poliqarp-library/poliqarpd/server.h rename to src/poliqarp-library/poliqarpd/server.h diff --git a/poliqarp-library/poliqarpd/session.c b/src/poliqarp-library/poliqarpd/session.c similarity index 100% rename from poliqarp-library/poliqarpd/session.c rename to src/poliqarp-library/poliqarpd/session.c diff --git a/poliqarp-library/poliqarpd/session.h b/src/poliqarp-library/poliqarpd/session.h similarity index 100% rename from poliqarp-library/poliqarpd/session.h rename to src/poliqarp-library/poliqarpd/session.h diff --git a/poliqarp-library/poliqarpd/sessopt.c b/src/poliqarp-library/poliqarpd/sessopt.c similarity index 100% rename from poliqarp-library/poliqarpd/sessopt.c rename to src/poliqarp-library/poliqarpd/sessopt.c diff --git a/poliqarp-library/poliqarpd/sessopt.h b/src/poliqarp-library/poliqarpd/sessopt.h similarity index 100% rename from poliqarp-library/poliqarpd/sessopt.h rename to src/poliqarp-library/poliqarpd/sessopt.h diff --git a/poliqarp-library/poliqarpd/sockets.c b/src/poliqarp-library/poliqarpd/sockets.c similarity index 100% rename from poliqarp-library/poliqarpd/sockets.c rename to src/poliqarp-library/poliqarpd/sockets.c diff --git a/poliqarp-library/poliqarpd/sockets.h b/src/poliqarp-library/poliqarpd/sockets.h similarity index 100% rename from poliqarp-library/poliqarpd/sockets.h rename to src/poliqarp-library/poliqarpd/sockets.h diff --git a/poliqarp-library/poliqarpd/sockstream.c b/src/poliqarp-library/poliqarpd/sockstream.c similarity index 100% rename from poliqarp-library/poliqarpd/sockstream.c rename to src/poliqarp-library/poliqarpd/sockstream.c diff --git a/poliqarp-library/poliqarpd/sockstream.h b/src/poliqarp-library/poliqarpd/sockstream.h similarity index 100% rename from poliqarp-library/poliqarpd/sockstream.h rename to src/poliqarp-library/poliqarpd/sockstream.h diff --git a/poliqarp-library/poliqarpd/utils.c b/src/poliqarp-library/poliqarpd/utils.c similarity index 100% rename from poliqarp-library/poliqarpd/utils.c rename to src/poliqarp-library/poliqarpd/utils.c diff --git a/poliqarp-library/poliqarpd/utils.h b/src/poliqarp-library/poliqarpd/utils.h similarity index 100% rename from poliqarp-library/poliqarpd/utils.h rename to src/poliqarp-library/poliqarpd/utils.h diff --git a/poliqarp-library/progress/progress.c b/src/poliqarp-library/progress/progress.c similarity index 100% rename from poliqarp-library/progress/progress.c rename to src/poliqarp-library/progress/progress.c diff --git a/poliqarp-library/progress/progress.h b/src/poliqarp-library/progress/progress.h similarity index 100% rename from poliqarp-library/progress/progress.h rename to src/poliqarp-library/progress/progress.h diff --git a/poliqarp-library/sakura/abi.h b/src/poliqarp-library/sakura/abi.h similarity index 100% rename from poliqarp-library/sakura/abi.h rename to src/poliqarp-library/sakura/abi.h diff --git a/poliqarp-library/sakura/backend-base.c b/src/poliqarp-library/sakura/backend-base.c similarity index 100% rename from poliqarp-library/sakura/backend-base.c rename to src/poliqarp-library/sakura/backend-base.c diff --git a/poliqarp-library/sakura/backend-base.h b/src/poliqarp-library/sakura/backend-base.h similarity index 100% rename from poliqarp-library/sakura/backend-base.h rename to src/poliqarp-library/sakura/backend-base.h diff --git a/poliqarp-library/sakura/backend-config.c b/src/poliqarp-library/sakura/backend-config.c similarity index 100% rename from poliqarp-library/sakura/backend-config.c rename to src/poliqarp-library/sakura/backend-config.c diff --git a/poliqarp-library/sakura/backend-config.h b/src/poliqarp-library/sakura/backend-config.h similarity index 100% rename from poliqarp-library/sakura/backend-config.h rename to src/poliqarp-library/sakura/backend-config.h diff --git a/poliqarp-library/sakura/backend-corpus.c b/src/poliqarp-library/sakura/backend-corpus.c similarity index 100% rename from poliqarp-library/sakura/backend-corpus.c rename to src/poliqarp-library/sakura/backend-corpus.c diff --git a/poliqarp-library/sakura/backend-corpus.h b/src/poliqarp-library/sakura/backend-corpus.h similarity index 100% rename from poliqarp-library/sakura/backend-corpus.h rename to src/poliqarp-library/sakura/backend-corpus.h diff --git a/poliqarp-library/sakura/backend-document.c b/src/poliqarp-library/sakura/backend-document.c similarity index 100% rename from poliqarp-library/sakura/backend-document.c rename to src/poliqarp-library/sakura/backend-document.c diff --git a/poliqarp-library/sakura/backend-document.h b/src/poliqarp-library/sakura/backend-document.h similarity index 100% rename from poliqarp-library/sakura/backend-document.h rename to src/poliqarp-library/sakura/backend-document.h diff --git a/poliqarp-library/sakura/backend-index.c b/src/poliqarp-library/sakura/backend-index.c similarity index 100% rename from poliqarp-library/sakura/backend-index.c rename to src/poliqarp-library/sakura/backend-index.c diff --git a/poliqarp-library/sakura/backend-index.h b/src/poliqarp-library/sakura/backend-index.h similarity index 100% rename from poliqarp-library/sakura/backend-index.h rename to src/poliqarp-library/sakura/backend-index.h diff --git a/poliqarp-library/sakura/backend-interp.c b/src/poliqarp-library/sakura/backend-interp.c similarity index 100% rename from poliqarp-library/sakura/backend-interp.c rename to src/poliqarp-library/sakura/backend-interp.c diff --git a/poliqarp-library/sakura/backend-interp.h b/src/poliqarp-library/sakura/backend-interp.h similarity index 100% rename from poliqarp-library/sakura/backend-interp.h rename to src/poliqarp-library/sakura/backend-interp.h diff --git a/poliqarp-library/sakura/backend-meta.c b/src/poliqarp-library/sakura/backend-meta.c similarity index 100% rename from poliqarp-library/sakura/backend-meta.c rename to src/poliqarp-library/sakura/backend-meta.c diff --git a/poliqarp-library/sakura/backend-meta.h b/src/poliqarp-library/sakura/backend-meta.h similarity index 100% rename from poliqarp-library/sakura/backend-meta.h rename to src/poliqarp-library/sakura/backend-meta.h diff --git a/poliqarp-library/sakura/backend-orth.c b/src/poliqarp-library/sakura/backend-orth.c similarity index 100% rename from poliqarp-library/sakura/backend-orth.c rename to src/poliqarp-library/sakura/backend-orth.c diff --git a/poliqarp-library/sakura/backend-orth.h b/src/poliqarp-library/sakura/backend-orth.h similarity index 100% rename from poliqarp-library/sakura/backend-orth.h rename to src/poliqarp-library/sakura/backend-orth.h diff --git a/poliqarp-library/sakura/backend-subdocument.c b/src/poliqarp-library/sakura/backend-subdocument.c similarity index 100% rename from poliqarp-library/sakura/backend-subdocument.c rename to src/poliqarp-library/sakura/backend-subdocument.c diff --git a/poliqarp-library/sakura/backend-subdocument.h b/src/poliqarp-library/sakura/backend-subdocument.h similarity index 100% rename from poliqarp-library/sakura/backend-subdocument.h rename to src/poliqarp-library/sakura/backend-subdocument.h diff --git a/poliqarp-library/sakura/backend-syntax.c b/src/poliqarp-library/sakura/backend-syntax.c similarity index 100% rename from poliqarp-library/sakura/backend-syntax.c rename to src/poliqarp-library/sakura/backend-syntax.c diff --git a/poliqarp-library/sakura/backend-syntax.h b/src/poliqarp-library/sakura/backend-syntax.h similarity index 100% rename from poliqarp-library/sakura/backend-syntax.h rename to src/poliqarp-library/sakura/backend-syntax.h diff --git a/poliqarp-library/sakura/backend-tag.c b/src/poliqarp-library/sakura/backend-tag.c similarity index 100% rename from poliqarp-library/sakura/backend-tag.c rename to src/poliqarp-library/sakura/backend-tag.c diff --git a/poliqarp-library/sakura/backend-tag.h b/src/poliqarp-library/sakura/backend-tag.h similarity index 100% rename from poliqarp-library/sakura/backend-tag.h rename to src/poliqarp-library/sakura/backend-tag.h diff --git a/poliqarp-library/sakura/cdf.c b/src/poliqarp-library/sakura/cdf.c similarity index 100% rename from poliqarp-library/sakura/cdf.c rename to src/poliqarp-library/sakura/cdf.c diff --git a/poliqarp-library/sakura/cdf.h b/src/poliqarp-library/sakura/cdf.h similarity index 100% rename from poliqarp-library/sakura/cdf.h rename to src/poliqarp-library/sakura/cdf.h diff --git a/poliqarp-library/sakura/common/args.c b/src/poliqarp-library/sakura/common/args.c similarity index 100% rename from poliqarp-library/sakura/common/args.c rename to src/poliqarp-library/sakura/common/args.c diff --git a/poliqarp-library/sakura/common/args.h b/src/poliqarp-library/sakura/common/args.h similarity index 100% rename from poliqarp-library/sakura/common/args.h rename to src/poliqarp-library/sakura/common/args.h diff --git a/poliqarp-library/sakura/common/bit-routines.h b/src/poliqarp-library/sakura/common/bit-routines.h similarity index 100% rename from poliqarp-library/sakura/common/bit-routines.h rename to src/poliqarp-library/sakura/common/bit-routines.h diff --git a/poliqarp-library/sakura/common/bitstream.c b/src/poliqarp-library/sakura/common/bitstream.c similarity index 100% rename from poliqarp-library/sakura/common/bitstream.c rename to src/poliqarp-library/sakura/common/bitstream.c diff --git a/poliqarp-library/sakura/common/bitstream.h b/src/poliqarp-library/sakura/common/bitstream.h similarity index 100% rename from poliqarp-library/sakura/common/bitstream.h rename to src/poliqarp-library/sakura/common/bitstream.h diff --git a/poliqarp-library/sakura/common/bs-file-backend.c b/src/poliqarp-library/sakura/common/bs-file-backend.c similarity index 100% rename from poliqarp-library/sakura/common/bs-file-backend.c rename to src/poliqarp-library/sakura/common/bs-file-backend.c diff --git a/poliqarp-library/sakura/common/bs-file-backend.h b/src/poliqarp-library/sakura/common/bs-file-backend.h similarity index 100% rename from poliqarp-library/sakura/common/bs-file-backend.h rename to src/poliqarp-library/sakura/common/bs-file-backend.h diff --git a/poliqarp-library/sakura/common/bs.c b/src/poliqarp-library/sakura/common/bs.c similarity index 100% rename from poliqarp-library/sakura/common/bs.c rename to src/poliqarp-library/sakura/common/bs.c diff --git a/poliqarp-library/sakura/common/bs.h b/src/poliqarp-library/sakura/common/bs.h similarity index 100% rename from poliqarp-library/sakura/common/bs.h rename to src/poliqarp-library/sakura/common/bs.h diff --git a/poliqarp-library/sakura/common/entity.c b/src/poliqarp-library/sakura/common/entity.c similarity index 100% rename from poliqarp-library/sakura/common/entity.c rename to src/poliqarp-library/sakura/common/entity.c diff --git a/poliqarp-library/sakura/common/entity.h b/src/poliqarp-library/sakura/common/entity.h similarity index 100% rename from poliqarp-library/sakura/common/entity.h rename to src/poliqarp-library/sakura/common/entity.h diff --git a/poliqarp-library/sakura/common/file-map.c b/src/poliqarp-library/sakura/common/file-map.c similarity index 100% rename from poliqarp-library/sakura/common/file-map.c rename to src/poliqarp-library/sakura/common/file-map.c diff --git a/poliqarp-library/sakura/common/file-map.h b/src/poliqarp-library/sakura/common/file-map.h similarity index 100% rename from poliqarp-library/sakura/common/file-map.h rename to src/poliqarp-library/sakura/common/file-map.h diff --git a/poliqarp-library/sakura/common/file-reader.c b/src/poliqarp-library/sakura/common/file-reader.c similarity index 100% rename from poliqarp-library/sakura/common/file-reader.c rename to src/poliqarp-library/sakura/common/file-reader.c diff --git a/poliqarp-library/sakura/common/file-reader.h b/src/poliqarp-library/sakura/common/file-reader.h similarity index 100% rename from poliqarp-library/sakura/common/file-reader.h rename to src/poliqarp-library/sakura/common/file-reader.h diff --git a/poliqarp-library/sakura/common/getline.c b/src/poliqarp-library/sakura/common/getline.c similarity index 100% rename from poliqarp-library/sakura/common/getline.c rename to src/poliqarp-library/sakura/common/getline.c diff --git a/poliqarp-library/sakura/common/getline.h b/src/poliqarp-library/sakura/common/getline.h similarity index 100% rename from poliqarp-library/sakura/common/getline.h rename to src/poliqarp-library/sakura/common/getline.h diff --git a/poliqarp-library/sakura/common/graph.c b/src/poliqarp-library/sakura/common/graph.c similarity index 100% rename from poliqarp-library/sakura/common/graph.c rename to src/poliqarp-library/sakura/common/graph.c diff --git a/poliqarp-library/sakura/common/graph.h b/src/poliqarp-library/sakura/common/graph.h similarity index 100% rename from poliqarp-library/sakura/common/graph.h rename to src/poliqarp-library/sakura/common/graph.h diff --git a/poliqarp-library/sakura/common/hash-table.c b/src/poliqarp-library/sakura/common/hash-table.c similarity index 100% rename from poliqarp-library/sakura/common/hash-table.c rename to src/poliqarp-library/sakura/common/hash-table.c diff --git a/poliqarp-library/sakura/common/hash-table.h b/src/poliqarp-library/sakura/common/hash-table.h similarity index 100% rename from poliqarp-library/sakura/common/hash-table.h rename to src/poliqarp-library/sakura/common/hash-table.h diff --git a/poliqarp-library/sakura/common/memory-arena.c b/src/poliqarp-library/sakura/common/memory-arena.c similarity index 100% rename from poliqarp-library/sakura/common/memory-arena.c rename to src/poliqarp-library/sakura/common/memory-arena.c diff --git a/poliqarp-library/sakura/common/memory-arena.h b/src/poliqarp-library/sakura/common/memory-arena.h similarity index 100% rename from poliqarp-library/sakura/common/memory-arena.h rename to src/poliqarp-library/sakura/common/memory-arena.h diff --git a/poliqarp-library/sakura/common/newdict.c b/src/poliqarp-library/sakura/common/newdict.c similarity index 100% rename from poliqarp-library/sakura/common/newdict.c rename to src/poliqarp-library/sakura/common/newdict.c diff --git a/poliqarp-library/sakura/common/newdict.h b/src/poliqarp-library/sakura/common/newdict.h similarity index 100% rename from poliqarp-library/sakura/common/newdict.h rename to src/poliqarp-library/sakura/common/newdict.h diff --git a/poliqarp-library/sakura/common/set.c b/src/poliqarp-library/sakura/common/set.c similarity index 100% rename from poliqarp-library/sakura/common/set.c rename to src/poliqarp-library/sakura/common/set.c diff --git a/poliqarp-library/sakura/common/set.h b/src/poliqarp-library/sakura/common/set.h similarity index 100% rename from poliqarp-library/sakura/common/set.h rename to src/poliqarp-library/sakura/common/set.h diff --git a/poliqarp-library/sakura/common/string-hash.h b/src/poliqarp-library/sakura/common/string-hash.h similarity index 100% rename from poliqarp-library/sakura/common/string-hash.h rename to src/poliqarp-library/sakura/common/string-hash.h diff --git a/poliqarp-library/sakura/common/system-error.c b/src/poliqarp-library/sakura/common/system-error.c similarity index 100% rename from poliqarp-library/sakura/common/system-error.c rename to src/poliqarp-library/sakura/common/system-error.c diff --git a/poliqarp-library/sakura/common/system-error.h b/src/poliqarp-library/sakura/common/system-error.h similarity index 100% rename from poliqarp-library/sakura/common/system-error.h rename to src/poliqarp-library/sakura/common/system-error.h diff --git a/poliqarp-library/sakura/common/tinydb.c b/src/poliqarp-library/sakura/common/tinydb.c similarity index 100% rename from poliqarp-library/sakura/common/tinydb.c rename to src/poliqarp-library/sakura/common/tinydb.c diff --git a/poliqarp-library/sakura/common/tinydb.h b/src/poliqarp-library/sakura/common/tinydb.h similarity index 100% rename from poliqarp-library/sakura/common/tinydb.h rename to src/poliqarp-library/sakura/common/tinydb.h diff --git a/poliqarp-library/sakura/config.c b/src/poliqarp-library/sakura/config.c similarity index 100% rename from poliqarp-library/sakura/config.c rename to src/poliqarp-library/sakura/config.c diff --git a/poliqarp-library/sakura/config.h b/src/poliqarp-library/sakura/config.h similarity index 100% rename from poliqarp-library/sakura/config.h rename to src/poliqarp-library/sakura/config.h diff --git a/poliqarp-library/sakura/corpus.c b/src/poliqarp-library/sakura/corpus.c similarity index 100% rename from poliqarp-library/sakura/corpus.c rename to src/poliqarp-library/sakura/corpus.c diff --git a/poliqarp-library/sakura/corpus.h b/src/poliqarp-library/sakura/corpus.h similarity index 100% rename from poliqarp-library/sakura/corpus.h rename to src/poliqarp-library/sakura/corpus.h diff --git a/poliqarp-library/sakura/date-span.h b/src/poliqarp-library/sakura/date-span.h similarity index 100% rename from poliqarp-library/sakura/date-span.h rename to src/poliqarp-library/sakura/date-span.h diff --git a/poliqarp-library/sakura/dict.c b/src/poliqarp-library/sakura/dict.c similarity index 100% rename from poliqarp-library/sakura/dict.c rename to src/poliqarp-library/sakura/dict.c diff --git a/poliqarp-library/sakura/dict.h b/src/poliqarp-library/sakura/dict.h similarity index 100% rename from poliqarp-library/sakura/dict.h rename to src/poliqarp-library/sakura/dict.h diff --git a/poliqarp-library/sakura/exception.c b/src/poliqarp-library/sakura/exception.c similarity index 100% rename from poliqarp-library/sakura/exception.c rename to src/poliqarp-library/sakura/exception.c diff --git a/poliqarp-library/sakura/exception.h b/src/poliqarp-library/sakura/exception.h similarity index 100% rename from poliqarp-library/sakura/exception.h rename to src/poliqarp-library/sakura/exception.h diff --git a/poliqarp-library/sakura/expression.c b/src/poliqarp-library/sakura/expression.c similarity index 100% rename from poliqarp-library/sakura/expression.c rename to src/poliqarp-library/sakura/expression.c diff --git a/poliqarp-library/sakura/expression.h b/src/poliqarp-library/sakura/expression.h similarity index 100% rename from poliqarp-library/sakura/expression.h rename to src/poliqarp-library/sakura/expression.h diff --git a/poliqarp-library/sakura/lexer.h b/src/poliqarp-library/sakura/lexer.h similarity index 100% rename from poliqarp-library/sakura/lexer.h rename to src/poliqarp-library/sakura/lexer.h diff --git a/poliqarp-library/sakura/lexer.y b/src/poliqarp-library/sakura/lexer.y similarity index 100% rename from poliqarp-library/sakura/lexer.y rename to src/poliqarp-library/sakura/lexer.y diff --git a/poliqarp-library/sakura/meta-value.c b/src/poliqarp-library/sakura/meta-value.c similarity index 100% rename from poliqarp-library/sakura/meta-value.c rename to src/poliqarp-library/sakura/meta-value.c diff --git a/poliqarp-library/sakura/meta-value.h b/src/poliqarp-library/sakura/meta-value.h similarity index 100% rename from poliqarp-library/sakura/meta-value.h rename to src/poliqarp-library/sakura/meta-value.h diff --git a/poliqarp-library/sakura/parser.y b/src/poliqarp-library/sakura/parser.y similarity index 100% rename from poliqarp-library/sakura/parser.y rename to src/poliqarp-library/sakura/parser.y diff --git a/poliqarp-library/sakura/poliqarp-private.h b/src/poliqarp-library/sakura/poliqarp-private.h similarity index 100% rename from poliqarp-library/sakura/poliqarp-private.h rename to src/poliqarp-library/sakura/poliqarp-private.h diff --git a/poliqarp-library/sakura/poliqarp.c b/src/poliqarp-library/sakura/poliqarp.c similarity index 100% rename from poliqarp-library/sakura/poliqarp.c rename to src/poliqarp-library/sakura/poliqarp.c diff --git a/poliqarp-library/sakura/poliqarp.h b/src/poliqarp-library/sakura/poliqarp.h similarity index 100% rename from poliqarp-library/sakura/poliqarp.h rename to src/poliqarp-library/sakura/poliqarp.h diff --git a/poliqarp-library/sakura/query-rewrite.c b/src/poliqarp-library/sakura/query-rewrite.c similarity index 100% rename from poliqarp-library/sakura/query-rewrite.c rename to src/poliqarp-library/sakura/query-rewrite.c diff --git a/poliqarp-library/sakura/query-rewrite.h b/src/poliqarp-library/sakura/query-rewrite.h similarity index 100% rename from poliqarp-library/sakura/query-rewrite.h rename to src/poliqarp-library/sakura/query-rewrite.h diff --git a/poliqarp-library/sakura/query.c b/src/poliqarp-library/sakura/query.c similarity index 100% rename from poliqarp-library/sakura/query.c rename to src/poliqarp-library/sakura/query.c diff --git a/poliqarp-library/sakura/query.h b/src/poliqarp-library/sakura/query.h similarity index 100% rename from poliqarp-library/sakura/query.h rename to src/poliqarp-library/sakura/query.h diff --git a/poliqarp-library/sakura/random.c b/src/poliqarp-library/sakura/random.c similarity index 100% rename from poliqarp-library/sakura/random.c rename to src/poliqarp-library/sakura/random.c diff --git a/poliqarp-library/sakura/random.h b/src/poliqarp-library/sakura/random.h similarity index 100% rename from poliqarp-library/sakura/random.h rename to src/poliqarp-library/sakura/random.h diff --git a/poliqarp-library/sakura/regexp.c b/src/poliqarp-library/sakura/regexp.c similarity index 100% rename from poliqarp-library/sakura/regexp.c rename to src/poliqarp-library/sakura/regexp.c diff --git a/poliqarp-library/sakura/regexp.h b/src/poliqarp-library/sakura/regexp.h similarity index 100% rename from poliqarp-library/sakura/regexp.h rename to src/poliqarp-library/sakura/regexp.h diff --git a/poliqarp-library/sakura/value-attr.c b/src/poliqarp-library/sakura/value-attr.c similarity index 100% rename from poliqarp-library/sakura/value-attr.c rename to src/poliqarp-library/sakura/value-attr.c diff --git a/poliqarp-library/sakura/value-attr.h b/src/poliqarp-library/sakura/value-attr.h similarity index 100% rename from poliqarp-library/sakura/value-attr.h rename to src/poliqarp-library/sakura/value-attr.h diff --git a/poliqarp-library/sakura/value-base.c b/src/poliqarp-library/sakura/value-base.c similarity index 100% rename from poliqarp-library/sakura/value-base.c rename to src/poliqarp-library/sakura/value-base.c diff --git a/poliqarp-library/sakura/value-base.h b/src/poliqarp-library/sakura/value-base.h similarity index 100% rename from poliqarp-library/sakura/value-base.h rename to src/poliqarp-library/sakura/value-base.h diff --git a/poliqarp-library/sakura/value-interp.c b/src/poliqarp-library/sakura/value-interp.c similarity index 100% rename from poliqarp-library/sakura/value-interp.c rename to src/poliqarp-library/sakura/value-interp.c diff --git a/poliqarp-library/sakura/value-interp.h b/src/poliqarp-library/sakura/value-interp.h similarity index 100% rename from poliqarp-library/sakura/value-interp.h rename to src/poliqarp-library/sakura/value-interp.h diff --git a/poliqarp-library/sakura/value-orth.c b/src/poliqarp-library/sakura/value-orth.c similarity index 100% rename from poliqarp-library/sakura/value-orth.c rename to src/poliqarp-library/sakura/value-orth.c diff --git a/poliqarp-library/sakura/value-orth.h b/src/poliqarp-library/sakura/value-orth.h similarity index 100% rename from poliqarp-library/sakura/value-orth.h rename to src/poliqarp-library/sakura/value-orth.h diff --git a/poliqarp-library/sakura/value-pattern.c b/src/poliqarp-library/sakura/value-pattern.c similarity index 100% rename from poliqarp-library/sakura/value-pattern.c rename to src/poliqarp-library/sakura/value-pattern.c diff --git a/poliqarp-library/sakura/value-pattern.h b/src/poliqarp-library/sakura/value-pattern.h similarity index 100% rename from poliqarp-library/sakura/value-pattern.h rename to src/poliqarp-library/sakura/value-pattern.h diff --git a/poliqarp-library/sakura/value-pos.c b/src/poliqarp-library/sakura/value-pos.c similarity index 100% rename from poliqarp-library/sakura/value-pos.c rename to src/poliqarp-library/sakura/value-pos.c diff --git a/poliqarp-library/sakura/value-pos.h b/src/poliqarp-library/sakura/value-pos.h similarity index 100% rename from poliqarp-library/sakura/value-pos.h rename to src/poliqarp-library/sakura/value-pos.h diff --git a/poliqarp-library/sakura/value-space.c b/src/poliqarp-library/sakura/value-space.c similarity index 100% rename from poliqarp-library/sakura/value-space.c rename to src/poliqarp-library/sakura/value-space.c diff --git a/poliqarp-library/sakura/value-space.h b/src/poliqarp-library/sakura/value-space.h similarity index 100% rename from poliqarp-library/sakura/value-space.h rename to src/poliqarp-library/sakura/value-space.h diff --git a/poliqarp-library/sakura/value-tag.c b/src/poliqarp-library/sakura/value-tag.c similarity index 100% rename from poliqarp-library/sakura/value-tag.c rename to src/poliqarp-library/sakura/value-tag.c diff --git a/poliqarp-library/sakura/value-tag.h b/src/poliqarp-library/sakura/value-tag.h similarity index 100% rename from poliqarp-library/sakura/value-tag.h rename to src/poliqarp-library/sakura/value-tag.h diff --git a/poliqarp-library/sakura/value-type.c b/src/poliqarp-library/sakura/value-type.c similarity index 100% rename from poliqarp-library/sakura/value-type.c rename to src/poliqarp-library/sakura/value-type.c diff --git a/poliqarp-library/sakura/value-type.h b/src/poliqarp-library/sakura/value-type.h similarity index 100% rename from poliqarp-library/sakura/value-type.h rename to src/poliqarp-library/sakura/value-type.h diff --git a/poliqarp-library/sakura/value.c b/src/poliqarp-library/sakura/value.c similarity index 100% rename from poliqarp-library/sakura/value.c rename to src/poliqarp-library/sakura/value.c diff --git a/poliqarp-library/sakura/value.h b/src/poliqarp-library/sakura/value.h similarity index 100% rename from poliqarp-library/sakura/value.h rename to src/poliqarp-library/sakura/value.h diff --git a/poliqarp-library/unibits/strcoll.c b/src/poliqarp-library/unibits/strcoll.c similarity index 100% rename from poliqarp-library/unibits/strcoll.c rename to src/poliqarp-library/unibits/strcoll.c diff --git a/poliqarp-library/unibits/strcoll.h b/src/poliqarp-library/unibits/strcoll.h similarity index 100% rename from poliqarp-library/unibits/strcoll.h rename to src/poliqarp-library/unibits/strcoll.h diff --git a/poliqarp-library/unibits/tclUniData.h b/src/poliqarp-library/unibits/tclUniData.h similarity index 100% rename from poliqarp-library/unibits/tclUniData.h rename to src/poliqarp-library/unibits/tclUniData.h diff --git a/poliqarp-library/unibits/tclUtf.c b/src/poliqarp-library/unibits/tclUtf.c similarity index 100% rename from poliqarp-library/unibits/tclUtf.c rename to src/poliqarp-library/unibits/tclUtf.c diff --git a/poliqarp-library/unibits/tclUtils.c b/src/poliqarp-library/unibits/tclUtils.c similarity index 100% rename from poliqarp-library/unibits/tclUtils.c rename to src/poliqarp-library/unibits/tclUtils.c diff --git a/poliqarp-library/unibits/unibits-extra.h b/src/poliqarp-library/unibits/unibits-extra.h similarity index 100% rename from poliqarp-library/unibits/unibits-extra.h rename to src/poliqarp-library/unibits/unibits-extra.h diff --git a/poliqarp-library/unibits/unibits.h b/src/poliqarp-library/unibits/unibits.h similarity index 100% rename from poliqarp-library/unibits/unibits.h rename to src/poliqarp-library/unibits/unibits.h diff --git a/poliqarp-library/utils/poliqarpc.c b/src/poliqarp-library/utils/poliqarpc.c similarity index 100% rename from poliqarp-library/utils/poliqarpc.c rename to src/poliqarp-library/utils/poliqarpc.c diff --git a/poliqarp/CMakeLists.txt b/src/poliqarp/CMakeLists.txt similarity index 100% rename from poliqarp/CMakeLists.txt rename to src/poliqarp/CMakeLists.txt diff --git a/poliqarp/c2pqtest.cpp b/src/poliqarp/c2pqtest.cpp similarity index 100% rename from poliqarp/c2pqtest.cpp rename to src/poliqarp/c2pqtest.cpp diff --git a/poliqarp/pqclient.cpp b/src/poliqarp/pqclient.cpp similarity index 100% rename from poliqarp/pqclient.cpp rename to src/poliqarp/pqclient.cpp diff --git a/poliqarp/pqclient.h b/src/poliqarp/pqclient.h similarity index 100% rename from poliqarp/pqclient.h rename to src/poliqarp/pqclient.h diff --git a/poliqarp/pqreader.cpp b/src/poliqarp/pqreader.cpp similarity index 100% rename from poliqarp/pqreader.cpp rename to src/poliqarp/pqreader.cpp diff --git a/poliqarp/pqreader.h b/src/poliqarp/pqreader.h similarity index 100% rename from poliqarp/pqreader.h rename to src/poliqarp/pqreader.h diff --git a/swig/CMakeLists.txt b/src/swig/CMakeLists.txt similarity index 95% rename from swig/CMakeLists.txt rename to src/swig/CMakeLists.txt index 4bd146111606db89024589f608b47af0302aebe2..7441191af6b332a36d6076c27872a328f796e6c8 100644 --- a/swig/CMakeLists.txt +++ b/src/swig/CMakeLists.txt @@ -30,15 +30,16 @@ include_directories(${Boost_INCLUDE_DIRS}) link_directories(${Boost_LIBRARY_DIRS}) -find_package(PythonLibs 2) +find_package(PythonLibs) find_package(PythonInterp) # idea taken from pyplot build system execute_process( COMMAND - ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_EXEC_PREFIX}')" + ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print(sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_EXEC_PREFIX}'))" OUTPUT_VARIABLE PYTHON_INSTDIR OUTPUT_STRIP_TRAILING_WHITESPACE ) +#set(PYTHON_INSTDIR "lib/python3.6/dist-packages") message(STATUS "INFO: " "python lib: ${PYTHON_INSTDIR}" ) INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) diff --git a/swig/add_autodoc.sh b/src/swig/add_autodoc.sh similarity index 100% rename from swig/add_autodoc.sh rename to src/swig/add_autodoc.sh diff --git a/swig/annotatedsentence.i b/src/swig/annotatedsentence.i similarity index 100% rename from swig/annotatedsentence.i rename to src/swig/annotatedsentence.i diff --git a/swig/annotationchannel.i b/src/swig/annotationchannel.i similarity index 100% rename from swig/annotationchannel.i rename to src/swig/annotationchannel.i diff --git a/swig/annotationview.i b/src/swig/annotationview.i similarity index 100% rename from swig/annotationview.i rename to src/swig/annotationview.i diff --git a/swig/boost_shared_ptr.i b/src/swig/boost_shared_ptr.i similarity index 100% rename from swig/boost_shared_ptr.i rename to src/swig/boost_shared_ptr.i diff --git a/swig/cclrelreader.i b/src/swig/cclrelreader.i similarity index 100% rename from swig/cclrelreader.i rename to src/swig/cclrelreader.i diff --git a/swig/chunk.i b/src/swig/chunk.i similarity index 100% rename from swig/chunk.i rename to src/swig/chunk.i diff --git a/swig/corpus.i b/src/swig/corpus.i similarity index 100% rename from swig/corpus.i rename to src/swig/corpus.i diff --git a/swig/corpus2.i b/src/swig/corpus2.i similarity index 100% rename from swig/corpus2.i rename to src/swig/corpus2.i diff --git a/swig/corpus2exception.i b/src/swig/corpus2exception.i similarity index 100% rename from swig/corpus2exception.i rename to src/swig/corpus2exception.i diff --git a/swig/corpusreader.i b/src/swig/corpusreader.i similarity index 100% rename from swig/corpusreader.i rename to src/swig/corpusreader.i diff --git a/swig/document.i b/src/swig/document.i similarity index 100% rename from swig/document.i rename to src/swig/document.i diff --git a/swig/documentreader.i b/src/swig/documentreader.i similarity index 100% rename from swig/documentreader.i rename to src/swig/documentreader.i diff --git a/swig/iob.i b/src/swig/iob.i similarity index 100% rename from swig/iob.i rename to src/swig/iob.i diff --git a/swig/lexeme.i b/src/swig/lexeme.i similarity index 100% rename from swig/lexeme.i rename to src/swig/lexeme.i diff --git a/swig/libpwrnlperror.i b/src/swig/libpwrnlperror.i similarity index 100% rename from swig/libpwrnlperror.i rename to src/swig/libpwrnlperror.i diff --git a/swig/libpwrnlpwhitespace.i b/src/swig/libpwrnlpwhitespace.i similarity index 100% rename from swig/libpwrnlpwhitespace.i rename to src/swig/libpwrnlpwhitespace.i diff --git a/swig/makewrapper.sh b/src/swig/makewrapper.sh similarity index 100% rename from swig/makewrapper.sh rename to src/swig/makewrapper.sh diff --git a/swig/relation.i b/src/swig/relation.i similarity index 100% rename from swig/relation.i rename to src/swig/relation.i diff --git a/swig/relationreader.i b/src/swig/relationreader.i similarity index 100% rename from swig/relationreader.i rename to src/swig/relationreader.i diff --git a/swig/relationwriter.i b/src/swig/relationwriter.i similarity index 100% rename from swig/relationwriter.i rename to src/swig/relationwriter.i diff --git a/swig/sentence.i b/src/swig/sentence.i similarity index 100% rename from swig/sentence.i rename to src/swig/sentence.i diff --git a/swig/std_defs.i b/src/swig/std_defs.i similarity index 100% rename from swig/std_defs.i rename to src/swig/std_defs.i diff --git a/swig/swig_template_corpus2.template b/src/swig/swig_template_corpus2.template similarity index 100% rename from swig/swig_template_corpus2.template rename to src/swig/swig_template_corpus2.template diff --git a/swig/tag.i b/src/swig/tag.i similarity index 100% rename from swig/tag.i rename to src/swig/tag.i diff --git a/swig/tagging.i b/src/swig/tagging.i similarity index 100% rename from swig/tagging.i rename to src/swig/tagging.i diff --git a/swig/tagset.i b/src/swig/tagset.i similarity index 100% rename from swig/tagset.i rename to src/swig/tagset.i diff --git a/swig/tagsetmanager.i b/src/swig/tagsetmanager.i similarity index 100% rename from swig/tagsetmanager.i rename to src/swig/tagsetmanager.i diff --git a/swig/token.i b/src/swig/token.i similarity index 100% rename from swig/token.i rename to src/swig/token.i diff --git a/swig/tokenmetadata.i b/src/swig/tokenmetadata.i similarity index 100% rename from swig/tokenmetadata.i rename to src/swig/tokenmetadata.i diff --git a/swig/tokenreader.i b/src/swig/tokenreader.i similarity index 100% rename from swig/tokenreader.i rename to src/swig/tokenreader.i diff --git a/swig/tokenwriter.i b/src/swig/tokenwriter.i similarity index 100% rename from swig/tokenwriter.i rename to src/swig/tokenwriter.i diff --git a/swig/unicodestring.i b/src/swig/unicodestring.i similarity index 100% rename from swig/unicodestring.i rename to src/swig/unicodestring.i diff --git a/tests/CMakeLists.txt b/src/tests/CMakeLists.txt similarity index 100% rename from tests/CMakeLists.txt rename to src/tests/CMakeLists.txt diff --git a/tests/ann_basic.cpp b/src/tests/ann_basic.cpp similarity index 100% rename from tests/ann_basic.cpp rename to src/tests/ann_basic.cpp diff --git a/tests/basic.cpp b/src/tests/basic.cpp similarity index 100% rename from tests/basic.cpp rename to src/tests/basic.cpp diff --git a/tests/io.cpp b/src/tests/io.cpp similarity index 100% rename from tests/io.cpp rename to src/tests/io.cpp diff --git a/tests/ioann.cpp b/src/tests/ioann.cpp similarity index 100% rename from tests/ioann.cpp rename to src/tests/ioann.cpp diff --git a/tests/main.cpp b/src/tests/main.cpp similarity index 100% rename from tests/main.cpp rename to src/tests/main.cpp diff --git a/tests/tag_split.cpp b/src/tests/tag_split.cpp similarity index 100% rename from tests/tag_split.cpp rename to src/tests/tag_split.cpp diff --git a/tests/tagset_parse.cpp b/src/tests/tagset_parse.cpp similarity index 100% rename from tests/tagset_parse.cpp rename to src/tests/tagset_parse.cpp diff --git a/tests/test.tagset b/src/tests/test.tagset similarity index 100% rename from tests/test.tagset rename to src/tests/test.tagset diff --git a/tests/tokenmetadata.cpp b/src/tests/tokenmetadata.cpp similarity index 100% rename from tests/tokenmetadata.cpp rename to src/tests/tokenmetadata.cpp diff --git a/src/uploaddeb.sh b/src/uploaddeb.sh new file mode 100644 index 0000000000000000000000000000000000000000..e4eaa0911d77001caa8391a7f26817fa984bef26 --- /dev/null +++ b/src/uploaddeb.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +APT_USERNAME=$1 +APT_PASSWORD=$2 +APT_SERVER=$3 + +BUILD_PATH=$4 + +for file in "$BUILD_PATH"/*.deb ; do + curl --fail -i -X POST -F "file=@./${file}" -u "${APT_USERNAME}:${APT_PASSWORD}" $APT_SERVER +done \ No newline at end of file diff --git a/utils/CSVColumn.py b/src/utils/CSVColumn.py similarity index 100% rename from utils/CSVColumn.py rename to src/utils/CSVColumn.py diff --git a/utils/CSVTable.py b/src/utils/CSVTable.py similarity index 100% rename from utils/CSVTable.py rename to src/utils/CSVTable.py diff --git a/utils/chunk_eval.py b/src/utils/chunk_eval.py similarity index 100% rename from utils/chunk_eval.py rename to src/utils/chunk_eval.py diff --git a/utils/corpspace.py b/src/utils/corpspace.py similarity index 100% rename from utils/corpspace.py rename to src/utils/corpspace.py diff --git a/utils/corptext.py b/src/utils/corptext.py similarity index 100% rename from utils/corptext.py rename to src/utils/corptext.py diff --git a/utils/corpus2get.cpp b/src/utils/corpus2get.cpp similarity index 100% rename from utils/corpus2get.cpp rename to src/utils/corpus2get.cpp diff --git a/utils/get_held_out.pl b/src/utils/get_held_out.pl similarity index 100% rename from utils/get_held_out.pl rename to src/utils/get_held_out.pl diff --git a/utils/get_morpho.py b/src/utils/get_morpho.py similarity index 100% rename from utils/get_morpho.py rename to src/utils/get_morpho.py diff --git a/utils/parfolds.py b/src/utils/parfolds.py similarity index 100% rename from utils/parfolds.py rename to src/utils/parfolds.py diff --git a/utils/relation_eval.py b/src/utils/relation_eval.py similarity index 100% rename from utils/relation_eval.py rename to src/utils/relation_eval.py diff --git a/utils/split.pl b/src/utils/split.pl similarity index 100% rename from utils/split.pl rename to src/utils/split.pl diff --git a/utils/swapchans.pl b/src/utils/swapchans.pl similarity index 100% rename from utils/swapchans.pl rename to src/utils/swapchans.pl diff --git a/utils/tagger-eval.py b/src/utils/tagger-eval.py similarity index 100% rename from utils/tagger-eval.py rename to src/utils/tagger-eval.py diff --git a/swig/Makefile b/swig/Makefile deleted file mode 100644 index 9d34763f60a97d79b7445df5e8a06a6ba461b16f..0000000000000000000000000000000000000000 --- a/swig/Makefile +++ /dev/null @@ -1,258 +0,0 @@ -CPP=g++ -SWIG=swig -SWIGOPTS_LANG=-c++ -python - -PYTHONDIR=/usr/include/python2.6 -WCCLDIR=/usr/local/include/libwccl/ -CORPUS2DIR=/usr/local/include/libcorpus2/ -PWRUTILDIR= - -CORPUS2BIN=/usr/local/lib/libcorpus2.so -PWRUTILBIN=/usr/local/lib/libpwrutils.so -ANTLRLIB=/usr/lib/libantlr-pic.a - -CPPFLAGS=-fPIC -O2 - -CBIN=libpwrnlperror.o \ - libcorpus2exception.o \ - libcorpustag.o \ - libcorpustagset.o \ - libcorpustagsetmanager.o \ - libcorpuslexeme.o \ - libcorpussentence.o \ - libcorpuschunk.o \ - libcorpustoken.o \ - libcorpustokenwriter.o \ - libcorpustokenreader.o \ - libcorpusiob.o \ - libcorpusannotationchannel.o \ - libcorpusannotatedsentence.o \ - libcorpusannotationview.o \ - corpus2.o - -CBINOUT=_libpwrnlperror.so \ - _libcorpus2exception.so \ - _boost_shared_ptr.so \ - _libcorpustag.so \ - _libcorpustagset.so \ - _libcorpustagsetmanager.so \ - _libcorpuslexeme.so \ - _libcorpustoken.so \ - _libcorpussentence.so \ - _libcorpuschunk.so \ - _libcorpustokenwriter.so \ - _libcorpustokenreader.so \ - _libcorpusiob.so \ - _libcorpusannotationchannel.so \ - _libcorpusannotatedsentence.so \ - _libcorpusannotationview.so \ - _corpus2.so - -CWRAP=libpwrnlperror_wrap.cxx \ - libcorpus2exception_wrap.cxx \ - boost_shared_ptr_wrap.cxx \ - libcorpustag_wrap.cxx \ - libcorpustagset_wrap.cxx \ - libcorpustagsetmanager_wrap.cxx \ - libcorpuslexeme_wrap.cxx \ - libcorpustoken_wrap.cxx \ - libcorpussentence_wrap.cxx \ - libcorpuschunk_wrap.cxx \ - libcorpustokenwriter_wrap.cxx \ - libcorpustokenreader_wrap.cxx \ - libcorpusiob_wrap.cxx \ - libcorpusannotationchannel_wrap.cxx \ - libcorpusannotatedsentence_wrap.cxx \ - libcorpusannotationview_wrap.cxx \ - corpus2_wrap.cxx - -CWRAPBIN=libpwrnlperror_wrap.o \ - libcorpus2exception_wrap.o \ - boost_shared_ptr_wrap.o \ - libcorpustag_wrap.o \ - libcorpustagset_wrap.o \ - libcorpustagsetmanager_wrap.o \ - libcorpuslexeme_wrap.o \ - libcorpustoken_wrap.o \ - libcorpussentence_wrap.o \ - libcorpuschunk_wrap.o \ - libcorpustokenwriter_wrap.o \ - libcorpustokenreader_wrap.o \ - libcorpusiob_wrap.o \ - libcorpusannotationchannel_wrap.o \ - libcorpusannotatedsentence_wrap.o \ - libcorpusannotationview_wrap.o \ - corpus2_wrap.o - -PYMODULES=libpwrnlperror.py \ - libcorpus2exception.py \ - boost_shared_ptr.py \ - libcorpustag.py \ - libcorpustagset.py \ - libcorpustagsetmanager.py \ - libcorpuslexeme.py \ - libcorpustoken.py \ - libcorpussentence.py \ - libcorpuschunk.py \ - libcorpustokenwriter.py \ - libcorpustokenreader.py \ - libcorpusiob.py \ - libcorpusannotationchannel.py \ - libcorpusannotatedsentence.py \ - libcorpusannotationview.py \ - corpus2.py - -PYCBIN=libpwrnlperror.pyc \ - libcorpus2exception.pyc \ - boost_shared_ptr.pyc \ - libcorpustag.pyc \ - libcorpustagset.pyc \ - libcorpustagsetmanager.pyc \ - libcorpuslexeme.pyc \ - libcorpustoken.pyc \ - libcorpussentence.pyc \ - libcorpuschunk.pyc \ - libcorpustokenwriter.pyc \ - libcorpustokenreader.pyc \ - libcorpusiob.pyc \ - libcorpusannotationchannel.pyc \ - libcorpusannotatedsentence.pyc \ - libcorpusannotationview.pyc \ - corpus2.pyc - -# ----------------------------------------------------------------------------- -all:boost_shared_ptr.o $(CBIN) - # Done -# ----------------------------------------------------------------------------- - -# ----------------------------------------------------------------------------- -# boost::shared_ptr wrappers -# ----------------------------------------------------------------------------- -# shared_ptr -boost_shared_ptr.o: - $(SWIG) $(SWIGOPTS_LANG) boost_shared_ptr.i - $(CPP) -c boost_shared_ptr_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared boost_shared_ptr_wrap.o -o _boost_shared_ptr.so - -# ----------------------------------------------------------------------------- -# PwrNlpError wprapper -# ----------------------------------------------------------------------------- -# PwrNlpError -libpwrnlperror.o: - $(SWIG) $(SWIGOPTS_LANG) libpwrnlperror.i - $(CPP) -c libpwrnlperror_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared libpwrnlperror_wrap.o -o _libpwrnlperror.so - -# ----------------------------------------------------------------------------- -# Corpus2 Wrappers -# ----------------------------------------------------------------------------- - -libcorpus2exception.o: - $(SWIG) $(SWIGOPTS_LANG) libcorpus2exception.i - $(CPP) -c libcorpus2exception_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared libcorpus2exception_wrap.o \ - $(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpus2exception.so - -# Tag -libcorpustag.o: - $(SWIG) $(SWIGOPTS_LANG) libcorpustag.i - $(CPP) -c libcorpustag_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared libcorpustag_wrap.o \ - $(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpustag.so - -# Tagset -libcorpustagset.o: - $(SWIG) $(SWIGOPTS_LANG) libcorpustagset.i - $(CPP) -c libcorpustagset_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared libcorpustagset_wrap.o \ - $(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpustagset.so - -# TagsetManager -libcorpustagsetmanager.o: - $(SWIG) $(SWIGOPTS_LANG) libcorpustagsetmanager.i - $(CPP) -c libcorpustagsetmanager_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared libcorpustagsetmanager_wrap.o \ - $(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpustagsetmanager.so - -# Lexeme -libcorpuslexeme.o: - $(SWIG) $(SWIGOPTS_LANG) libcorpuslexeme.i - $(CPP) -c libcorpuslexeme_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared libcorpuslexeme_wrap.o \ - $(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpuslexeme.so - -# Chunk -libcorpuschunk.o: - $(SWIG) $(SWIGOPTS_LANG) libcorpuschunk.i - $(CPP) -c libcorpuschunk_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared libcorpuschunk_wrap.o \ - $(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpuschunk.so - -# Token -libcorpustoken.o: - $(SWIG) $(SWIGOPTS_LANG) libcorpustoken.i - $(CPP) -c libcorpustoken_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared libcorpustoken_wrap.o \ - $(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpustoken.so - -# Sentence -libcorpussentence.o: - $(SWIG) $(SWIGOPTS_LANG) libcorpussentence.i - $(CPP) -c libcorpussentence_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared libcorpussentence_wrap.o \ - $(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpussentence.so - -# TokenWriter -libcorpustokenwriter.o: - $(SWIG) $(SWIGOPTS_LANG) libcorpustokenwriter.i - $(CPP) -c libcorpustokenwriter_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared libcorpustokenwriter_wrap.o \ - $(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpustokenwriter.so - -# TokenReader -libcorpustokenreader.o: - $(SWIG) $(SWIGOPTS_LANG) libcorpustokenreader.i - $(CPP) -c libcorpustokenreader_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared libcorpustokenreader_wrap.o \ - $(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpustokenreader.so - -# IOB -libcorpusiob.o: - $(SWIG) $(SWIGOPTS_LANG) libcorpusiob.i - $(CPP) -c libcorpusiob_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared libcorpusiob_wrap.o \ - $(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpusiob.so - -# AnnotationChannel -libcorpusannotationchannel.o: - $(SWIG) $(SWIGOPTS_LANG) libcorpusannotationchannel.i - $(CPP) -c libcorpusannotationchannel_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared libcorpusannotationchannel_wrap.o \ - $(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpusannotationchannel.so - -# AnotatedSentence -libcorpusannotatedsentence.o: - $(SWIG) $(SWIGOPTS_LANG) libcorpusannotatedsentence.i - $(CPP) -c libcorpusannotatedsentence_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared libcorpusannotatedsentence_wrap.o \ - $(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpusannotatedsentence.so - -# AnnotationView -libcorpusannotationview.o: - $(SWIG) $(SWIGOPTS_LANG) libcorpusannotationview.i - $(CPP) -c libcorpusannotationview_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared libcorpusannotationview_wrap.o \ - $(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpusannotationview.so - -# ----------------------------------------------------------------------------- - -# Corpus2 -corpus2.o: - $(SWIG) $(SWIGOPTS_LANG) corpus2.i - $(CPP) -c corpus2_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS) - $(CPP) -shared corpus2_wrap.o \ - $(PWRUTILBIN) $(CORPUS2BIN) -o _corpus2.so - -# ----------------------------------------------------------------------------- -clean: - rm -f $(CBIN) $(CBINOUT) $(CWRAP) $(CWRAPBIN) $(PYMODULES) $(PYCBIN) diff --git a/uploaddeb.sh b/uploaddeb.sh new file mode 100644 index 0000000000000000000000000000000000000000..6f8f3fc68f4144cad51ca7ad2c7dabd5ad18ebda --- /dev/null +++ b/uploaddeb.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +APT_USERNAME=$1 +APT_PASSWORD=$2 +APT_SERVER=$3 + +for file in *.deb ; do + curl --fail -i -X POST -F "file=@./${file}" -u "${APT_USERNAME}:${APT_PASSWORD}" $APT_SERVER +done