Permalink
Browse files

made the sqlite script work again

  • Loading branch information...
1 parent f5af631 commit a1905e9cc993efb9feecf3082d6750517f7a34c9 @rspeer rspeer committed Sep 15, 2011
Showing with 19 additions and 3 deletions.
  1. +16 −0 conceptnet/corpus/migrations/0001_initial.py
  2. +3 −3 tools/dump_to_sqlite.py
@@ -47,6 +47,15 @@ def forwards(self, orm):
))
db.send_create_signal('corpus', ['Sentence'])
+ # Adding model 'Frequency'
+ db.create_table('nl_frequency', (
+ ('id', orm['corpus.Frequency:id']),
+ ('language', orm['corpus.Frequency:language']),
+ ('text', orm['corpus.Frequency:text']),
+ ('value', orm['corpus.Frequency:value']),
+ ))
+ db.send_create_signal('corpus', ['Frequency'])
+
def backwards(self, orm):
@@ -115,6 +124,13 @@ def backwards(self, orm):
'name': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'sentence_count': ('django.db.models.fields.IntegerField', [], {'default': '0'})
},
+ 'corpus.frequency': {
+ 'Meta': {'db_table': "'nl_frequency'"},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['corpus.Language']"}),
+ 'value': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'text': ('django.db.models.fields.TextField', [], {}),
+ },
'corpus.sentence': {
'Meta': {'db_table': "'sentences'"},
'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['events.Activity']"}),
@@ -1,14 +1,14 @@
#!/usr/bin/env python
# This one should run in the ConceptNet Django environment.
-from csc.conceptnet.models import Concept # just for the environment setup.
+from conceptnet.models import Concept # just for the environment setup.
from django.db.models import get_models
from django.db.models.query import QuerySet
-from csc.util.batch import Status
+from csc_utils.batch import Status
import sys, sqlite3
models_to_dump = '''
Vote RawAssertion Frame SurfaceForm Assertion
-Relation Frequency Concept FunctionClass FunctionWord Language
+Relation Frequency Concept Language
Sentence User ContentType Activity Batch
'''.strip().split()

0 comments on commit a1905e9

Please sign in to comment.