syntax

package
v0.0.0-...-d770312 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BiblicalHumanitiesRepo = Repo{
	GitUrl:  "github.com/biblicalhumanities/greek-new-testament.git",
	XMLPath: "syntax-trees/sblgnt/xml",
}

BiblicalHumanitiesRepo contains URL and path information for the old repository for this work; new development, with new features and revisions, is happening in the Clear-Bible repository. NB that this repo has inconsistencies in the word part of the references.

View Source
var ClearBibleRepo = Repo{
	GitUrl:  "github.com/Clear-Bible/macula-greek.git",
	XMLPath: "SBLGNT/nodes",
}

ClearBibleRepo contains URL and path information to the new repository, to which the Biblical Humanities repo has moved.

View Source
var DefaultRepo = ClearBibleRepo
View Source
var SidNameToBook = map[string]sblgnt.BookName{
	"MAT": sblgnt.Matthew,
	"MRK": sblgnt.Mark,
	"LUK": sblgnt.Luke,
	"JHN": sblgnt.John,
	"ACT": sblgnt.Acts,
	"ROM": sblgnt.Romans,
	"1CO": sblgnt.FirstCorinthians,
	"2CO": sblgnt.SecondCorinthians,
	"GAL": sblgnt.Galatians,
	"EPH": sblgnt.Ephesians,
	"PHP": sblgnt.Philippians,
	"COL": sblgnt.Colossians,
	"1TH": sblgnt.FirstThessalonians,
	"2TH": sblgnt.SecondThessalonians,
	"1TM": sblgnt.FirstTimothy,
	"1TI": sblgnt.FirstTimothy,
	"2TM": sblgnt.SecondTimothy,
	"2TI": sblgnt.SecondTimothy,
	"TIT": sblgnt.Titus,
	"PHM": sblgnt.Philemon,
	"HEB": sblgnt.Hebrews,
	"JMS": sblgnt.James,
	"JAS": sblgnt.James,
	"1PE": sblgnt.FirstPeter,
	"2PE": sblgnt.SecondPeter,
	"1JN": sblgnt.FirstJohn,
	"2JN": sblgnt.SecondJohn,
	"3JN": sblgnt.ThirdJohn,
	"JUD": sblgnt.Jude,
	"REV": sblgnt.Revelation,
}

Functions

This section is empty.

Types

type Book

type Book struct {
	Sentences []Sentence `xml:"Sentence"`
}

func ParseSBLGNTSyntaxFile

func ParseSBLGNTSyntaxFile(reader io.Reader) (Book, error)

type Node

type Node struct {
	XMLID   string `xml:"id,attr"`
	Id      string `xml:"Id,attr"`
	NodeID  string `xml:"nodeId,attr"`
	MorphID string `xml:"morphId,attr,omitempty"`

	Cat    string `xml:"Cat,attr"`
	Head   string `xml:"Head,attr"`
	Start  string `xml:"Start,attr,omitempty"`
	End    string `xml:"End,attr,omitempty"`
	Rule   string `xml:"Rule,attr,omitempty"`
	ClType string `xml:"ClType,attr,omitempty"`

	UnicodeLemma string `xml:"UnicodeLemma,attr,omitempty"`
	Unicode      string `xml:"Unicode,attr,omitempty"`

	Number  string `xml:"Number,attr,omitempty"`
	Type    string `xml:"Type,attr,omitempty"`
	Case    string `xml:"Case,attr,omitempty"`
	Gender  string `xml:"Gender,attr,omitempty"`
	Content string `xml:",chardata"`
	Nodes   []Node `xml:"Node"`

	Length         int    `xml:"Length,attr,omitempty"`
	English        string `xml:"English,attr,omitempty"`
	Mandarin       string `xml:"Mandarin,attr,omitempty"`
	Gloss          string `xml:"Gloss,attr,omitempty"`
	Language       string `xml:"Language,attr,omitempty"`
	Ref            string `xml:"Ref,attr,omitempty"`
	NormalizedForm string `xml:"NormalizedForm,attr,omitempty"`
	FunctionalTag  string `xml:"FunctionalTag,attr,omitempty"`
	FormalTag      string `xml:"FormalTag,attr,omitempty"`
	Frame          string `xml:"Frame,attr,omitempty"`
	StrongNumber   string `xml:"StrongNumber,attr,omitempty"` // NB can be of the form "int+int"
	LexDomain      string `xml:"LexDomain,attr,omitempty"`
	LN             string `xml:"LN,attr,omitempty"`
	HasDet         string `xml:"HasDet,attr,omitempty"`
	SubjRef        string `xml:"SubjRef,attr"`
}

type Repo

type Repo struct {
	GitUrl    string
	LocalRepo string
	XMLPath   string
}

type SBLGNTSyntax

type SBLGNTSyntax struct {
	Books map[sblgnt.BookName]Book
}

func ParseSyntaxRepo

func ParseSyntaxRepo(cfg Repo) (*SBLGNTSyntax, error)

func (SBLGNTSyntax) LookUp

func (syn SBLGNTSyntax) LookUp(ref commentary.Ref) ([]Sentence, error)

type Sentence

type Sentence struct {
	Ref   string `xml:"ref,attr"`
	ID    string `xml:"ID,attr"`
	Trees []Tree `xml:"Trees>Tree"`
}

NB in the vast majority of cases there will be only one tree; In cases where there are multiple trees, it's different potential parsings of the same sentence, and the first one is preferred.

func (Sentence) Range

func (s Sentence) Range() (bibleref.WordRange, error)

type Tree

type Tree struct {
	Node Node `xml:"Node"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL