Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lib_unwort
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
FOSS-AG
lib_unwort
Commits
cf5fa03d
Commit
cf5fa03d
authored
Apr 30, 2018
by
Arne Dußin
Browse files
Options
Downloads
Patches
Plain Diff
Fix getter methods in Word
parent
bb3bac06
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/german/word.rs
+14
-8
14 additions, 8 deletions
src/german/word.rs
with
14 additions
and
8 deletions
src/german/word.rs
+
14
−
8
View file @
cf5fa03d
...
...
@@ -19,6 +19,7 @@ pub enum WordType {
}
/// Representation of a German grammatical gender.
#[allow(missing_docs)]
#[derive(Copy,
Clone)]
pub
enum
Gender
{
None
,
...
...
@@ -28,6 +29,7 @@ pub enum Gender {
}
/// Representation of a German grammatical number.
#[allow(missing_docs)]
#[derive(Copy,
Clone)]
pub
enum
Number
{
None
,
...
...
@@ -36,6 +38,7 @@ pub enum Number {
}
/// Representation of a German grammatical case.
#[allow(missing_docs)]
#[derive(Copy,
Clone)]
pub
enum
Case
{
None
,
...
...
@@ -46,6 +49,7 @@ pub enum Case {
}
// Representation of a German grammatical person.
#[allow(missing_docs)]
#[derive(Copy,
Clone)]
pub
enum
Person
{
None
,
...
...
@@ -55,6 +59,7 @@ pub enum Person {
}
/// Representation of a German grammatical mood.
#[allow(missing_docs)]
#[derive(Copy,
Clone)]
pub
enum
Mood
{
None
,
...
...
@@ -64,6 +69,7 @@ pub enum Mood {
}
/// Representation of a German grammatical genera.
#[allow(missing_docs)]
#[derive(Copy,
Clone)]
pub
enum
Genera
{
None
,
...
...
@@ -113,37 +119,37 @@ impl Word {
/// Get the grammatical type of a word. None, if the type is unknown.
pub
fn
word_type
(
&
self
)
->
Option
<
WordType
>
{
Some
(
self
.word_type
)
self
.word_type
}
/// Get the grammatical gender of a word. None, if the gender is unknown.
pub
fn
gender
(
&
self
)
->
Option
<
Gender
>
{
Some
(
self
.gender
)
self
.gender
}
/// Get the grammatical number of a word. None, if the number is unknown.
pub
fn
number
(
&
self
)
->
Option
<
Number
>
{
Some
(
self
.number
)
self
.number
}
/// Get the grammatical case of a word. None, if the case is unknown.
pub
fn
case
(
&
self
)
->
Option
<
Case
>
{
Some
(
self
.case
)
self
.case
}
/// Get the grammatical person of a word. None, if the case is unknown.
pub
fn
person
(
&
self
)
->
Option
<
Person
>
{
Some
(
self
.person
)
self
.person
}
//7 Get the grammatical mood of a word. None, if the case is unknown.
pub
fn
mood
(
&
self
)
->
Option
<
Mood
>
{
Some
(
self
.mood
)
self
.mood
}
/// Get the grammatical genera of a word. None, if the case is unknown.
pub
fn
genera
(
&
self
)
->
Option
<
Genera
>
{
Some
(
self
.genera
)
self
.genera
}
/// Used to set the grammatical type of a word. Can also be used to reset it.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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