Skip to content
Snippets Groups Projects
Commit 21fb0bac authored by Paweł Kędzia's avatar Paweł Kędzia
Browse files

Updated corpus2 tagset

parent 7556c261
Branches
No related merge requests found
...@@ -16,6 +16,18 @@ ...@@ -16,6 +16,18 @@
namespace Corpus2 { namespace Corpus2 {
class Tagset { class Tagset {
public: public:
enum ParseMode {
ParseCheckRequired = 1, /// Check for presence of required attributes
ParseAllowExtra = 2, /// Allow extra attributes
ParseCheckSingular = 4, /// Check tag singularity
ParseDefault = ParseCheckRequired, /// Default mode
ParseRequiredWithExtra = ParseCheckRequired | ParseAllowExtra,
ParseStrict = ParseCheckRequired | ParseCheckSingular,
ParseLoose = ParseAllowExtra
};
Tagset(); Tagset();
static Tagset from_data(const char*); static Tagset from_data(const char*);
...@@ -23,8 +35,8 @@ namespace Corpus2 { ...@@ -23,8 +35,8 @@ namespace Corpus2 {
Tag parse_symbol(const std::string& s) const; Tag parse_symbol(const std::string& s) const;
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
std::vector<Tag> parse_tag(const char* c, bool allow_extra) const; std::vector<Tag> parse_tag(const char* c, ParseMode m = ParseDefault) const;
Tag parse_simple_tag(const char* c, bool allow_extra) const; Tag parse_simple_tag(const char* c, ParseMode mode = ParseDefault) const;
Tag make_ign_tag() const; Tag make_ign_tag() const;
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment