Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

// Switch from geometric --> semantic zoom at this size.
const MAX_DISPLAY_SIZE = 50;
// Min picking point size, to produce "envelope" around small points.
const MIN_PICKING_SIZE = 10;
// Above this size, add a border to the point.
const BORDER_THRESHOLD_SIZE = 30;
class Field(PointIndex):
fields = {
'title': {
'type': 'text',
'term_vector': 'with_positions_offsets',
},
'description': {
'type': 'text',
'term_vector': 'with_positions_offsets',
root
|-- article_id: long (nullable = true)
|-- text: string (nullable = true)
|-- tokens: array (nullable = true)
| |-- element: string (containsNull = true)
|-- clf_tokens: array (nullable = true)
| |-- element: string (containsNull = true)
|-- first_ts: integer (nullable = true)
|-- url: string (nullable = true)
|-- domain: string (nullable = true)
[Row(pair=Row(t_tokens=['hamlet', 'on', 'friendship'], a_tokens=['shakespeare']), logp=-39.098968505859375, work_id=223338697031),
Row(pair=Row(t_tokens=['hamlet', 'grosse', 'oper', 'in', '5', 'akten', 'und', '7', 'tableaux'], a_tokens=['shakespeare']), logp=-116.32585144042969, work_id=42949996797),
Row(pair=Row(t_tokens=['hamlet', 'first', 'quarto', '1603'], a_tokens=['shakespeare']), logp=-50.56448745727539, work_id=42949996797),
Row(pair=Row(t_tokens=['hamlet', 'tragedy', 'in', 'five', 'acts'], a_tokens=['shakespeare']), logp=-56.80743408203125, work_id=42949996797),
Row(pair=Row(t_tokens=['hamlet', 'first', 'quarto', '1603'], a_tokens=['shakespeare']), logp=-50.56448745727539, work_id=42949996797),
Row(pair=Row(t_tokens=['hamlet', 'tragedy', 'in', 'five', 'acts'], a_tokens=['shakespeare']), logp=-56.80743408203125, work_id=42949996797),
Row(pair=Row(t_tokens=['hamlet', 'tragedy'], a_tokens=['shakespeare']), logp=-34.793853759765625, work_id=42949996797),
Row(pair=Row(t_tokens=['hamlet', 'ishkhan',
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.