Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

License Question #65

Open
therealmitchconnors opened this issue Oct 24, 2023 · 1 comment
Open

License Question #65

therealmitchconnors opened this issue Oct 24, 2023 · 1 comment

Comments

@therealmitchconnors
Copy link

Hey Matt,

I may be interested in collaborating on some features, such as morphology-based search. I'm curious what the license status of this project is. Would you accept pull requests? Is the Morphology DB covered under creative commons with the rest of the SBLGNT?

Mitch

@therealmitchconnors
Copy link
Author

therealmitchconnors commented Oct 25, 2023

I've been able to add morph codes to the concordance table, and use LIKE syntax for basic morphology searches. It still needs some work, but I thought it was worth reporting progress.

  import sqlite3
  con = sqlite3.connect('gnt-app.db')
  cur = con.cursor()
  
  id = 2
  data = []
  
  for row in cur.execute("SELECT * from verses;"):
      book = row[0]
      chapter = row[1]
      verse = row[2]
      encoded_text = row[3]
  
      for word in encoded_text.split():
          parts = word.split("_")
          lemma = parts[1]
          morph = parts[2]
  
          data.append((id, lemma, morph, book, chapter, verse))
          id += 1
  
      cur2 = con.cursor()
      cur2.executemany("INSERT INTO concordance VALUES (?, ?, ?, ?, ?, ?);", data)
      data = []
  
  con.commit()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant