Skip to content

Commit

Permalink
added pagerank example; phirl-improved
Browse files Browse the repository at this point in the history
  • Loading branch information
wwcohen committed Oct 19, 2017
1 parent 2b091aa commit 95a1fe1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tutorial/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ clean:
rm -rf gpig_views
rm -f total.gp
rm -f *.pyc
rm -f tmp-pr-graph.txt

tar: update
echo created on `date` > marker.txt
Expand Down Expand Up @@ -84,4 +85,6 @@ check-phirl: run-phirl
sort -gr gpig_views/look.gp > phirl-actual-output.txt
diff phirl-actual-output.txt phirl-expected-output.txt


run-pagerank:
python pagerank.py
head tmp-pr-graph.txt
2 changes: 1 addition & 1 deletion tutorial/phirl-improved.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Phirl(Planner):
by=lambda((rel1,doc1,term,weight1),(rel2,doc2,term_,weight2)): \
(doc1,doc2,weight1*weight2)) \
| Group(by=lambda(doc1,doc2,p):(doc1,doc2), \
retaining=lambda accum,(doc1,doc2,p):p, \
retaining=lambda (doc1,doc2,p):p, \
reducingTo=ReduceToSum()) \
| ReplaceEach(by=lambda((doc1,doc2),sim):(doc1,doc2,sim))

Expand Down

0 comments on commit 95a1fe1

Please sign in to comment.