Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Phil Burton
bladictionary2
Commits
06364c16
Commit
06364c16
authored
10 years ago
by
Joe Robinson
Browse files
Options
Download
Patches
Plain Diff
Removed debug stuff
parent
8a5c561a
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bladictionary.py
+1
-5
bladictionary.py
with
1 addition
and
5 deletions
+1
-5
bladictionary.py
+
1
−
5
View file @
06364c16
...
@@ -7,7 +7,7 @@ import optparse
...
@@ -7,7 +7,7 @@ import optparse
from
lxml
import
etree
from
lxml
import
etree
import
sqlite3
import
sqlite3
VERSION
=
"2.1.
5
b"
VERSION
=
"2.1.
6
b"
class
Definition
(
object
):
class
Definition
(
object
):
#ID is relative to the word type, eg noun 1, noun 2, verb 1, verb 2, not to the entire list
#ID is relative to the word type, eg noun 1, noun 2, verb 1, verb 2, not to the entire list
...
@@ -227,7 +227,6 @@ def parse_oed(word):
...
@@ -227,7 +227,6 @@ def parse_oed(word):
id
=
0
id
=
0
definition
=
""
definition
=
""
word_type
=
""
word_type
=
""
print
line
for
part
in
line
.
split
(
" "
)[
word_len
:]:
for
part
in
line
.
split
(
" "
)[
word_len
:]:
#If we've reached a word type, add the current data to the list
#If we've reached a word type, add the current data to the list
...
@@ -265,10 +264,7 @@ def parse_oed(word):
...
@@ -265,10 +264,7 @@ def parse_oed(word):
tmp_items
=
[]
tmp_items
=
[]
simple_types
=
[
"n"
,
"v"
,
"adj"
,
"adv"
]
simple_types
=
[
"n"
,
"v"
,
"adj"
,
"adv"
]
for
simple_type
in
simple_types
:
for
simple_type
in
simple_types
:
print
simple_type
for
tmp_item
in
items
:
for
tmp_item
in
items
:
print
tmp_item
.
word_type
if
tmp_item
.
word_type
==
simple_type
:
if
tmp_item
.
word_type
==
simple_type
:
tmp_items
.
append
(
tmp_item
)
tmp_items
.
append
(
tmp_item
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Explore
Projects
Groups
Topics
Snippets