Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
WCCL
Commits
3023c584
Commit
3023c584
authored
13 years ago
by
Adam Wardynski
Browse files
Options
Downloads
Patches
Plain Diff
Some rough comments to WcclFile header.
parent
cd7e633b
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libwccl/wcclfile.h
+29
-8
29 additions, 8 deletions
libwccl/wcclfile.h
with
29 additions
and
8 deletions
libwccl/wcclfile.h
+
29
−
8
View file @
3023c584
...
...
@@ -15,6 +15,12 @@
namespace
Wccl
{
/**
* Class representing contents of parsed WCCL files
* - imported lexicons, any typed and untyped named
* operator sections, up to one tag rules section,
* and up to one match rules section.
*/
class
WcclFile
:
WcclFileOpSections
<
UntypedOpSequence
>
,
WcclFileOpSections
<
OpSequence
<
StrSet
>
>
,
...
...
@@ -26,6 +32,9 @@ class WcclFile
public:
WcclFile
(
const
Corpus2
::
Tagset
&
tagset
,
const
std
::
string
&
search_path
);
//
// Untyped and typed operator sections: @X:"sectioname" ( op1; op2 )
//
const
std
::
vector
<
boost
::
shared_ptr
<
UntypedOpSequence
>
>&
untyped_sections
();
template
<
class
T
>
const
typename
std
::
vector
<
boost
::
shared_ptr
<
OpSequence
<
T
>
>
>&
sections
();
...
...
@@ -76,14 +85,6 @@ public:
FunctionalOpSequence
::
name_op_v_t
gen_all_op_pairs
();
FunctionalOpSequence
::
name_op_v_c_t
gen_all_op_pairs
()
const
;
void
import_lexicon
(
const
boost
::
shared_ptr
<
Lexicon
>&
lexicon
);
bool
has_lexicon
(
const
std
::
string
&
name
)
const
;
bool
has_lexicons
()
const
;
boost
::
shared_ptr
<
const
Lexicon
>
get_lexicon_ptr
(
const
std
::
string
&
name
)
const
;
const
Lexicon
&
get_lexicon
(
const
std
::
string
&
name
)
const
;
boost
::
shared_ptr
<
const
Lexicons
>
get_lexicons_ptr
()
const
;
const
Lexicons
&
get_lexicons
()
const
;
void
add_untyped_section
(
const
boost
::
shared_ptr
<
UntypedOpSequence
>&
section
);
void
add_untyped_section
(
const
boost
::
shared_ptr
<
const
UntypedOpSequence
>&
section
);
void
add_untyped_section
(
const
UntypedOpSequence
&
section
);
...
...
@@ -94,6 +95,20 @@ public:
template
<
class
T
>
void
add_section
(
const
OpSequence
<
T
>&
section
);
//
// Lexicons, import sections: import("path", "name")
//
void
import_lexicon
(
const
boost
::
shared_ptr
<
Lexicon
>&
lexicon
);
bool
has_lexicon
(
const
std
::
string
&
name
)
const
;
bool
has_lexicons
()
const
;
boost
::
shared_ptr
<
const
Lexicon
>
get_lexicon_ptr
(
const
std
::
string
&
name
)
const
;
const
Lexicon
&
get_lexicon
(
const
std
::
string
&
name
)
const
;
boost
::
shared_ptr
<
const
Lexicons
>
get_lexicons_ptr
()
const
;
const
Lexicons
&
get_lexicons
()
const
;
//
// Tag rules section: tag_rules ( rule1; rule2 )
//
bool
has_tag_rules
()
const
;
void
set_tag_rules
(
const
boost
::
shared_ptr
<
TagRuleSequence
>&
tag_rules
);
...
...
@@ -102,10 +117,16 @@ public:
boost
::
shared_ptr
<
TagRuleSequence
>
get_tag_rules_ptr
();
boost
::
shared_ptr
<
const
TagRuleSequence
>
get_tag_rules_ptr
()
const
;
//
// Match rules section: match_rules ( apply1; apply2 )
//
bool
has_match_rules
()
const
;
void
add_match_rule
(
const
boost
::
shared_ptr
<
MatchRule
>&
match_rule
);
const
std
::
vector
<
boost
::
shared_ptr
<
MatchRule
>
>&
get_match_rules
();
//
// Miscelaneous
//
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
ostream
,
const
WcclFile
&
wccl_file
);
std
::
string
to_string
()
const
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment