"use strict";(self.webpackChunkpythonbible_docs=self.webpackChunkpythonbible_docs||[]).push([[9119],{3905:function(e,n,r){r.d(n,{Zo:function(){return f},kt:function(){return d}});var t=r(7294);function o(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function i(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function a(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?i(Object(r),!0).forEach((function(n){o(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function c(e,n){if(null==e)return{};var r,t,o=function(e,n){if(null==e)return{};var r,t,o={},i=Object.keys(e);for(t=0;t<i.length;t++)r=i[t],n.indexOf(r)>=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t<i.length;t++)r=i[t],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=t.createContext({}),l=function(e){var n=t.useContext(s),r=n;return e&&(r="function"==typeof e?e(n):a(a({},n),e)),r},f=function(e){var n=l(e.components);return t.createElement(s.Provider,{value:n},e.children)},p={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},u=t.forwardRef((function(e,n){var r=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,f=c(e,["components","mdxType","originalType","parentName"]),u=l(r),d=o,b=u["".concat(s,".").concat(d)]||u[d]||p[d]||i;return r?t.createElement(b,a(a({ref:n},f),{},{components:r})):t.createElement(b,a({ref:n},f))}));function d(e,n){var r=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=u;var c={};for(var s in n)hasOwnProperty.call(n,s)&&(c[s]=n[s]);c.originalType=e,c.mdxType="string"==typeof e?e:o,a[1]=c;for(var l=2;l<i;l++)a[l]=r[l];return t.createElement.apply(null,a)}return t.createElement.apply(null,r)}u.displayName="MDXCreateElement"},3296:function(e,n,r){r.r(n),r.d(n,{frontMatter:function(){return c},contentTitle:function(){return s},metadata:function(){return l},toc:function(){return f},default:function(){return u}});var t=r(7462),o=r(3366),i=(r(7294),r(3905)),a=["components"],c={sidebar_position:1},s="Find References",l={unversionedId:"howto-basics/find-references",id:"howto-basics/find-references",isDocsHomePage:!1,title:"Find References",description:"Given a text, search for scripture references and return any that are found in a list of NormalizedReferences.",source:"@site/docs/howto-basics/find-references.md",sourceDirName:"howto-basics",slug:"/howto-basics/find-references",permalink:"/docs/howto-basics/find-references",editUrl:"https://github.com/avendesora/pythonbible/edit/main/pythonbible-docs/docs/howto-basics/find-references.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Getting Started",permalink:"/docs/intro"},next:{title:"References -> Verse IDs",permalink:"/docs/howto-basics/convert-references-to-verse-ids"}},f=[],p={toc:f};function u(e){var n=e.components,r=(0,o.Z)(e,a);return(0,i.kt)("wrapper",(0,t.Z)({},p,r,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"find-references"},"Find References"),(0,i.kt)("p",null,"Given a text, search for scripture references and return any that are found in a list of NormalizedReferences."),(0,i.kt)("p",null,"For example, given the following text:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-py"},'import pythonbible as bible\n\ntext = "The parable of the lost sheep is told in Matthew 18:12-14 and Luke 15:3-7."\nreferences = bible.get_references(text)\n')),(0,i.kt)("p",null,"The search functionality should return the following list of scripture references:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"[\n    NormalizedReference(\n        book=<Book.MATTHEW: 40>, \n        start_chapter=18, \n        start_verse=12, \n        end_chapter=18, \n        end_verse=14,\n        end_book=None\n    ),\n    NormalizedReference(\n        book=<Book.LUKE: 42>, \n        start_chapter=15, \n        start_verse=3, \n        end_chapter=15, \n        end_verse=7,\n        end_book=None\n    )\n]\n")))}u.isMDXComponent=!0}}]);