Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
53f3e722
Commit
53f3e722
authored
Feb 24, 1997
by
chris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
de6868b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
lib/python/SearchIndex/InvertedIndex.py
lib/python/SearchIndex/InvertedIndex.py
+8
-5
No files found.
lib/python/SearchIndex/InvertedIndex.py
View file @
53f3e722
...
...
@@ -30,7 +30,7 @@ Example usage:
print i['blah']
$Id: InvertedIndex.py,v 1.1
6 1997/02/21 19:37:01 cici
Exp $'''
$Id: InvertedIndex.py,v 1.1
7 1997/02/24 16:29:01 chris
Exp $'''
# Copyright
#
# Copyright 1996 Digital Creations, L.C., 910 Princess Anne
...
...
@@ -82,6 +82,9 @@ $Id: InvertedIndex.py,v 1.16 1997/02/21 19:37:01 cici Exp $'''
# (540) 371-6909
#
# $Log: InvertedIndex.py,v $
# Revision 1.17 1997/02/24 16:29:01 chris
# *** empty log message ***
#
# Revision 1.16 1997/02/21 19:37:01 cici
# *** empty log message ***
#
...
...
@@ -135,7 +138,7 @@ $Id: InvertedIndex.py,v 1.16 1997/02/21 19:37:01 cici Exp $'''
#
#
#
__version__
=
'$Revision: 1.1
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
7
$'
[
11
:
-
2
]
import
regex
,
regsub
,
string
,
SingleThreadedTransaction
,
copy
...
...
@@ -488,7 +491,7 @@ class Index(SingleThreadedTransaction.Persistent):
freq
=
int
(
10000
*
(
len
(
d
[
s
])
/
nwords
))
try
:
index
[
s
].
addentry
(
srckey
,
freq
,
d
[
s
])
except
:
except
KeyError
:
index
[
s
]
=
List
({
srckey
:
(
freq
,
d
[
s
])})
...
...
@@ -612,8 +615,8 @@ class PersistentResultList(ResultList, SingleThreadedTransaction.Persistent):
def
addentry
(
self
,
key
,
*
info
):
'''Add a frequency/key pair to this object'''
apply
(
PersistentResultList
.
inheritedAttribute
(
'addentry'
),
(
self
,
key
)
+
info
)
t
=
(
self
,
key
)
+
info
apply
(
PersistentResultList
.
inheritedAttribute
(
'addentry'
),
t
)
self
.
__changed__
(
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment