Skip to content

Instantly share code, notes, and snippets.

View bambooforest's full-sized avatar

Steven Moran bambooforest

View GitHub Profile
@bambooforest
bambooforest / gist:778a890b5dc6e14284fd490fbdbdf262
Created August 23, 2017 17:36
skip or not skip words in acqdiv pipeline
w_ids = []
for w in words:
if w:
w.update(corpus=self.corpus, language=self.language)
w_id, = insert_word(session_id_fk=s_id, utterance_id_fk=u_id, **w).inserted_primary_key
else:
w_id = None
w_ids.append(w_id)
link_to_word = len(morphemes) == len(words) and None not in w_ids
select *
from morphemes as m
join utterances as u on m.utterance_id_fk = u.id
left join words as w on m.word_id_fk = w.id
join sessions s on u.session_id_fk = s.id
left join speakers sp on u.speaker_id_fk = sp.id
left join uniquespeakers on sp.uniquespeaker_id_fk = uniquespeakers.id
order by s.id, u.id, w.id, m.id

Keybase proof

I hereby claim:

  • I am bambooforest on github.
  • I am bambooforest (https://keybase.io/bambooforest) on keybase.
  • I have a public key whose fingerprint is 94B7 1DFD DE71 BE5B C8C2 4383 AB59 C808 0CEE 6784

To claim this, I am signing this object: