Skip to content

Commit

Permalink
ugc rel tag and filter during centrality calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkeldenker committed Nov 20, 2024
1 parent d2fa5f4 commit 0681588
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ pub static SKIPPED_REL: std::sync::LazyLock<RelFlags> = std::sync::LazyLock::new
| RelFlags::SEARCH
| RelFlags::LINK_TAG
| RelFlags::SCRIPT_TAG
| RelFlags::UGC
});

#[derive(Debug, Clone, bincode::Decode, bincode::Encode)]
Expand Down
1 change: 1 addition & 0 deletions crates/core/src/webgraph/centrality/harmonic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pub static SKIPPED_REL: std::sync::LazyLock<RelFlags> = std::sync::LazyLock::new
| RelFlags::LINK_TAG
| RelFlags::SCRIPT_TAG
| RelFlags::SAME_ICANN_DOMAIN
| RelFlags::UGC
});

type Counter = BTreeMap<NodeID, HyperLogLog<HYPERLOGLOG_COUNTERS>>;
Expand Down
2 changes: 2 additions & 0 deletions crates/core/src/webpage/html/links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ impl RelFlags {
"tag" => res |= RelFlags::TAG,
"terms-of-service" => res |= RelFlags::TERMS_OF_SERVICE,
"sponsored" => res |= RelFlags::SPONSORED,
"ugc" => res |= RelFlags::UGC,
_ => {}
}
}
Expand Down Expand Up @@ -135,6 +136,7 @@ bitflags! {
const SCRIPT_TAG = 1 << 19;
const META_TAG = 1 << 20;
const SAME_ICANN_DOMAIN = 1 << 21;
const UGC = 1 << 22;
}
}

Expand Down

0 comments on commit 0681588

Please sign in to comment.