Skip to content
Snippets Groups Projects
Commit 3f00499f authored by ilor's avatar ilor
Browse files

list available tagsets in tagset-tool

parent c9c06d39
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,7 @@ or FITNESS FOR A PARTICULAR PURPOSE. ...@@ -21,6 +21,7 @@ or FITNESS FOR A PARTICULAR PURPOSE.
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
#include <boost/algorithm/string/join.hpp>
namespace Corpus2 { namespace Corpus2 {
...@@ -96,4 +97,9 @@ boost::shared_ptr<Tagset> TagsetManager::get_cache_entry(tagset_idx_t id) ...@@ -96,4 +97,9 @@ boost::shared_ptr<Tagset> TagsetManager::get_cache_entry(tagset_idx_t id)
} }
} }
std::string available_tagsets()
{
return boost::algorithm::join(Path::Instance().list_files(".tagset"), " ");
}
} /* end ns Corpus2 */ } /* end ns Corpus2 */
...@@ -81,6 +81,8 @@ inline const Tagset& get_named_tagset(tagset_idx_t id) { ...@@ -81,6 +81,8 @@ inline const Tagset& get_named_tagset(tagset_idx_t id) {
return TagsetManagerSingleton::Instance().get_tagset(id); return TagsetManagerSingleton::Instance().get_tagset(id);
} }
std::string available_tagsets();
} /* end ns Corpus2 */ } /* end ns Corpus2 */
#endif // LIBCORPUS2_TAGSETMANAGER_H #endif // LIBCORPUS2_TAGSETMANAGER_H
...@@ -240,6 +240,8 @@ int main(int argc, char** argv) ...@@ -240,6 +240,8 @@ int main(int argc, char** argv)
if (vm.count("help")) { if (vm.count("help")) {
std::cout << desc << "\n"; std::cout << desc << "\n";
std::cout << "Available tagsets: ";
std::cout << Corpus2::available_tagsets() << "\n";
return 1; return 1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment