Search notes:

Python library: unstructured

from unstructured.partition.auto import partition

import requests
import os

if not os.path.exists('LLM.html'):

   res = requests.get('https://en.wikipedia.org/wiki/Large_language_model')

   if res.status_code != 200:
       print(f'Failed to download the HTML file. Status Code: {res.status_code}')
       os.exit(1)


   with open('LLM.html', 'w', encoding='utf-8') as f:
        f.write(res.text)


elems = partition(filename='LLM.html')

print(f'Text has {len(elems)} elements')

for i, elem in enumerate(elems):
    print(f'{i:>4} {elem}')

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759561883, '216.73.216.149', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Python/libraries/unstructured(53): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78