Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wordifier
Manage
Activity
Members
Labels
Plan
Issues
1
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
nlpworkers
wordifier
Compare revisions
7dff33b2eb434cfd686394e82f14dd2139710af9 to 93416009bf92366e70d89fc07828098dae6192b1
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
nlpworkers/wordifier
Select target project
No results found
93416009bf92366e70d89fc07828098dae6192b1
Select Git revision
Swap
Target
nlpworkers/wordifier
Select target project
nlpworkers/wordifier
1 result
7dff33b2eb434cfd686394e82f14dd2139710af9
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Resolve
#1
issue
· b86836e9
Norbert Ropiak
authored
2 years ago
and
Michał Pogoda
committed
2 years ago
b86836e9
Merge branch 'fix_ns_first_token' into 'master'
· 93416009
Michał Pogoda
authored
2 years ago
Resolve
#1
issue Closes
#1
See merge request
!3
93416009
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/date2words.py
+1
-1
1 addition, 1 deletion
src/date2words.py
src/wordifier.py
+3
-2
3 additions, 2 deletions
src/wordifier.py
with
4 additions
and
3 deletions
src/date2words.py
View file @
93416009
...
...
@@ -99,7 +99,7 @@ def date2words(date_match, tags=None):
date_order
=
[
day
,
*
check_none
(
date_match
[
'
punct5
'
]),
month
,
*
check_none
(
date_match
[
'
punct6
'
])]
else
:
date_order
=
[
month
]
date_order
=
[
month
,
*
check_none
(
date_match
[
'
punct6
'
])
]
if
year
:
date_order
=
date_order
+
[
year
]
date_order
=
list
(
map
(
lambda
x
:
x
if
x
else
''
,
date_order
))
...
...
This diff is collapsed.
Click to expand it.
src/wordifier.py
View file @
93416009
...
...
@@ -118,8 +118,9 @@ class Wordifier:
tags
.
append
(
tag
)
tok_id
+=
2
elif
elem
.
tag
==
'
ns
'
:
tok_id
-=
1
string_builder
.
pop
()
if
string_builder
:
string_builder
.
pop
()
tok_id
-=
1
else
:
raise
Exception
(
'
Unrecognized tag inside sentence:
'
+
elem
.
tag
)
return
self
.
_process_sentence
(
string_builder
,
tags
)
...
...
This diff is collapsed.
Click to expand it.