Wikcionario eswiktionary https://es.wiktionary.org/wiki/Wikcionario:Portada MediaWiki 1.47.0-wmf.12 case-sensitive Medio Especial Discusión Usuario Usuario discusión Wikcionario Wikcionario discusión Archivo Archivo discusión MediaWiki MediaWiki discusión Plantilla Plantilla discusión Ayuda Ayuda discusión Categoría Categoría discusión Apéndice Apéndice Discusión Tesauro Tesauro discusión TimedText TimedText talk Módulo Módulo discusión Evento Evento discusión Wikcionario:Café 4 1313 6123396 6123310 2026-07-24T12:25:26Z MediaWiki message delivery 53277 Sección nueva: /* Request for comment (the future of Abstract Wikipedia) */ 6123396 wikitext text/x-wiki <!-- Inicio Encabezado del café, aviso, información histórica y información de archivado --> <div style="text-align: center;"> {{/Aviso}} {{/Histórico}} </div> {{atajo|WN:C}} {{Archivo}} <!-- Fin del Encabezado del café --> <!-- Inicio configuración robot archivado; no tocar si no se sabe lo que se hace --> {{Usuario:MABot/config |archive = Wikcionario:Café/%(year)d %(month)02d |algo = old(30d) |counter = 1 |archiveheader = {{Archivo}} }} <h1>{{MONTHNAME|{{PREVIOUSMONTH}}}} de {{PREVIOUSMONTH.YEAR}}</h1> <div class="mw-archivedtalk"> {{/{{PREVIOUSMONTH.YEAR}} {{PREVIOUSMONTH}}}} </div> <h1>Actual</h1> == Incorporación del enlace «Contactos legales y de seguridad» en el pie de página de vuestra wiki == <section begin="Message"/> '''Contactos legales y de seguridad''' Hola a toda la comunidad: la Fundación Wikimedia ha puesto a vuestra disposición una [[wmf:Special:MyLanguage/Legal:Wikimedia Foundation Legal and Safety Contact Information|página única de contacto sobre cuestiones legales y de seguridad]], que debéis incluir en el pie de página de vuestra wiki para garantizar el acceso a información jurídica precisa. Se trata de un requisito normativo. Ya hemos implementado enlaces a las wikis en inglés, alemán, italiano, español y otros idiomas de Wikipedia, y pronto los implementaremos en vuestra wiki. [[m:Special:MyLanguage/Wikimedia_Foundation_Legal_and_Safety_Contacts_FAQ|Por favor, leed más información en la página del proyecto]] y dejad vuestros comentarios en este hilo o en la [[m:Special:MyLanguage/Talk:Wikimedia Foundation Legal and Safety Contacts FAQ|página de discusión]]. <section end="Message"/> -- [[User:Sannita (WMF)|User:Sannita (WMF)]] ([[User talk:Sannita (WMF)|talk]]) 13:31 25 jun 2026 (UTC) <!-- Mensaje enviado por Usuario:Sannita (WMF)@metawiki mediante la lista en https://meta.wikimedia.org/w/index.php?title=User:Sannita_(WMF)/Mass_sending_test&oldid=30731267 --> == Eliminar "Excepto Australia" == Estimados: Cuando comencé a agregar las transcripciones AFI para Australia pensé que era una buena idea crear "excepto Australia" (190 apariciones) lo que anduvo bien un par de años, pero cuando comencé a agregar las de Nueva Zelanda quedaron obsoletas. Por esa razón, sería aconsejable que un bot reemplazara la PRIMERA aparición de "excepto Australia" por "Received Pronunciation, General American, Canadá". Una vez efectuado lo anterior, me encargaré de corregir la siguiente aparición. Saludos cordiales. [[Usuario:Adelpine|Adelpine]] ([[Usuario discusión:Adelpine|discusión]]) 01:13 26 jun 2026 (UTC) :Hola, @[[Usuario:Adelpine|Adelpine]]. Hecho: [//es.wiktionary.org/w/index.php?title=Especial%3AContribuciones&target=PBbot&namespace=0&tagfilter=&start=2026-06-27&end=2026-06-27&limit=250 contribuciones del bot], [//es.wiktionary.org/w/index.php?limit=250&search=insource%3A%22excepto+Australia%22&title=Especial:Buscar&profile=default&ns0=1 apariciones restantes]. Un saludo, [[Usuario:Peter Bowman|Peter Bowman]] ([[Usuario discusión:Peter Bowman|discusión]]) 10:01 27 jun 2026 (UTC) == Brawlio == Hola, llevo hace un par de días revirtiendo ediciones de este usuario que, si bien no son vandalismo, parecen claros casos de '''impericia'''. Dejo algunos ejemplos: * [[scout]]: agrega ''cernir'' como sinónimo, pero (el DLE lo redirige a ''cerner''), viendo cerner la definición parece más bien algo pasivo, mientras que ''scout'' sería algo más activo. Es cierto que el DLE pone una acepción regional extra en ''cernir'' pero queremos agregar regionalismos en las traducciones? * [[seek]]: lo traduce por ''catear''. Aunque no tiene traducción directa, el término estaría más cerca de ''desear'' o ''anhelar'', por lo que de nuevo no podría ser. * [[tip]]: lo traduce por ''herrón'', y pone que es sinónimo a secas de [[punta]] * [[although]]: agrega [[si que]], no sé a qué se refiere. * [[barely]]: agrega [[no bien]], pero esta última expresión equivale a [[recién]], de ahí que se confunda con [[escasamente]]. * [[mess]]: agrega [[quilombo]] que no está mal, pero otra vez: necesitamos regionalismos en las traducciones? [[Usuario:Brawlio|Brawlio]], como preveo que nos darás más trabajo de cara al futuro, sugiero que te abstengas de seguir haciendo este tipo de ediciones. Hay una lista gigante con un montón de otras tareas que podés hacer si tanto te interesa el proyecto. Y a los moderadores sugiero que tomen cartas en el asunto. No tenemos ninguna política contra la impericia actualmente, pero si sirve, traigo a colación el caso de [[:en:Wiktionary:Tea_room/2025/June#Ungrammatical sentence examples by @JMGN|JMGN en en.wiktionary]] para que vean un extremo de adónde podría llegar la situación. El usuario cree tener un dominio del idioma mayor del que posee, en consecuencia, agrega y enlaza cualquier palabra con otra solamente porque remotamente vio algo como del estilo: A es sinónimo de B, B es sinónimo de C, por lo tanto A es sinónimo de C. En el proceso, se pierde de cualquier contexto acerca de cómo y cuándo se usa cada término y se genera información falsa causada por alucinaciones (similar a las de IA). De hecho, hay una solución muy fácil al problema que consiste en no deducir nada de las fuentes que veas, así no extrapolarás la información segura hacia terrenos equívocos. Después de esto, sugiero que en las políticas que tenemos en donde condenan el vandalismo, se condene también la impericia y la especulación, que de eso hay muy pocas leyes hasta ahora. [[Usuario:Tmagc|Tmagc]] ([[Usuario discusión:Tmagc|discusión]]) 03:41 26 jun 2026 (UTC) :Nota aparte: Por ''impericia'' me refiero exclusivamente a aquella sobre el conocimiento acerca del contenido que se agrega. Quiero decir, aunque no exigimos certificados de nada para contribuir, sí creo que es posible darse cuenta en algunos cuando un usuario pretende saber más de un idioma de lo que conoce. [[Usuario:Tmagc|Tmagc]] ([[Usuario discusión:Tmagc|discusión]]) 03:53 26 jun 2026 (UTC) ::Hola. No veo que sea necesario elevar este asunto al Café, en primer lugar habría dirigido las observaciones anteriores a [[Usuario discusión:Brawlio]] (hace unos días contactaste con él, pero para un asunto diferente). Dicho esto, @[[User:Braulio|Braulio]], ¿comprendes lo que señala Tmagc? Un saludo, [[Usuario:Peter Bowman|Peter Bowman]] ([[Usuario discusión:Peter Bowman|discusión]]) 15:04 26 jun 2026 (UTC) :::Perdón, corrijo el ping: @[[User:Brawlio|Brawlio]]. [[Usuario:Peter Bowman|Peter Bowman]] ([[Usuario discusión:Peter Bowman|discusión]]) 18:45 26 jun 2026 (UTC) ::::sí, creo entenderlo。 [[Usuario:Brawlio|Brawlio]] ([[Usuario discusión:Brawlio|discusión]]) 20:16 26 jun 2026 (UTC) == Clasificadores == Hola. Creo que nos hace falta crear la categoría gramatical de "[[w:Clasificador (lingüística)|Clasificador]]", ya que este tipo de palabras se usa en varios idiomas como el japonés, mandarín y las lenguas mayas. [[Usuario:26agcp|26agcp]] ([[Usuario discusión:26agcp|discusión]]) 21:15 26 jun 2026 (UTC) :@[[Usuario:26agcp|26agcp]] ahí creé la [[Plantilla:clasificador]]. Viste alguna entrada en donde fuera necesario utilizarla? [[Usuario:Tmagc|Tmagc]] ([[Usuario discusión:Tmagc|discusión]]) 22:23 26 jun 2026 (UTC) ::@[[Usuario:Tmagc|Tmagc]] Por ahora la usé en [[jaats]]. Solo que al crear la Categoría:YUA:Clasificadores el módulo no la reconoce. [[Usuario:26agcp|26agcp]] ([[Usuario discusión:26agcp|discusión]]) 00:24 27 jun 2026 (UTC) :::@[[Usuario:26agcp|26agcp]] arreglado, gracias por mencionarlo [[Usuario:Tmagc|Tmagc]] ([[Usuario discusión:Tmagc|discusión]]) 00:57 27 jun 2026 (UTC) == Noticias técnicas: 2026-27 == <section begin="technews-2026-W27"/><div class="plainlinks"> Las últimas '''[[m:Special:MyLanguage/Tech/News|noticias técnicas]]''' desde la comunidad técnica de Wikimedia. Por favor, comenta estos cambios con otros usuarios. No todos los cambios te afectarán. [[m:Special:MyLanguage/Tech/News/2026/27|Traducciones en varios idiomas]] están disponibles. '''Actualizaciones para editores''' * Como parte de los [[mw:Special:MyLanguage/Contributors/Account Creation Experiments|experimentos de Creación de Cuentas]], el equipo de Crecimiento probó agregar el icono de cuenta de usuario en el encabezado para usuarios no registrados, el cual es un acceso directo a las acciones de "Crear una cuenta" e "Iniciar sesión". El experimento aumentó la creación de cuentas en un 20 % sin afectar negativamente la calidad de las ediciones o la tasa de ediciones constructivas. La característica se habilitará en todas las wikis de Fundación Wikimedia en la versión móvil durante la primera semana de julio. [https://phabricator.wikimedia.org/T428220] * Después de un [[phab:T426248|experimento exitoso]], los usuarios registrados que no [[mw:Special:MyLanguage/Help:Email_confirmation|confirmaron su correo electrónico]] al crear la cuenta verán un mensaje que les pedirá finalizar el proceso. Esto ayudará a reducir el riesgo de que los usuarios pierdan el acceso a su cuenta y permitirá que las cuentas de correo electrónico sean más fiables. Esto forma parte del proyecto de [[mw:Special:MyLanguage/Product Safety and Integrity/Account Security|Seguridad de Cuentas]]. [https://phabricator.wikimedia.org/T428292] * Una actualización en [[Special:Search|Buscar]] está refinando el comportamiento de <bdi lang="zxx" dir="ltr"><code><nowiki>-prefix:</nowiki></code></bdi> cuando se utiliza para excluir resultados. Anteriormente, el uso de <bdi lang="zxx" dir="ltr"><code><nowiki>-prefix:</nowiki></code></bdi> con negación podía ampliar involuntariamente los resultados de búsqueda al añadir los espacios de nombres incluidos en el alcance de la búsqueda, lo que generaba un comportamiento confuso para los usuarios que esperaban un filtro de exclusión directo. Con la actualización, <bdi lang="zxx" dir="ltr"><code><nowiki>-prefix:</nowiki></code></bdi> ahora excluirá estrictamente los títulos de página coincidentes según lo previsto y podría mostrar una advertencia si el espacio de nombres correspondiente no se ha seleccionado explícitamente. Sin embargo, el comportamiento de <bdi lang="zxx" dir="ltr"><code><nowiki>prefix:</nowiki></code></bdi> sin negación se mantiene sin cambios. [https://phabricator.wikimedia.org/T427443] * [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Elemento recurrente]] Revisa las {{formatnum:33}} {{PLURAL:33|tarea enviada|tareas enviadas}} por la comunidad que fueron [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resueltas la semana pasada]]. Por ejemplo, se solucionó un error por el cual los revisores que utilizaban la barra de herramientas de curación de páginas (Page Curation) no se suscribían automáticamente a las discusiones que iniciaban en las páginas de discusión. Ahora, los revisores recibirán notificaciones cuando alguien responda a esos hilos. [https://phabricator.wikimedia.org/T329346] '''Actualizaciones para los colaboradores técnicos''' * A partir del 29 de junio, las descargas automáticas desde el sitio web dumps.wikimedia.org estarán sujetas a la [[Foundation:Special:MyLanguage/Policy:Wikimedia Foundation User-Agent Policy|política de agentes de usuario]] (user-agent). Las solicitudes automáticas provenientes de un agente de usuario genérico o vacío serán bloqueadas. El acceso a los volcados mediante Wikimedia Cloud Services se mantendrá sin cambios. Esto forma parte del anuncio realizado en las [[m:Special:MyLanguage/Tech/News/2026/25|Noticias Técnicas 2026/25]]. * [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Elemento recurrente]] Actualizaciones detalladas de código de esta semana: [[mw:MediaWiki 1.47/wmf.9|MediaWiki]] ''Las '''[[m:Special:MyLanguage/Tech/News|Noticias Técnicas]]''' son preparadas por [[m:Special:MyLanguage/Tech/News/Writers|los escritores de Noticias Técnicas]] y publicadas con un [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]]&nbsp;• [[m:Special:MyLanguage/Tech/News#contribute|Colabore]]&nbsp;• [[m:Special:MyLanguage/Tech/News/2026/27|traduzca]]&nbsp;• [[m:Tech|obtenga ayuda]]&nbsp;• [[m:Talk:Tech/News|denos su opinión]]&nbsp;• [[m:Global message delivery/Targets/Tech ambassadors|suscríbase o cancele su suscripción]].'' </div><section end="technews-2026-W27"/> <bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 11:48 29 jun 2026 (UTC) <!-- Mensaje enviado por Usuario:STei (WMF)@metawiki mediante la lista en https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30744833 --> == Noticias técnicas: 2026-28 == <section begin="technews-2026-W28"/><div class="plainlinks"> Las últimas '''[[m:Special:MyLanguage/Tech/News|noticias técnicas]]''' desde la comunidad técnica de Wikimedia. Por favor, comenta estos cambios con otros usuarios. No todos los cambios te afectarán. [[m:Special:MyLanguage/Tech/News/2026/28|Traducciones en varios idiomas]] están disponibles. '''Actualizaciones para editores''' * [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Elemento recurrente]] Revisa las {{formatnum:34}} {{PLURAL:34|tarea enviada|tareas enviadas}} por la comunidad que fueron [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resueltas la semana pasada]]. Por ejemplo, se solucionó un problema por el que los resultados en la barra de búsqueda de Wikidata se mostraban en inglés en lugar de usar el idioma correcto para los usuarios con variantes de idiomas. Las sugerencias de búsqueda ahora siguen la cadena de idiomas. [https://phabricator.wikimedia.org/T429769] '''Actualizaciones para los colaboradores técnicos''' * En preparación para [[m:Special:MyLanguage/Event:Celebrate Women|la campaña Celebrate Women]] planeada para marzo de 2027, el [[m:Special:MyLanguage/Wikimedia Foundation/Advancement/Community Growth/Content Enablement|equipo de Habilitación de Contenidos]] de la Fundación Wikimedia lanzó una encuesta de 22 preguntas para comprender mejor las contribuciones técnicas realizadas por mujeres+ (cualquier persona que se identifique como mujer) en los proyectos Wikimedia. La encuesta toma entre 15 y 20 minutos en ser contestada y se mantendrá abierta hasta el 20 de julio de 2026. Las [[m:Special:MyLanguage/Celebrate Women/Technical contributions survey|preguntas]] también están disponibles en la wiki para que se revisen anticipadamente. * La [[mw:Special:MyLanguage/Extension:Score|extensión Score]] ahora soporta el renderizado de partituras musicales en SVG, además de PNG, implementando una [[:phab:T49578|solicitud de mejora]] bastante antigua y resolviendo, además, los problemas de calidad de imagen. Ambos formatos se proveen a los clientes con PNG en el atributo <bdi lang="zxx" dir="ltr"><code><nowiki>src</nowiki></code></bdi> y SVG en el atributo <bdi lang="zxx" dir="ltr"><code><nowiki>srcset</nowiki></code></bdi>. * El nuevo parser [[wikitech:Parsoid|Parsoid]] [[mw:Special:MyLanguage/Parsoid/Parser_Unification/Updates|continúa su implementación en wikis adicionales]], lo que facilita añadir nuevas funciones de lectura y edición. Fue habilitado en la Wikipedia en francés, dejando el progreso total en un 78,9 % de las visitas a Wikipedia. El lanzamiento de la versión de escritorio en la Wikipedia en inglés se realizará esta semana. * [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Elemento recurrente]] Actualizaciones detalladas de código de esta semana: [[mw:MediaWiki 1.47/wmf.10|MediaWiki]] '''A fondo''' * El [[diffblog:2026/06/29/wikimedia-hackathon-2026-building-collaborating-and-shaping-the-future-together/|post de recapitulación]] de la Wikimedia Hackathon 2026 ya está disponible. En él se resumen los proyectos, las sesiones y las actividades sociales del evento de este año y se comparten los planes iniciales para la Wikimedia Hackathon de 2027. ''Las '''[[m:Special:MyLanguage/Tech/News|Noticias Técnicas]]''' son preparadas por [[m:Special:MyLanguage/Tech/News/Writers|los escritores de Noticias Técnicas]] y publicadas con un [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]]&nbsp;• [[m:Special:MyLanguage/Tech/News#contribute|Colabore]]&nbsp;• [[m:Special:MyLanguage/Tech/News/2026/28|traduzca]]&nbsp;• [[m:Tech|obtenga ayuda]]&nbsp;• [[m:Talk:Tech/News|denos su opinión]]&nbsp;• [[m:Global message delivery/Targets/Tech ambassadors|suscríbase o cancele su suscripción]].'' </div><section end="technews-2026-W28"/> <bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 13:57 6 jul 2026 (UTC) <!-- Mensaje enviado por Usuario:STei (WMF)@metawiki mediante la lista en https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30773578 --> == Noticias técnicas: 2026-29 == <section begin="technews-2026-W29"/><div class="plainlinks"> Las últimas '''[[m:Special:MyLanguage/Tech/News|noticias técnicas]]''' desde la comunidad técnica de Wikimedia. Por favor, comenta estos cambios con otros usuarios. No todos los cambios te afectarán. [[m:Special:MyLanguage/Tech/News/2026/29|Traducciones en varios idiomas]] están disponibles. '''Actualizaciones para editores''' * La [[mw:Special:MyLanguage/Growth/Revise_Tone|Revisión de Tono]] ayuda a personas recién llegadas a identificar pasajes de los artículos de Wikipedia que podrían contener lenguaje no enciclopédico y les anima a revisar el tono. La funcionalidad fue probada mediante [[w:en:A/B_testing|una prueba A/B]] en las Wikipedias en árabe, inglés, francés y portugués, donde la tasa de finalización de edición [[mw:Special:MyLanguage/Growth/Revise_Tone#Experiment_Results|aumentó en un 38,7 %]] en comparación con las tareas de Copyedit, sin que se detectara una disminución en la calidad de la edición. La prueba finalizó el 9 de julio y la funcionalidad estará disponible para todas las personas de esas wikis, configurable mediante la Configuración Comunitaria. [[phab:T426364|El plan]] es lanzar la Revisión de Tono en más wikis. * La Configuración Comunitaria que permite la [[mw:Special:MyLanguage/Help:Growth/Mentorship#Automated mentor list cleanup|eliminación automática de mentores inactivos]] basada en criterios configurables se habilitará el jueves 16 en [[mw:Special:MyLanguage/Growth/Deployment|algunas wikis]] para mantener actualizadas las listas de mentores. Los mentores son editores experimentados que se autoincluyen en una lista para ayudar a usuarios nuevos en la wiki mediante las [[mw:Special:MyLanguage/Growth/Feature summary|características de Crecimiento]]. Los administradores pueden preparar la configuración en [[w:Special:CommunityConfiguration/Mentorship|Special:CommunityConfiguration/Mentorship]]; tendrá efecto a partir del jueves. * [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Elemento recurrente]] Revisa las {{formatnum:38}} {{PLURAL:38|tarea enviada|tareas enviadas}} por la comunidad que fueron [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resueltas la semana pasada]]. Por ejemplo, se ha solucionado un problema en el que algunos usuarios de la aplicación de Wikipedia para Android se desconectaban inmediatamente después de iniciar sesión, lo que impedía que permanecieran conectados y editaran páginas. [https://phabricator.wikimedia.org/T316916] '''Actualizaciones para los colaboradores técnicos''' * Editar una página mediante scripts o gadgets de usuario hacía que las etiquetas de la lista de vigilancia que el usuario había asignado a esa página se restablecieran. Esto ya ha sido arreglado. [https://phabricator.wikimedia.org/T423778] * Para evitar un fallo en Safari (revisa [[phab:T425211]]), en las wikis con Parsoid habilitado, los href de los wikienlaces usando urls absolutas en lugar de urls relativas de protocolo. La salida de la API REST se mantendrá sin cambios y continuará usando las urls relativas de protocolo. Los accesorios, scripts de usuarios, bots y CSS podrían necesitar adaptación si necesitan la presencia de urls relativas de protocolo en los href de los wikienlaces. [https://phabricator.wikimedia.org/T431358] * [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Elemento recurrente]] Actualizaciones detalladas de código de esta semana: [[mw:MediaWiki 1.47/wmf.11|MediaWiki]] '''A fondo''' * El equipo de Experimentos de Plataforma de la Fundación Wikimedia publicó un post que muestra su primer año de experimentación estructurada. Revisan los experimentos exitosos, como la Comprobación de Pegado, Comprobación de Referencias y Comprobación de Tono, los cuales han mejorado las ediciones y han sido desplegados a más usuarios, así como los experimentos que no han sido implementados. [[diffblog:2026/07/07/moving-the-needle-how-we-test-new-ideas-across-wikimedia-projects|Lee más]] ''Las '''[[m:Special:MyLanguage/Tech/News|Noticias Técnicas]]''' son preparadas por [[m:Special:MyLanguage/Tech/News/Writers|los escritores de Noticias Técnicas]] y publicadas con un [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]]&nbsp;• [[m:Special:MyLanguage/Tech/News#contribute|Colabore]]&nbsp;• [[m:Special:MyLanguage/Tech/News/2026/29|traduzca]]&nbsp;• [[m:Tech|obtenga ayuda]]&nbsp;• [[m:Talk:Tech/News|denos su opinión]]&nbsp;• [[m:Global message delivery/Targets/Tech ambassadors|suscríbase o cancele su suscripción]].'' </div><section end="technews-2026-W29"/> <bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 16:11 13 jul 2026 (UTC) <!-- Mensaje enviado por Usuario:STei (WMF)@metawiki mediante la lista en https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30804401 --> == No funciona el buscador de anagramas == Desde este viernes el buscador de anagramas lanza, al hacer cualquier búsqueda, el siguiente error: <code>Lo sentimos, hubo un error en el servidor :(</code>--[[Usuario:Jemily1|Jemily1]] ([[Usuario discusión:Jemily1|discusión]]) 11:53 18 jul 2026 (UTC) :Solucionado, por ahora. La tarea se volverá a ejecutar en un mes, así que tendremos que estar atentos si vuelve a fallar. Saludos. [[Usuario:Tmagc|Tmagc]] ([[Usuario discusión:Tmagc|discusión]]) 17:08 18 jul 2026 (UTC) == Noticias técnicas: 2026-30 == <section begin="technews-2026-W30"/><div class="plainlinks"> Las últimas '''[[m:Special:MyLanguage/Tech/News|noticias técnicas]]''' desde la comunidad técnica de Wikimedia. Por favor, comenta estos cambios con otros usuarios. No todos los cambios te afectarán. [[m:Special:MyLanguage/Tech/News/2026/30|Traducciones en varios idiomas]] están disponibles. '''Actualizaciones para editores''' * El [[mw:Special:MyLanguage/Reader/Reader Experience|equipo de Experiencia de Lectores]] incorporó la retroalimentación de la comunidad acerca de la posición de la estrella y los botones de la lista de seguimiento para la [[mw:Special:MyLanguage/Readers/Reader Experience/WE3.3.4 Reading lists|función beta de Listas de Lectura]], la que permite guardar artículos para leerlos más tarde — un elemento de la [[m:Special:MyLanguage/Community Wishlist/W102|lista de deseos]] que lleva la funcionalidad a la web. Los editores están invitados a habilitar esta funcionalidad beta para probarla y [[phab:T426453|compartir sus ideas]]. * El [[mw:Special:MyLanguage/VisualEditor/Suggestion Mode|Modo de Sugerencia]] ofrece sugerencias de edición en el Editor Visual para mejorar los artículos de Wikipedia. [[Special:EditChecks|Todas las sugerencias]] son [[mw:Special:MyLanguage/Help:Suggestion mode#For administrators – local customization|configurables por la comunidad]]. La función [[mw:Special:MyLanguage/Edit check/TextMatch|TextMatch]] es una forma para que los voluntarios puedan crear sugerencias locales. La funcionalidad busca en el artículo cadenas de texto y ahora incluye expresiones regulares. Esto da mayor flexibilidad a los voluntarios sobre los tipos de sugerencias locales que pueden crear. Nota: Las sugerencias [[mw:Special:MyLanguage/Edit check/Configuration#:~:text=maximumEditcount|pueden ser dirigidas]] a usuarios basados en el contador de ediciones, así como a aspectos de la página. Pueden [[mw:Special:MyLanguage/Help:Suggestion mode#Create custom local types of Suggestions|encontrar ejemplos de otras comunidades]] para inspirarse que incluyen el uso de TextMatch: errores de tipeo, errores gramaticales, potenciales anuncios, clichés, usos incorrectos de guiones, palabras poco específicas en ciertos contextos temporales, nombres desactualizados y más. Cualquier [[mw:Special:MyLanguage/Talk:VisualEditor/Suggestion Mode|retroalimentación]] es apreciada. * [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Elemento recurrente]] Revisa las {{formatnum:27}} {{PLURAL:27|tarea enviada|tareas enviadas}} por la comunidad que fueron [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resueltas la semana pasada]]. Por ejemplo, se solucionó un error por el cual la herramienta de traducción de SVG (SVG Translate) podía utilizar una versión desactualizada de un archivo, lo que provocaba que las traducciones existentes se sobrescribieran al subir nuevas versiones; esto ahora [[phab:T430577|ha sido corregido]]. En general, durante el último trimestre (de abril a junio de 2026), la Fundación Wikimedia resolvió cerca de 337 tareas comunitarias. '''Actualizaciones para los colaboradores técnicos''' * En las wikis con Parsoid habilitado, Parsoid ahora procesa un máximo de 1250 imágenes por página. Pronto estará disponible una nueva categoría de seguimiento, «media-limit-reached», para identificar las páginas donde se alcance este límite, lo que facilitará la localización de contenidos cuyo despliegue de archivos multimedia haya sido restringido durante el renderizado. Consulta [[phab:T430854]] para obtener más información y dejar sus comentarios. * [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Elemento recurrente]] Actualizaciones detalladas de código de esta semana: [[mw:MediaWiki 1.47/wmf.12|MediaWiki]] ''Las '''[[m:Special:MyLanguage/Tech/News|Noticias Técnicas]]''' son preparadas por [[m:Special:MyLanguage/Tech/News/Writers|los escritores de Noticias Técnicas]] y publicadas con un [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]]&nbsp;• [[m:Special:MyLanguage/Tech/News#contribute|Colabore]]&nbsp;• [[m:Special:MyLanguage/Tech/News/2026/30|traduzca]]&nbsp;• [[m:Tech|obtenga ayuda]]&nbsp;• [[m:Talk:Tech/News|denos su opinión]]&nbsp;• [[m:Global message delivery/Targets/Tech ambassadors|suscríbase o cancele su suscripción]].'' </div><section end="technews-2026-W30"/> <bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 05:46 21 jul 2026 (UTC) <!-- Mensaje enviado por Usuario:STei (WMF)@metawiki mediante la lista en https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30836091 --> == Request for comment (the future of Abstract Wikipedia) == <bdi lang="en" dir="ltr" class="mw-content-ltr"> Apologies if this has not yet been translated into your wiki's language. {{int:Please-translate}} You are invited to voice your opinions in a [[:m:Requests for comment/The future of Abstract Wikipedia|request for comment about the future of Abstract Wikipedia]]. {{Int:Feedback-thanks-title}} [[:m:User:Kowal2701|Kowal2701]] ([[:m:User talk:Kowal2701|talk]]) 12:25 24 jul 2026 (UTC) </bdi> <!-- Mensaje enviado por Usuario:DreamRimmer@metawiki mediante la lista en https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=30513860 --> si88td5n9z7s7iyz3mdvjtce98rxvlr haber 0 2515 6123554 5916598 2026-07-25T05:01:15Z Tmagc 158167 /* {{sustantivo masculino|es}} */ 6123554 wikitext text/x-wiki {{desambiguación|Haber|håber}} == {{lengua|es}} == {{pron-graf}} {{definición}} === Etimología 1 === {{etimología|osp|aver|haber}}, y este {{etim|la|habeo}}. Compárense el aragonés {{l+|an|aber}} y el asturiano {{l+|ast|haber}}. ==== {{verbo auxiliar|es}} ==== ;1: {{impropia|Se combina con el [[participio]] de otros verbos para conjugarlos en los [[tiempo]]s [[compuesto]]s}}. {{uso|va ante participio}} {{ejemplo|Ya ''hemos'' llegado.}} ;2: {{impropia|Se utiliza con el [[infinitivo]] para expresar una acción futura o la necesidad, obligación o conveniencia de hacer algo}}. {{uso|se une al verbo en infinitivo con la conjunción ''que'' o con la preposición ''de''|en este sentido es terciopersonal y en presente de indicativo toma la forma especial ''hay''}} {{ejemplo|''Has'' de saber que la vida está llena de sorpresas. No ''habré'' de negarte eso. ''Hay'' que tolerar las diferencias. ''Hubo'' que mandar el coche al taller.}} ==== {{verbo impersonal|es}} ==== ;3: {{impropia|Indica la existencia de algo}}. {{plm|estar}} o [[existir]] en alguna parte. {{uso|funciona como terciopersonal|es decir|solamente se conjuga en tercera persona del singular|en presente de indicativo toma la forma especial ''hay''|es también impersonal|es decir|carece de sujeto explícito|siendo el sustantivo un complemento directo|razón por la cual en todos los tiempos se utiliza únicamente la conjugación de la tercera persona en singular}} {{ejemplo|''habrá'' comidas y bebidas (decir "''*habrán'' comidas y bebidas" se considera incorrecto, porque "comidas y bebidas" no es el sujeto, sino el objeto directo). ''Hay'' mucha gente en la reunión.}} ;4: Tener lugar, [[ocurrir]], [[suceder]], [[hacer]]se, [[realizar]]se o [[ejecutar]]se un [[hecho]] o [[evento]]. {{uso|funciona como terciopersonal|siempre en singular}} {{ejemplo|Mañana ''habrá'' una reunión para clarificar los desórdenes que ''hubo'' en la plaza del pueblo.}} ;5: {{impropia|Indica la acumulación o cumplimiento de una medida de tiempo}}. {{uso|infrecuente}}. Funciona como [[terciopersonal]], siempre en singular. {{relacionado|hacer}}. {{ejemplo|Hoy ''ha'' diez años que murió la abuela. En octubre ''habrá'' un año que comenzó sus estudios universitarios.}} ==== {{verbo transitivo|es}} ==== ;6: {{plm|poseer}}, tener propiedad o llegar a tener algo en poder de uno. {{sinónimo|poseer|tener}}. {{uso|obsoleto|literario|defectivo}}, casi nunca [[conjugar|conjugado]]. {{ejemplo|Jorgito coleccionaba cuantas piedras pudiera ''haber''.}} ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;7: {{plm|conjunto}} de [[bien]]es, [[posesión|posesiones]] o [[derecho]]s que [[poseer|posee]] alguien.<ref name="drae">{{DRAE2001}}</ref> {{uso|se emplea con más frecuencia en plural}} {{relacionado|caudal|hacienda|patrimonio}}. {{ejemplo|Tiene una fortuna en su ''haber''.}} ;8: {{plm|cantidad}} que se [[recibir|recibe]] en [[retribución]] o [[pago]] por [[servicio]]s prestados.<ref name="drae" /> {{uso|infrecuente}}, se emplea más en plural. {{relacionado|estipendio|ingreso|salario|sueldo}}. {{ejemplo|Sus ''haberes'' son suficientes para cubrir sus gastos mensuales.}} ;9 {{csem|finanzas}}: {{plm|columna}} o [[sección]] en que se [[anotar|anotan]] las [[entrada]]s, [[ingreso]]s o [[crédito]]s.<ref name="drae" /> {{antónimo|debe}} ;10: Conjunto de [[mérito]]s o [[cualidad]]es, en contraste con los [[defecto]]s o [[desventaja]]s de alguien o algo.<ref name="drae" /> {{antónimo|debe}} ==== Conjugación ==== {{es.v|impersonal=umc3|nota=El modo imperativo es aplicable solo con el ya obsoleto sentido transitivo de ''[http://lema.rae.es/dpd/apéndice/apéndice1.html#n35 tener]''. Las formas ''habe'' y ''habed'' heredadas del latín no tienen ningún uso en la actualidad. La forma ''he'' en imperativo se emplea en expresiones literarias o arcaicas como "''He'' aquí al hombre" (aquí tienes/tenés/tienen/tenéis al hombre).}} ==== Locuciones ==== {{trad-arriba|Locuciones con ''haber''}} * [[haber que]]: Manera de conminar imperativamente a hacer algo. Se acompaña siempre de un verbo en infinitivo. * [[lo habido y por haber]]: De todo, toda clase de cosas o asuntos posibles. * [[no haber de qué]]: No existir causa o motivo para algo, carecer de dinero. Se emplea como expresión de cortesía como equivalente a ''[[de nada]]''. * [[no haber más que]] (más infinitivo): Lo único que hace falta es; una vez hecho lo indicado en infinitivo, ocurrirá. * [[no haber más que pedir]]: Basta con pedir, y el deseo se cumplirá. * [[no haber por dónde agarrar]], o [[no haber por dónde coger]] algo o a alguien: Ser de características extremas (mala calidad, ningún defecto, excesivos melindres, etc.); [[no tener por dónde agarrar]] o [[no tener por dónde coger]] algo o a alguien. * [[no haber tal]]: ser falso, no tener base o fundamento. * [[no haya más]]: expresión para dar fin a una disputa o discusión. * [[si los hay]]: expresión para dar énfasis a una calificación: Es muy generoso, ''si los hay''. * [[haberes pasivos]] (Derecho): Dinero destinado a la [[pensión]] de empleados públicos. * [[haber monedado]]: conjunto del dinero o caudal que posee alguien. * [[soldado de haber]]: persona que sirve en el [[ejército]], en categoría de [[soldado]], de manera [[fijo|fija]], en oposición a quien sirve temporalmente (soldado de cuota). * [[esto es lo que hay]]: no tener opción. * [[ser lo que hay]] {{trad-abajo}} {{trad-arriba|Refranes con ''haber''}} * [[de todo hay en la viña del Señor]] {{trad-abajo}} ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{t|ain|a1=3|t1=アン|t2=アㇴ|t3=オカィ}} {{t|de|a1=1|t1=haben|a2=3|t2=es gibt|a3=2|t3=man muss}} {{t|an|a1=1|t1=aber}} {{t|co|a1=1|t1=avè}} {{t|sl|a1=1|t1=imeti}} {{t|ext|a1=1-5|t1=avel/vel}} {{t|fr|a1=1|t1=avoir|a2=2|t2=y avoir}} {{t|gl|a1=1|t1=haber}} {{t|la|a1=1|t1=habere}} {{t|en|a1=1,3|t1=have|a2=2|t2=there is}} {{t|it|a1=1|t1=avere|a2=2|t2=c'è}} {{t|ja|i1=s|t1=ある}} {{t|arn|a1=2|t1=nge}} {{t|nl|a1=1|t1=hebben}} {{t|pt|a1=1|t1=haver}} {{t|scn|a1=1|t1=aviri}} {{t|sa|a1=3-4|t1=अस्ति}} {{trad-abajo}} === Etimología 2 === {{etimología|la|debet habere|glos=debe tener}}. ==== {{sustantivo masculino|es}} ==== ;1 {{csem|contabilidad}}: {{plm|erogación}} de una empresa ó disminución del activo de la empresa. ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == {{lengua|ast}} == {{pron-graf|leng=ast}} === Etimología 1 === {{etimología|leng=ast|roa-ole|aver|haber}}, y este {{etim|leng=ast|la|habeo}}. ==== {{verbo auxiliar|ast}} ==== ;1: {{plm}}. ==== {{verbo impersonal|ast}} ==== ;2: {{plm}}. ==== Conjugación ==== {{ast.v}} == {{lengua|gl}} == {{pron-graf|leng=gl}} === Etimología 1 === {{etimología|leng=gl|roa-opt|aver|haber}}, y este {{etim|leng=gl|la|habeo}}. ==== {{verbo auxiliar|gl}} ==== ;1: {{plm}}. ==== Conjugación ==== {{gl.v}} == {{lengua|ia}} == {{pron-graf|leng=ia|1fone1=ha.ˈbɛr}} === Etimología 1 === {{etimología|leng=ia|es|haber}}. ==== {{verbo|ia}} ==== ;1: {{plm}}. == {{lengua|lad}} == {{pron-graf|leng=lad|g1=חאביר}} === Etimología 1 === {{etimología|leng=lad|ota|خبر|tr=haber|noticias}} (comparése el turco {{l+|tr|haber}}), {{etim|leng=lad|ar|خبر}}. ==== {{sustantivo masculino|lad}} ==== ;1: {{plm|noticia}}s (nueva {{l|es|información}}). == Referencias y notas == <references /> klcy3hjbymp47w29nzhx3nwvmi38d7t mañana 0 9030 6123463 6078132 2026-07-24T20:12:32Z Charlyfar 7832 /* Locuciones */ 6123463 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología 1 === {{etimología|osp|mannana}}, {{etim|la-vul|*hora māneāna|por la mañana}}, {{etim|la|mane|alt=māne||la|-anum|-ānum}}. Desplazó al clásico [[cras]]. ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1: {{plm|lapso}} que transcurre desde la [[salida]] del [[sol]] hasta el [[mediodía]]. {{ejemplo|por la '''mañana'''.}} {{ejemplo|mañana por la '''mañana'''.}} {{ejemplo|Estudia en las '''mañanas'''.}} {{ejemplo|A ver...el museo abre a las nueve de la '''mañana'''.}} ;2: Más generalmente, tiempo que transcurre desde la [[medianoche]] hasta el mediodía. {{hipónimo|madrugada}} {{ejemplo|Estoy despierto desde las tres de la '''mañana'''.}} ==== {{sustantivo masculino|es}} ==== ;3: {{plm|período}} [[futuro]] en general. {{sinónimos|porvenir}}. {{ejemplo|Nadie sabe lo que el ''[[mañana]]'' prepara para la vida de las personas.}} ==== {{adverbio de tiempo|es}} ==== ;4: {{plm|día}} que sigue al de [[hoy]]. {{ejemplo|Tengo que trabajar '''mañana'''.}} {{ejemplo|'''mañana''' por la mañana.}} {{ejemplo|'''mañana''' por la noche.}} ==== Locuciones ==== * [[hasta mañana]]: frase de despedida común y de trato familiar entre dos personas que pueden encontrarse nuevamente al día siguiente. * [[mañana o pasado]] o [[el día de mañana]]: en el futuro. * [[pasado mañana]]: día que sigue inmediatamente al día de mañana. Dentro de dos días. ==== Refranes ==== * [[no dejes para mañana lo que puedes hacer hoy]] ==== Véase también ==== {{w}} {{Wikiquote}} ==== Traducciones ==== {{trad-arriba|Sustantivo femenino}} {{t|ar|t1=صباح|tl1=sabaj}} {{t|de|t1=Morgen|g1=m}} {{t|ast|t1=mañana|g1=f}} {{t|br|t1=mintin|g1=m}} {{t|br|t1=beure}} {{t|ca|t1=matí|g1=m}} {{t|sai-chn|t1=huelcaimár|t2=uelcaimár}} {{t|zh|t1=早晨}} {{t|zh|t1=上午}} {{t|sl|t1=jutro|g1=n}} {{t|eu|a1=1,2|t1=goiz}} {{t|fo|t1=morgun}} {{t|fi|t1=aamu}} {{t|fr|t1=matin|g1=m}} {{t|gl|t1=mañá|g1=f}} {{t|el|t1=πρωί|g1=n|t2=αύριο}} {{t|he|t1=בוקר}} {{t|id|t1=pagi}} {{t|en|t1=morning}} {{t|ia|t1=matino}} {{t|it|t1=mattina|g1=m}} {{t|yua|t1=jaʼatskab kʼiin}} {{t|ja|a1=1-2|t1=朝}} {{t|nl|t1=morgen|g1=m|t2=ochtend|g2=m}} {{t|nb|g1=m|t1=morgen}} {{t|nn|t1=morgen|g1=m}} {{t|pt|t1=manhã|g1=f}} {{t|ru|t1=утро}} {{t|sv|t1=morgon|g1=c}} {{t|tr|t1=sabah}} {{trad-abajo}} {{trad-arriba|Sustantivo masculino}} {{t|fr|t1=avenir|g1=m|t2=endemain|g2=m}} {{t|he|t1=עתיד|g1=m}} {{t|en|t1=future}} {{t|it|t1=avvenire|g1=m|t2=futuro|g2=m}} {{t|ja|a1=3|t1=明日}} {{trad-abajo}} {{trad-arriba|Adverbio}} {{t|ain|t1=ニサッタ|t2=ニシャッタ}} {{t|de|t1=morgen}} {{t|ar|t1=غدًا}} {{t|ast|t1=mañana}} {{t|br|t1=arc'hoazh|t2=warc'hoazh}} {{t|bg|t1=утре}} {{t|cs|t1=zítra}} {{t|ko|t1=내일}} {{t|da|t1=imorgen}} {{t|sh|t1=sutra сутра}} {{t|sk|t1=zajtra}} {{t|sl|t1=jutri}} {{t|eo|t1=morgaŭ}} {{t|eu|t1=bihar}} {{t|fi|t1=huominen}} {{t|fr|t1=demain|g1=m}} {{t|el|t1=αύριο}} {{t|ha|t1=gobe}} {{t|haw|t1=ʻapōpō}} {{t|he|a1=4|t1=מחר|tl1=majar}} {{t|hu|t1=holnap}} {{t|id|t1=besok|t2=esok}} {{t|en|t1=tomorrow}} {{t|ia|t1=deman}} {{t|it|t1=domani}} {{t|ja|t1=明日}} {{t|ja|t1=あした}} {{t|ja|t1=あす}} {{t|kzg|a1=4|t1=明日|t2=あちゃ}} {{t|la|t1=cras}} {{t|lt|t1=rytojus|g1=m|t2=rytdiena|g2=f}} {{t|lt|t1=rytoj}} {{t|mt|a1=4|t1=għada}} {{t|zh|t1=明天}} {{t|yua|t1=sáamal}} {{t|nci|t1=moztlah}} {{t|nch|t1=mostla}} {{t|nhe|t1=mostlah}} {{t|nlv|t1=mostla}} {{t|nl|t1=morgen}} {{t|nb|t1=imorgen}} {{t|nb|t1=i morgen}} {{t|nn|t1=i morgen}} {{t|pl|t1=jutro}} {{t|pt|t1=amanhã|g1=m}} {{t|ro|t1=mâine|g1=n}} {{t|ru|t1=завтра}} {{t|so|a1=4|t1=aroor}} {{t|sv|t1=i morgon}} {{t|sw|a1=4|t1=kesho}} {{t|th|t1=พรุ่งนี้}} {{t|tt|t1=irtege}} {{t|tr|t1=yarın}} {{t|uk|t1=завтра}} {{trad-abajo}} == Referencias y notas == <references /> 3y6a9woow0rcwbi1luzs5ltkte1x7pt paloma 0 22579 6123439 6058468 2026-07-24T15:52:56Z Tmagc 158167 /* Etimología 1 */ 6123439 wikitext text/x-wiki {{desambiguación|Paloma}} == {{lengua|es}} == {{pron-graf|h1=Paloma}} [[Archivo:Patagioenas maculosa -Argentina-8.jpg|thumb|[1]]] [[Archivo:Check_mark.svg|right|thumb|150px|[6]]] === Etimología 1 === {{etimología|la|palumba}}, y este de {{l+|la|palumbus}}, {{l+|la|palumbres|alt=palumbēs}}, modificado por analogía con {{l+|la|columba}}. Compárese el griego antiguo {{l+|grc|πέλεια|tl=péleia|glosa=paloma bravia}}. La correspondiente raíz indoeuropea sería probablemente {{l+|ine-pro|*peh₁l-}}.<ref>{{referencia|p=442|f=2008|c=libro|a=de Vaan, Michiel|t=Etymological Dictionary of Latin and the Other Italic Languages|l=Leiden|editorial=Brill}}</ref> ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1 {{csem|aves}}: (familia ''Columbiformes'') Cualquiera de unas trescientas especies de [[ave]]s [[columbiforme]]s distribuidas por todo el [[globo]], de [[cuerpo]] y [[cuello]] robustos y [[pico]] [[delgado]] y [[corto]], con [[cera]]s carnosas, [[combado]] en la [[punta]] [[superior]] y adaptado a su [[hábito]] [[frugívoro]]. Son [[domesticable]]s y muchas veces [[comensal]]es del [[ser humano]]. {{hipónimo|cucule|pichón|torcaza|tórtola|zurita}} ;2 {{csem|aves}}: (''Columba livia'' f. ''domestica'') En particular, la paloma doméstica, criada desde la remota [[Antigüedad]] por su [[carne]], como [[mensajero|mensajera]] y como [[ornamental]], existiendo numerosas [[variedad]]es de [[vistoso]] [[plumaje]]. ;3: Figuradamente, [[persona]] [[pacífico|pacífica]] y [[mesurado|mesurada]]. ;4: En especial, [[pacifista]] [[militante]]. {{antónimo|halcón}} ;5: {{plm|petardo}} [[triangular]] de [[papel]] y [[pólvora]]. {{ámbito|México}} ;6: {{plm|signo}} [[gráfico]] que indica [[aprobación]] o [[verificación]]. {{ámbito|México}} {{sinónimo|cotejo|tic|visto|visto bueno}} ;7 {{csem|bebida}}: {{plm|bebida}} [[refrescante]] hecha de [[agua de selz]] y [[anís]]. {{ámbito|?}} ;8: {{plm|órgano}} [[eréctil]] que presenta el macho de los [[mamífero]]s, homólogo del [[clítoris]] femenino, en el que desembocan los conductos del [[tracto]] [[genitourinario]]. En algunos animales se retrae en la ingle, y sólo se extiende durante la [[excreción]] y la [[cópula]]; en el ser humano no es retráctil. Está compuesto en su mayor parte por tejidos esponjosos, llamados [[cuerpo cavernoso|cuerpos cavernosos]], que al saturarse de [[sangre]] producen la [[erección]]. {{ámbito|América Central|Venezuela}} {{uso|coloquial}} {{wikisauro|pene}} ;9: {{plm|genital}} [[interno]]s y [[externo]]s &mdash;es decir, [[vagina]] y [[vulva]]&mdash; de la [[mujer]]. {{ámbito|Guatemala}} {{uso|coloquial}} {{wikisauro|vagina}} ;10 {{csem|insectos}}: (''Plodia interpunctella'') {{plm|lepidóptero}} [[ditrisio]] de la familia de los [[pirálido]]s, de [[ala]]s [[gris]] [[cobrizo]] y unos 2 cm de [[envergadura]], que habita en todo el [[mundo]], [[infestar|infestando]] [[alimento]]s [[seco]]s de origen [[vegetal]]. {{ámbito|Costa Rica}} {{sinónimo|palomilla|polilla india de la harina|polilla de la fruta seca}} ;11: Cierto canto típico mexicano {{cita requerida}}. ;12: {{plm|cuerpo}} [[celeste]], formado por [[hielo]] y [[roca]], que sigue una [[órbita]] muy [[excéntrico|excéntrica]] alrededor del [[sol]], formando una [[coma]] [[alargado|alargada]] al aproximarse al [[perihelio]]. {{ámbito|Honduras}} {{sinónimo|cometa}} ;13: Cierto [[baile]] popular argentino {{cita requerida}}. ;14: {{plm|lienzo}} grande de [[algodón]], [[lino]] o material sintético con el que se viste la [[cama]]. {{ámbito|España}} {{uso|germanía}} {{sinónimo|sábana}} ;15 {{csem|náutica}}: El medio o [[cruz]] de una [[verga]] entre los [[galápago]]s, donde se fijan los [[cuadernal]]es o [[motón|motones]] de las [[driza]]s.<ref name=mar>{{DME1864}}</ref> ;16 {{csem|náutica}}: Sobrenombre que toma cualquiera de dichos [[motón|motones]] o [[cuadernal]]es, y en algunos buques la [[gaza]] donde se engancha la [[ostaga]].<ref name=mar /> ==== Locuciones ==== {{trad-arriba|Locuciones con «paloma»}} * [[paloma brava]] o [[paloma bravía|bravía]] * [[paloma buchona]] * [[paloma calzada]]: Variedad de la paloma silvestre, que se distingue en tener las piernas y los pies vestidos de pluma. Por lo común es de color blanco. Columba dasypus.<ref>{{DLC1842}}</ref> * [[paloma de alas blancas]] * [[paloma de Castilla]] * [[paloma de la paz]] * [[paloma del racamento mayor]], [[paloma del trinquete]]: Náut. Son dos gazas que se pasan por la verga, donde se hacen firmes las ostagas para izar.<ref>{{DLC1842}}</ref> * [[paloma de moño]]: Variedad de la paloma silvestre, oue ss distingue en tener un fleco de plumas sobre la cabeza, y las piernas y pies calzados de plumas. Columba cristata.<ref>{{DLC1842}}</ref> * [[paloma de toca]]: Variedad de la paloma silvestre, de color regularmente blanco, que tiene sobre la caheza una porción de plumas largas que se caen por los lados de ella. Columba cuculata.<ref>{{DLC1842}}</ref> * [[paloma duenda]] * [[paloma mensajera]] * [[paloma monjil]]: paloma de toca * [[paloma moñuda]]: paloma de moño * [[paloma palomariega]] * [[paloma real]]: Es la mayor de todas las castas que hay entre las palomas domésticas, de las cuales se diferencia en tener él arranque del pico de un hernioso color de azufre. Columba hispánica.<ref>{{DLC1842}}</ref> * [[paloma rizada]]: Variedad de la paloma silvestre , que se distingue por tener las Diurnas rizadas. Columba hispida.<ref>{{DLC1842}}</ref> * [[paloma silvestre]]: Es la especie de paloma que ha dado origen a todas las diversas castas o variedades de la doméstica. Es cenicienta, con cambiantes verdes en el cuello, y una mancha negra en medio de cada remera, y otra al extremo de cada timonera. Colamba anas.<ref>{{DLC1842}}</ref> * [[paloma torcaz]]: Especie de paloma que tiene la cabeza, el lomo y las cobijas de las alas de color ceniciento , que tira á azul, la cola negra, la; alai pardo oscuras, manchadas de blanco; el cuello verdoso, el pecho rojo y el vientre blanco. Es de cerca de pie y medio de largo; se alimenta de semillas, habita en los bosques y anida en la copa de los árboles. Palumbes.<ref>{{DLC1842}}</ref> * [[paloma tripolina]]: Especie de paloma casera , pequeña de cuerpo, los pies calzados de pluma , y en la cabeza tiene una como diadema da plumas levantadas. Columba anglica.<ref>{{DLC1842}}</ref> * [[paloma zorita]] * [[paloma zura]]: paloma torcaz * [[paloma zurana]] * [[paloma zurita]] * [[pie de paloma]] {{trad-abajo}} ==== Información adicional ==== {{derivad|palomar|palomariego|palomear|palomero|palometa|palomilla|palomina|palomino|palomita|palomo}}. ==== Véase también ==== {{Wikipedia}} * [[palomas]] ==== Traducciones ==== {{trad-arriba}} {{t|ach|a1=1|t1=akuri}} {{t|af|a1=1|t1=duif}} {{t|ay|a1=1|t1=huturunku}} {{t|sh|t1=golub golubica golub голу|g1=f|a1=1}} {{t|sq|a1=1|t1=pëllumb|g1=m}} {{t|de|a1=1|t1=Taube|g1=f}} {{t|hsb|a1=1|t1=hołb|g1=m}} {{t|ar|a1=1|t1=حمام|t2=حمامة}} {{t|arc|a1=1|t1=יונא|g1=c}} {{t|hy|a1=1|t1=աղավնի}} {{t|ast|a1=1|t1=palombu}} {{t|az|a1=1|t1=göyərçin}} {{t|nds-de|a1=1|t1=duuv’|g1=m}} {{t|dsb|a1=1|t1=gołub|g1=m}} {{t|be|a1=1|t1=голуб|g1=m}} {{t|br|a1=1|t1=dube}} {{t|bg|a1=1|t1=гълъб|g1=m}} {{t|csb|a1=1|t1=gòłąbk|g1=m}} {{t|ca|a1=1|t1=colom|g1=m}} {{t|cak|t1=üt}} {{t|ceb|a1=1|t1=pati}} {{t|ccc|a1=1|t1=pujtuku}} {{t|cs|a1=1|t1=holub|g1=m}} {{t|chr|a1=1|t1=ꮼᏹ}} {{t|zh|a1=1|t1=鴿子|t2=鸽子}} {{t|ko|a1=1|t1=비둘기}} {{t|cr|a1=1|t1=mîmêw}} {{t|da|a1=1|t1=due|g1=c}} {{t|sco|a1=1|t1=calman}} {{t|cu|a1=1|t1=голѫбь|g1=m}} {{t|sk|a1=1|t1=holub|g1=m}} {{t|sl|a1=1|t1=golob|g1=m}} {{t|eo|a1=1|t1=kolombo|t2=palumbo}} {{t|et|a1=1|t1=tuvi}} {{t|eu|a1=1|t1=urzo|t2=uso}} {{t|fi|t1=kyyhky|t2=kyyhkynen|t3=pulu}} {{t|fo|t1=dúgva}} {{t|fr|a1=1|t1=colombe|g1=f|t2=pigeon}} {{t|fy|a1=1|t1=do}} {{t|fur|a1=1|t1=colomp}} {{t|gd|a1=1|t1=calman|g1=m|t2=smùdan|g2=m}} {{t|cy|a1=1|t1=colomen}} {{t|gl|a1=1|t1=pomba|g1=f}} {{t|ka|a1=1|t1=მტრედი}} {{t|el|a1=1|t1=περιστέρι|g1=n}} {{t|gn|a1=1|t1=pykasu|t2=jeruti}} {{t|haw|a1=1|t1=nūnū}} {{t|he|a1=1|t1=יונה|g1=f}} {{t|hbo|a1=1|t1=גוזל|g1=m}} {{t|hi|a1=1|t1=कपोत|t2=कबूतर}} {{t|hu|a1=1|t1=galamb}} {{t|io|a1=1|t1=kolombo}} {{t|id|a1=1|t1=merpati|t2=burung merpati|t3=dara|t4=burung dara|t5=ketitiran}} {{t|en|a1=1|t1=dove|t2=pigeon|t3=culver}} {{t|ang|a1=1|t1=dūfe|t2=culfer}} {{t|ia|a1=1|t1=columba|t2=pipion}} {{t|ga|a1=1|t1=colm|t2=colmán|t3=colúr}} {{t|is|a1=1|t1=dúfa|g1=f}} {{t|it|a1=1|t1=colombo|g1=m|a2=1|t2=piccione|g2=m}} {{t|ja|a1=1|t1=鳩|t2=はと|t3=土鳩|t4=どばと}} {{t|lad|a1=1|t1=palomba|g1=f|t2=palumba|g2=f}} {{t|ku|a1=1|t1=کۆتر}} {{t|lld|a1=1|t1=colomba}} {{t|la|a1=1|t1=columba|g1=f}} {{t|lv|a1=1|t1=balodis}} {{t|lt|a1=1|t1=balandis|g1=m|t2=karvelis|g2=m}} {{t|mk|a1=1|t1=гулаб|g1=m}} {{t|ms|a1=1|t1=burung merpati}} {{t|mt|a1=1|t1=beċċun|a2=1|t2=ħamiema|g2=f}} {{t|mi|a1=1|t1=karoro tangi harau}} {{t|arn|a1=1|t1=conulaf}} {{t|yua|a1=1|t1=úukum}} {{t|maz|a1=1|t1=mbaro}} {{t|mmc|a1=1|t1=mbaro}} {{t|mn|a1=1|t1=тагтаа}} {{t|nhn|a1=1|t1=huilotl}} {{t|nci|a1=1|t1=huilotl}} {{t|nch|t1=uilotl}} {{t|nhw|t1=uilotl}} {{t|nhe|t1=wilotl}} {{t|nhg|a1=1|t1=palumax}} {{t|nv|a1=1|t1=hasbídí}} {{t|nl|a1=1|t1=duif|g1=f}} {{t|nb|a1=1|g1=c|t1=due}} {{t|oc|a1=1|t1=colomb|g1=m}} {{t|ona|a1=1|t1=hèuşàʔt'en}} {{t|pap|t1=paloma|t2=palombra|t3=palomba}} {{t|fa|a1=1|t1=کبوتر|t2=کفتر|t3=فاخته}} {{t|ppl|t1=wilut}} {{t|pox|a1=1|t1=ďölǫb|g1=m}} {{t|pl|a1=1|t1=gołąb|g1=m}} {{t|pt|a1=1|t1=pombo|g1=m}} {{t|quz|a1=1|t1=irpa}} {{t|rm|t1=columba}} {{t|rom|a1=1|t1=golumbo|g1=m|t2=golumbaika|g2=f}} {{t|ro|a1=1|t1=porumbel|g1=m}} {{t|ru|a1=1|t1=голубь|g1=m}} {{t|se|t1=duvvá|t2=dielkoduvvá}} {{t|sm|a1=1|t1=lupe}} {{t|sc|t1=piccioni aresti|t2=caombu|t3=palumba|t4=columbu}} {{t|sh|a1=1|t1=golub|g1=m}} {{t|scn|a1=1|t1=palumma|g1=f}} {{t|syc|a1=1|t1=ܝܘܢܐ}} {{t|ses|t1=tuzun}} {{t|srn|t1=doyfi}} {{t|sv|a1=1|t1=duva|g1=c}} {{t|sw|a1=1|t1=njiwa|t2=hua}} {{t|tg|a1=1|t1=кабӯтар}} {{t|th|a1=1|t1=นกพิราบ}} {{t|tl|a1=1|t1=kalapati}} {{t|te|a1=1|t1=పావురం}} {{t|tpn|a1=1|t1=pykasu}} {{t|tr|a1=1|t1=güvercin}} {{t|uk|a1=1|t1=голуб|g1=m}} {{t|ur|a1=1|t1=کبوتر|g1=m}} {{t|vi|a1=1|t1=chim bồ câu}} {{t|vo|a1=1|t1=pijun}} {{t|yi|a1=1|t1=טױב}} {{trad-abajo}} == {{lengua|pap}} == {{pron-graf|leng=pap}} === Etimología 1 === {{etimología|leng=pap|es|paloma|significado=no}} y este {{etim|leng=pap|la|palumba}}, a su vez {{etim|leng=pap|la|*pales}}, modificado por analogía con {{l+|la|columba}}. ==== {{sustantivo|pap}} ==== ;1 {{csem|aves|leng=pap}}: (familia ''Columbiformes'') {{plm}}. == Referencias y notas == <references /> kigbz2ira3vkaa38k0jt7e5f5758p1c 6123440 6123439 2026-07-24T15:53:18Z Tmagc 158167 /* Etimología 1 */ 6123440 wikitext text/x-wiki {{desambiguación|Paloma}} == {{lengua|es}} == {{pron-graf|h1=Paloma}} [[Archivo:Patagioenas maculosa -Argentina-8.jpg|thumb|[1]]] [[Archivo:Check_mark.svg|right|thumb|150px|[6]]] === Etimología 1 === {{etimología|la|palumba}}, y este de {{l+|la|palumbus}}, {{l+|la|palumbes|alt=palumbēs}}, modificado por analogía con {{l+|la|columba}}. Compárese el griego antiguo {{l+|grc|πέλεια|tl=péleia|glosa=paloma bravia}}. La correspondiente raíz indoeuropea sería probablemente {{l+|ine-pro|*peh₁l-}}.<ref>{{referencia|p=442|f=2008|c=libro|a=de Vaan, Michiel|t=Etymological Dictionary of Latin and the Other Italic Languages|l=Leiden|editorial=Brill}}</ref> ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1 {{csem|aves}}: (familia ''Columbiformes'') Cualquiera de unas trescientas especies de [[ave]]s [[columbiforme]]s distribuidas por todo el [[globo]], de [[cuerpo]] y [[cuello]] robustos y [[pico]] [[delgado]] y [[corto]], con [[cera]]s carnosas, [[combado]] en la [[punta]] [[superior]] y adaptado a su [[hábito]] [[frugívoro]]. Son [[domesticable]]s y muchas veces [[comensal]]es del [[ser humano]]. {{hipónimo|cucule|pichón|torcaza|tórtola|zurita}} ;2 {{csem|aves}}: (''Columba livia'' f. ''domestica'') En particular, la paloma doméstica, criada desde la remota [[Antigüedad]] por su [[carne]], como [[mensajero|mensajera]] y como [[ornamental]], existiendo numerosas [[variedad]]es de [[vistoso]] [[plumaje]]. ;3: Figuradamente, [[persona]] [[pacífico|pacífica]] y [[mesurado|mesurada]]. ;4: En especial, [[pacifista]] [[militante]]. {{antónimo|halcón}} ;5: {{plm|petardo}} [[triangular]] de [[papel]] y [[pólvora]]. {{ámbito|México}} ;6: {{plm|signo}} [[gráfico]] que indica [[aprobación]] o [[verificación]]. {{ámbito|México}} {{sinónimo|cotejo|tic|visto|visto bueno}} ;7 {{csem|bebida}}: {{plm|bebida}} [[refrescante]] hecha de [[agua de selz]] y [[anís]]. {{ámbito|?}} ;8: {{plm|órgano}} [[eréctil]] que presenta el macho de los [[mamífero]]s, homólogo del [[clítoris]] femenino, en el que desembocan los conductos del [[tracto]] [[genitourinario]]. En algunos animales se retrae en la ingle, y sólo se extiende durante la [[excreción]] y la [[cópula]]; en el ser humano no es retráctil. Está compuesto en su mayor parte por tejidos esponjosos, llamados [[cuerpo cavernoso|cuerpos cavernosos]], que al saturarse de [[sangre]] producen la [[erección]]. {{ámbito|América Central|Venezuela}} {{uso|coloquial}} {{wikisauro|pene}} ;9: {{plm|genital}} [[interno]]s y [[externo]]s &mdash;es decir, [[vagina]] y [[vulva]]&mdash; de la [[mujer]]. {{ámbito|Guatemala}} {{uso|coloquial}} {{wikisauro|vagina}} ;10 {{csem|insectos}}: (''Plodia interpunctella'') {{plm|lepidóptero}} [[ditrisio]] de la familia de los [[pirálido]]s, de [[ala]]s [[gris]] [[cobrizo]] y unos 2 cm de [[envergadura]], que habita en todo el [[mundo]], [[infestar|infestando]] [[alimento]]s [[seco]]s de origen [[vegetal]]. {{ámbito|Costa Rica}} {{sinónimo|palomilla|polilla india de la harina|polilla de la fruta seca}} ;11: Cierto canto típico mexicano {{cita requerida}}. ;12: {{plm|cuerpo}} [[celeste]], formado por [[hielo]] y [[roca]], que sigue una [[órbita]] muy [[excéntrico|excéntrica]] alrededor del [[sol]], formando una [[coma]] [[alargado|alargada]] al aproximarse al [[perihelio]]. {{ámbito|Honduras}} {{sinónimo|cometa}} ;13: Cierto [[baile]] popular argentino {{cita requerida}}. ;14: {{plm|lienzo}} grande de [[algodón]], [[lino]] o material sintético con el que se viste la [[cama]]. {{ámbito|España}} {{uso|germanía}} {{sinónimo|sábana}} ;15 {{csem|náutica}}: El medio o [[cruz]] de una [[verga]] entre los [[galápago]]s, donde se fijan los [[cuadernal]]es o [[motón|motones]] de las [[driza]]s.<ref name=mar>{{DME1864}}</ref> ;16 {{csem|náutica}}: Sobrenombre que toma cualquiera de dichos [[motón|motones]] o [[cuadernal]]es, y en algunos buques la [[gaza]] donde se engancha la [[ostaga]].<ref name=mar /> ==== Locuciones ==== {{trad-arriba|Locuciones con «paloma»}} * [[paloma brava]] o [[paloma bravía|bravía]] * [[paloma buchona]] * [[paloma calzada]]: Variedad de la paloma silvestre, que se distingue en tener las piernas y los pies vestidos de pluma. Por lo común es de color blanco. Columba dasypus.<ref>{{DLC1842}}</ref> * [[paloma de alas blancas]] * [[paloma de Castilla]] * [[paloma de la paz]] * [[paloma del racamento mayor]], [[paloma del trinquete]]: Náut. Son dos gazas que se pasan por la verga, donde se hacen firmes las ostagas para izar.<ref>{{DLC1842}}</ref> * [[paloma de moño]]: Variedad de la paloma silvestre, oue ss distingue en tener un fleco de plumas sobre la cabeza, y las piernas y pies calzados de plumas. Columba cristata.<ref>{{DLC1842}}</ref> * [[paloma de toca]]: Variedad de la paloma silvestre, de color regularmente blanco, que tiene sobre la caheza una porción de plumas largas que se caen por los lados de ella. Columba cuculata.<ref>{{DLC1842}}</ref> * [[paloma duenda]] * [[paloma mensajera]] * [[paloma monjil]]: paloma de toca * [[paloma moñuda]]: paloma de moño * [[paloma palomariega]] * [[paloma real]]: Es la mayor de todas las castas que hay entre las palomas domésticas, de las cuales se diferencia en tener él arranque del pico de un hernioso color de azufre. Columba hispánica.<ref>{{DLC1842}}</ref> * [[paloma rizada]]: Variedad de la paloma silvestre , que se distingue por tener las Diurnas rizadas. Columba hispida.<ref>{{DLC1842}}</ref> * [[paloma silvestre]]: Es la especie de paloma que ha dado origen a todas las diversas castas o variedades de la doméstica. Es cenicienta, con cambiantes verdes en el cuello, y una mancha negra en medio de cada remera, y otra al extremo de cada timonera. Colamba anas.<ref>{{DLC1842}}</ref> * [[paloma torcaz]]: Especie de paloma que tiene la cabeza, el lomo y las cobijas de las alas de color ceniciento , que tira á azul, la cola negra, la; alai pardo oscuras, manchadas de blanco; el cuello verdoso, el pecho rojo y el vientre blanco. Es de cerca de pie y medio de largo; se alimenta de semillas, habita en los bosques y anida en la copa de los árboles. Palumbes.<ref>{{DLC1842}}</ref> * [[paloma tripolina]]: Especie de paloma casera , pequeña de cuerpo, los pies calzados de pluma , y en la cabeza tiene una como diadema da plumas levantadas. Columba anglica.<ref>{{DLC1842}}</ref> * [[paloma zorita]] * [[paloma zura]]: paloma torcaz * [[paloma zurana]] * [[paloma zurita]] * [[pie de paloma]] {{trad-abajo}} ==== Información adicional ==== {{derivad|palomar|palomariego|palomear|palomero|palometa|palomilla|palomina|palomino|palomita|palomo}}. ==== Véase también ==== {{Wikipedia}} * [[palomas]] ==== Traducciones ==== {{trad-arriba}} {{t|ach|a1=1|t1=akuri}} {{t|af|a1=1|t1=duif}} {{t|ay|a1=1|t1=huturunku}} {{t|sh|t1=golub golubica golub голу|g1=f|a1=1}} {{t|sq|a1=1|t1=pëllumb|g1=m}} {{t|de|a1=1|t1=Taube|g1=f}} {{t|hsb|a1=1|t1=hołb|g1=m}} {{t|ar|a1=1|t1=حمام|t2=حمامة}} {{t|arc|a1=1|t1=יונא|g1=c}} {{t|hy|a1=1|t1=աղավնի}} {{t|ast|a1=1|t1=palombu}} {{t|az|a1=1|t1=göyərçin}} {{t|nds-de|a1=1|t1=duuv’|g1=m}} {{t|dsb|a1=1|t1=gołub|g1=m}} {{t|be|a1=1|t1=голуб|g1=m}} {{t|br|a1=1|t1=dube}} {{t|bg|a1=1|t1=гълъб|g1=m}} {{t|csb|a1=1|t1=gòłąbk|g1=m}} {{t|ca|a1=1|t1=colom|g1=m}} {{t|cak|t1=üt}} {{t|ceb|a1=1|t1=pati}} {{t|ccc|a1=1|t1=pujtuku}} {{t|cs|a1=1|t1=holub|g1=m}} {{t|chr|a1=1|t1=ꮼᏹ}} {{t|zh|a1=1|t1=鴿子|t2=鸽子}} {{t|ko|a1=1|t1=비둘기}} {{t|cr|a1=1|t1=mîmêw}} {{t|da|a1=1|t1=due|g1=c}} {{t|sco|a1=1|t1=calman}} {{t|cu|a1=1|t1=голѫбь|g1=m}} {{t|sk|a1=1|t1=holub|g1=m}} {{t|sl|a1=1|t1=golob|g1=m}} {{t|eo|a1=1|t1=kolombo|t2=palumbo}} {{t|et|a1=1|t1=tuvi}} {{t|eu|a1=1|t1=urzo|t2=uso}} {{t|fi|t1=kyyhky|t2=kyyhkynen|t3=pulu}} {{t|fo|t1=dúgva}} {{t|fr|a1=1|t1=colombe|g1=f|t2=pigeon}} {{t|fy|a1=1|t1=do}} {{t|fur|a1=1|t1=colomp}} {{t|gd|a1=1|t1=calman|g1=m|t2=smùdan|g2=m}} {{t|cy|a1=1|t1=colomen}} {{t|gl|a1=1|t1=pomba|g1=f}} {{t|ka|a1=1|t1=მტრედი}} {{t|el|a1=1|t1=περιστέρι|g1=n}} {{t|gn|a1=1|t1=pykasu|t2=jeruti}} {{t|haw|a1=1|t1=nūnū}} {{t|he|a1=1|t1=יונה|g1=f}} {{t|hbo|a1=1|t1=גוזל|g1=m}} {{t|hi|a1=1|t1=कपोत|t2=कबूतर}} {{t|hu|a1=1|t1=galamb}} {{t|io|a1=1|t1=kolombo}} {{t|id|a1=1|t1=merpati|t2=burung merpati|t3=dara|t4=burung dara|t5=ketitiran}} {{t|en|a1=1|t1=dove|t2=pigeon|t3=culver}} {{t|ang|a1=1|t1=dūfe|t2=culfer}} {{t|ia|a1=1|t1=columba|t2=pipion}} {{t|ga|a1=1|t1=colm|t2=colmán|t3=colúr}} {{t|is|a1=1|t1=dúfa|g1=f}} {{t|it|a1=1|t1=colombo|g1=m|a2=1|t2=piccione|g2=m}} {{t|ja|a1=1|t1=鳩|t2=はと|t3=土鳩|t4=どばと}} {{t|lad|a1=1|t1=palomba|g1=f|t2=palumba|g2=f}} {{t|ku|a1=1|t1=کۆتر}} {{t|lld|a1=1|t1=colomba}} {{t|la|a1=1|t1=columba|g1=f}} {{t|lv|a1=1|t1=balodis}} {{t|lt|a1=1|t1=balandis|g1=m|t2=karvelis|g2=m}} {{t|mk|a1=1|t1=гулаб|g1=m}} {{t|ms|a1=1|t1=burung merpati}} {{t|mt|a1=1|t1=beċċun|a2=1|t2=ħamiema|g2=f}} {{t|mi|a1=1|t1=karoro tangi harau}} {{t|arn|a1=1|t1=conulaf}} {{t|yua|a1=1|t1=úukum}} {{t|maz|a1=1|t1=mbaro}} {{t|mmc|a1=1|t1=mbaro}} {{t|mn|a1=1|t1=тагтаа}} {{t|nhn|a1=1|t1=huilotl}} {{t|nci|a1=1|t1=huilotl}} {{t|nch|t1=uilotl}} {{t|nhw|t1=uilotl}} {{t|nhe|t1=wilotl}} {{t|nhg|a1=1|t1=palumax}} {{t|nv|a1=1|t1=hasbídí}} {{t|nl|a1=1|t1=duif|g1=f}} {{t|nb|a1=1|g1=c|t1=due}} {{t|oc|a1=1|t1=colomb|g1=m}} {{t|ona|a1=1|t1=hèuşàʔt'en}} {{t|pap|t1=paloma|t2=palombra|t3=palomba}} {{t|fa|a1=1|t1=کبوتر|t2=کفتر|t3=فاخته}} {{t|ppl|t1=wilut}} {{t|pox|a1=1|t1=ďölǫb|g1=m}} {{t|pl|a1=1|t1=gołąb|g1=m}} {{t|pt|a1=1|t1=pombo|g1=m}} {{t|quz|a1=1|t1=irpa}} {{t|rm|t1=columba}} {{t|rom|a1=1|t1=golumbo|g1=m|t2=golumbaika|g2=f}} {{t|ro|a1=1|t1=porumbel|g1=m}} {{t|ru|a1=1|t1=голубь|g1=m}} {{t|se|t1=duvvá|t2=dielkoduvvá}} {{t|sm|a1=1|t1=lupe}} {{t|sc|t1=piccioni aresti|t2=caombu|t3=palumba|t4=columbu}} {{t|sh|a1=1|t1=golub|g1=m}} {{t|scn|a1=1|t1=palumma|g1=f}} {{t|syc|a1=1|t1=ܝܘܢܐ}} {{t|ses|t1=tuzun}} {{t|srn|t1=doyfi}} {{t|sv|a1=1|t1=duva|g1=c}} {{t|sw|a1=1|t1=njiwa|t2=hua}} {{t|tg|a1=1|t1=кабӯтар}} {{t|th|a1=1|t1=นกพิราบ}} {{t|tl|a1=1|t1=kalapati}} {{t|te|a1=1|t1=పావురం}} {{t|tpn|a1=1|t1=pykasu}} {{t|tr|a1=1|t1=güvercin}} {{t|uk|a1=1|t1=голуб|g1=m}} {{t|ur|a1=1|t1=کبوتر|g1=m}} {{t|vi|a1=1|t1=chim bồ câu}} {{t|vo|a1=1|t1=pijun}} {{t|yi|a1=1|t1=טױב}} {{trad-abajo}} == {{lengua|pap}} == {{pron-graf|leng=pap}} === Etimología 1 === {{etimología|leng=pap|es|paloma|significado=no}} y este {{etim|leng=pap|la|palumba}}, a su vez {{etim|leng=pap|la|*pales}}, modificado por analogía con {{l+|la|columba}}. ==== {{sustantivo|pap}} ==== ;1 {{csem|aves|leng=pap}}: (familia ''Columbiformes'') {{plm}}. == Referencias y notas == <references /> b0ps3xbdo8wczfmctj01lwycpy7tu99 bors 0 27822 6123459 5701424 2026-07-24T19:23:43Z CarpetanoComplutense 161160 6123459 wikitext text/x-wiki == {{lengua|af}} == {{pron-graf|leng=af}} === Etimología === {{etimología|leng=af|nl|borst}}. === {{sustantivo|af}} === {{inflect.af.sust|bors|borste|borsie|borsies}} ;1 {{csem|anatomía|leng=af}}: {{plm|pecho}}, [[seno]], [[teta]] (malsonante). === Véase también === {{w|leng=af}} == {{lengua|xib}} == {{pron-graf|leng=xib|v=borste}} === Etimología === {{etimología|leng=xib|incierta}}, pero probablemente relacionado con el vasco ''[[bost#Vasco|bost]]'' ('cinco').<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 170}}</ref><ref>{{referencia | autor = Orduña Aznar, Eduardo | fecha = 2011 | url = https://ojs.ehu.eus/index.php/Veleia/article/view/6301/8075 | título = Los numerales ibéricos y el protovasco | cat=artículo}}</ref><ref>{{referencia | autor = Ferrer i Jané, Joan | fecha = 2009 | url = https://ifc.dpz.es/recursos/publicaciones/29/54/32ferrer.pdf | título = El sistema de numerales ibérico: avances en su conocimiento | cat=artículo}}</ref> === {{numeral|xib}} === {{xib.esc|bors}} ;1 {{csem|leng=xib|números}}: {{variante|leng=xib|borste|glosa=cinco}}. == Referencias y notas == <references /> eqvifn3q7hkam43fxw8kjhv6ezeh382 Brooklyn 0 28910 6123510 6024820 2026-07-25T02:02:14Z CitationsFreak 149699 /* {{lengua|en}} */ -- es no sustantivo como "perro" o "computadora", es un sustantivo propio. 6123510 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|nl|Breuckelen}}. === {{sustantivo propio|es}} === ;1: Uno de los cinco [[borough]]s de la ciudad de [[Nueva York]]. === Véase también === {{w}} === Traducciones === {{trad-arriba}} {{t|en|t1=Brooklyn}} {{trad-abajo}} [[Categoría:ES:Barrios]] == {{lengua|en}} == {{pron-graf|leng=en |pron=Received Pronunciation, General American|fono=ˈbɹʊk.lən|audio=En-us-brooklyn.ogg|aunota=EE. UU. |2pron=ciudad de Nueva York|2fone=ˈbɹʷʊk.ɫɪn|2audio=En-NYC Brooklyn.ogg|2fone2=ˈbɹ̠ʷʊ̠kɫ̪ɪ̈n }} === Etimología === {{etimología|leng=en|nl|Breuckelen}}. === {{sustantivo propio|en}} === ;1: Uno de los cinco [[borough]]s de la ciudad de [[Nueva York]]. == Referencias y notas == <references /> 7q76s7ptx0p83qi1349iwwtkd4zfj0n gagá 0 29318 6123553 5716861 2026-07-25T04:28:54Z Tmagc 158167 6123553 wikitext text/x-wiki {{desambiguación|gaga}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|fr|gaga}}. ==== {{adjetivo|es}} ==== {{es.adj|ng}} ;1: Que ha perdido por la [[senectud]] el correcto [[uso]] de sus [[facultad]]es [[mental]]es. {{uso|se usa también como sustantivo}} {{sinónimo|chocho|senil}}. ;2: Dicho de una persona que es de clase alta.<ref>{{Damer}}</ref> {{ámbito|Perú}} {{sinónimo|cheto|concheto}} ==== Traducciones ==== {{trad-arriba}} {{t|de|a1=1|t1=tatterig|a2=1|t2=zittrig}} {{t|bg|a1=1|t1=старчески|a2=1|t2=слабоумен}} {{t|bg|t1=немощен|a1=1}} {{t|zh|a1=1|t1=遲鈍的|a2=1|t2=顫抖的}} {{t|ko|a1=1|t1=비틀거리는}} {{t|da|a1=1|t1=affældig}} {{t|fr|a1=1|t1=gâteux|a2=1|t2=gaga}} {{t|fr|t1=branlant|a1=1}} {{t|el|a1=1|t1=τρεμουλιάρης}} {{t|he|a1=1|t1=רועד}} {{t|en|a1=1|t1=doddering}} {{t|it|a1=1|t1=barcollante}} {{t|ja|a1=1|t1=揺れる}} {{t|nl|a1=1|t1=beverig}} {{t|pt|a1=1|t1=senil}} {{t|ru|t1=дрожащий|a1=1|t2=дрожащий|a2=1}} {{t|sv|a1=1|t1=gaggig|a2=1|t2=svag}} {{trad-abajo}} == Referencias y notas == <references /> dumsob15paflgudgco21p2nq0k6yu10 ciclópeo 0 30052 6123450 5586842 2026-07-24T17:00:49Z ~2026-34597-22 183061 iamgen 6123450 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología2|}} === {{adjetivo|es}} === [[File:Sacsahuaman wall3.jpg|thumb|[3] una construcción ciclópea]] ;1: Que tiene relación con los [[cíclope]]s, unos [[gigante]]s de la [[mitología]]. ;2: {{plm|enorme}}, gigante. ;3: Referido a una [[construcción]] de la antigüedad, que está formada por grandes [[piedra]]s una encima de otra que no tienen materiales de [[unión]] tales como la [[argamasa]]. === Traducciones === {{trad-arriba}} {{t|el|a1=1|t1=κυκλώπειος|a2=2|t2=κυκλώπειος}} {{t|pl|a1=1|t1=cyklopowy|a2=2|t2=cyklopowy}} {{trad-abajo}} == Referencias y notas == <references /> 67h2yli1p7rg84cpsqoudg3xzig294i ari 0 32522 6123424 5832942 2026-07-24T15:24:43Z ~2026-41134-51 183681 6123424 wikitext text/x-wiki 6123425 6123424 2026-07-24T15:26:14Z ~2026-41284-60 183682 /* */ 6123425 wikitext text/x-wiki 6123426 6123425 2026-07-24T15:28:00Z ~2026-41284-60 183682 /* Guna de San Blas */ 6123426 wikitext text/x-wiki 6123428 6123426 2026-07-24T15:37:58Z Tmagc 158167 Revertidos los cambios de [[Special:Contributions/~2026-41284-60|~2026-41284-60]] ([[User talk:~2026-41284-60|disc.]]) a la última edición de [[User:~2026-41134-51|~2026-41134-51]] 6123424 wikitext text/x-wiki 6123429 6123428 2026-07-24T15:38:22Z Tmagc 158167 6123429 wikitext text/x-wiki {{desambiguación|Ari|arī|arı}} == {{lengua|sq}} == {{pron-graf|leng=sq|1fone1=aˈɾi}} === Etimología 1 === {{etimología|leng=sq|ine-pro|*h₂ŕ̥tḱos}}. ==== {{sustantivo masculino|sq}} ==== ;1 {{csem|mamíferos|leng=sq}}: (familia Ursidae) {{plm|oso}}. === Forma flexiva === ==== Forma sustantiva ==== ;1: {{forma sustantivo|leng=sq|ar|nominativo definido|singular}}; "[[el]] [[oro]]". == {{lengua|ca}} == {{pron-graf|leng=ca|1fone1=ˈa.ɾi}} === Etimología 1 === {{etimología|leng=ca|sa|आर्य|transcripción=ā́rya}}, endónimo de los pueblos indoiranios, de etimología ulterior incierta. ==== {{adjetivo|ca}} ==== {{ca.adj}} ;1: {{plm|ario}}. {{uso|utcs|leng=ca}} ;2: Por extensión, [[indoiranio]]. {{uso|utcs|leng=ca}} ;3 {{csem|lingüística|leng=ca}}: {{plm|indoeuropeo}}. {{uso|anticuado|leng=ca}} == {{lengua|eu}} == {{pron-graf|leng=eu}} === Etimología 1 === {{etimología|leng=eu}}. ==== {{partícula|eu}} ==== ;1: {{plm|estar}} [[hacer|haciendo]], [[-ndo]]. {{ejemplo|Metro bat hartzen '''ari''' naiz etxera joateko.}} == {{lengua|ilo}} == {{pron-graf|leng=ilo}} === Etimología 1 === {{etimología|leng=ilo|poz-pro|*qari}}. Compárese el maorí {{l+|mi|ariki|glosa=jefe}} o el tagalog {{l+|tl|hari|glosa=rey}}. ==== {{sustantivo|ilo}} ==== ;1: {{plm|rey}}. == {{lengua|is}} == {{pron-graf|leng=is}} === Etimología 1 === {{etimología|leng=is|non|ari}}, y este del protogermánico {{l+|gem-pro|*arô}}, del protoindoeuropeo {{l+|ine-pro|*or-}}. Compárese el doblete {{l+|is|örn}}, el alemán {{l+|de|Aar}}, el gótico {{l+|got|𐌰𐍂𐌰|tr=ara}} o el inglés {{l+|en|erne}}. ==== {{sustantivo masculino|is}} ==== ;1 {{csem|aves|leng=is}}: (familia Accipitridae) {{plm|águila}} [[macho]]. == {{lengua|ja|e1=romaji}} == {{pron-graf|leng=ja|1fone1= a̠ɾʲi |e1=蟻|enota1=[[kanji]]|e2=あり|enota2=[[hiragana]]|e3=アリり|enota3=[[katakana]]|2fone1= a̠ɾʲi |e4=あり|enota4=[[hiragana]]|e5=有り|enota5=forma mixta}} === Etimología 1 === {{etimología|leng=ja}}. ==== {{sustantivo|ja}} ==== ;1 {{csem|insectos|leng=ja}}: (familia Formicidae) {{plm|hormiga}}. {{etimología|leng=ja}} ==== Véase también ==== {{W|idioma=ja|アリ|ari}} ==== {{sustantivo|ja}} ==== ;2: {{plm|existencia}}. ;3: {{plm|comercio}}. == {{lengua|cuk}} == {{pron-graf|leng=cuk}} === Etimología 1 === {{etimología}}. ==== {{sustantivo|cuk}} ==== ;1 {{csem|reptiles|leng=cuk}}: {{plm|iguana}}. == {{lengua|lmo}} == {{pron-graf|leng=lmo|1fone1=ˈa.ri}} === Etimología 1 === {{etimología|leng=lmo|la|aer}}, y este del griego antiguo {{l+|grc|ἀήρ|tr=aér}}, del preclásico {{l+|grc|*ἀϝήρ|tr=*avér}}, del protoindoeuropeo {{l+|ine-pro|*h₂weh₁-}}. Compárese el italiano {{l+|it|aria}}. ==== {{sustantivo femenino|lmo}} ==== ;1: {{plm|aire}}. == {{lengua|quz}} == {{pron-graf|leng=quz|1fone1=ˈa.ri}} === Etimología 1 === {{etimología|leng=quz}}. ==== {{adverbio de modo|quz}} ==== ;1: {{plm|sí}}. == {{lengua|sw}} == {{pron-graf|leng=sw}} === Etimología 1 === {{etimología|leng=sw}}. ==== {{sustantivo|sw}} ==== ;1: {{plm|entusiasmo}}, [[avidez]]. == {{lengua|tl}} == {{pron-graf|leng=tl}} === Etimología 1 === {{etimología|leng=tl}}. ==== {{sustantivo|tl}} ==== ;1: {{plm|posesión}}, [[propiedad]]. ;2: {{plm|genitales}}. {{uso|jerga|malsonante|leng=tl}} ==== {{verbo transitivo|tl}} ==== ;3: {{plm|poseer}}, [[tener]] en propiedad. == Referencias y notas == <references /> 0d6nlfiga8bf2xkkd06gd8af0e649eo narciso 0 38728 6123433 5728693 2026-07-24T15:43:30Z Tmagc 158167 6123433 wikitext text/x-wiki {{desambiguación|Narciso}} == {{lengua|es}} == {{pron-graf}} === Etimología 1 === {{etimología|la|narcissus}}, {{etim|grc|νάρκισσος}}. ==== {{sustantivo masculino|es}} ==== [[Archivo:Narcissus side.jpg|right|thumb|narciso [1]]] {{es.sust}} ;1: Una [[planta]] con bulbo, ''Narcissus pseudonarcissus'', con flores amarillas. ;2: Una [[flor]] nacional de País de Gales. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{t|de|g1=f|t1=Osterglocke}} {{t|hsb|t1=Narcisa}} {{t|br|a1=1|t1=rozenn-gamm|g1=f}} {{t|ca|t1=narcís}} {{t|fr|g1=f|t1=jonquille}} {{t|cy|g1=f|t1=cenhinen Bedr}} {{t|en|t1=daffodil}} {{t|it|g1=m|t1=narciso}} {{t|ja|t1=ラッパズイセン|t2=水仙|t3=スイセン}} {{t|pl|g1=m|t1=żonkil}} {{trad-abajo}} === Etimología 2 === {{etimología|EPON|Narciso}}, personaje mitológico. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1: Hombre [[narcisista]]. {{sinónimo|narcisista|ninfo}} == Referencias y notas == <references /> elbuscoofp9vhbpvoh3es7cntg982x0 6123435 6123433 2026-07-24T15:45:34Z Tmagc 158167 6123435 wikitext text/x-wiki {{desambiguación|Narciso}} == {{lengua|es}} == {{pron-graf}} === Etimología 1 === {{etimología|la|narcissus}}, {{etim|grc|νάρκισσος}}. ==== {{sustantivo masculino|es}} ==== [[Archivo:Narcissus side.jpg|right|thumb|narciso [1]]] {{es.sust}} ;1: Una [[planta]] con bulbo, ''Narcissus pseudonarcissus'', con flores amarillas. ;2: Una [[flor]] nacional de País de Gales. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{t|de|g1=f|t1=Osterglocke}} {{t|hsb|t1=Narcisa}} {{t|br|a1=1|t1=rozenn-gamm|g1=f}} {{t|ca|t1=narcís}} {{t|fr|g1=f|t1=jonquille}} {{t|cy|g1=f|t1=cenhinen Bedr}} {{t|en|t1=daffodil}} {{t|it|g1=m|t1=narciso}} {{t|ja|t1=ラッパズイセン|t2=水仙|t3=スイセン}} {{t|pl|g1=m|t1=żonkil}} {{trad-abajo}} === Etimología 2 === {{etimología|EPON|Narciso}}, personaje mitológico. {{etimología|grc|Νάρκισσος|tr=Nárkissos}}, de {{l+|grc|νάρκη|glosa=sopor}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1: Hombre [[narcisista]]. {{sinónimo|narcisista|ninfo}} == Referencias y notas == <references /> l6vuerhbtm27b1k9b2a8c86g5ka96vb elogio 0 49376 6123411 5947799 2026-07-24T12:56:45Z Jemily1 121719 desambiguación añadida 6123411 wikitext text/x-wiki {{desambiguación|elogió}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|la|elogium|epitafio}} === {{sustantivo masculino|es}} === {{es.sust}} ;1: {{plm|expresión}} [[verbal]] o escrita que se hace de las [[cualidad]]es y [[bondad]]es de algo. {{sinónimo|alabanza|loa|loor}} === Traducciones === {{trad-arriba}} {{t|de|a1=1|t1=Lob}} {{t|eo|a1=1|t1=laŭdo}} {{t|fr|a1=1|t1=louange}} {{t|he|a1=1|t1=שבח}} {{t|en|a1=1|t1=praise}} {{t|it|a1=1|t1=elogio}} {{t|la|a1=1|t1=laus}} {{t|nl|a1=1|t1=lof|g1=m|a2=1|t2=loftuiting|g2=f}} {{t|pt|a1=1|t1=elogio}} {{trad-abajo}} == Referencias y notas == <references /> h2rpyjmlaor2ss503g3r7tzqcg0m9yc borste 0 50978 6123457 5913739 2026-07-24T19:14:14Z CarpetanoComplutense 161160 6123457 wikitext text/x-wiki == {{lengua|xib}} == {{pron-graf|leng=xib|v=bors}} === Etimología === {{etimología|leng=xib|incierta}}, pero probablemente relacionado con el vasco ''[[bost#Vasco|bost]]'' ('cinco').<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 171 | obs = Ullastret, plomo, M.L.H. C.2.3a; Siles: 1985, nº 538.}}</ref><ref>{{referencia | autor = Orduña Aznar, Eduardo | fecha = 2011 | url = https://ojs.ehu.eus/index.php/Veleia/article/view/6301/8075 | título = Los numerales ibéricos y el protovasco | cat=artículo}}</ref><ref>{{referencia | autor = Ferrer i Jané, Joan | fecha = 2009 | url = https://ifc.dpz.es/recursos/publicaciones/29/54/32ferrer.pdf | título = El sistema de numerales ibérico: avances en su conocimiento | cat=artículo}}</ref> === {{numeral|xib}} === {{xib.esc|borste}} ;1 {{csem|leng=xib|números}}: {{plm|cinco}}. == {{lengua|sv}} == {{pron-graf|leng=sv|fone=`bɔʂʈə}} === Etimología === {{etimología2|leng=sv|Derivado de {{l+|sv|borst}}, "[[cerda]]"}} === {{sustantivo neutro|sv}} === ;1 {{csem|leng=sv|utensilios}}: {{plm|cepillo}}. === Véase también === {{w|leng=sv}} === Declinación === {{sv.sust|c-ar|borst}} == Referencias y notas == <references /> 3mg4l40qsx0i2y5qmvuz9zhy9f6nq8b 6123458 6123457 2026-07-24T19:17:37Z CarpetanoComplutense 161160 6123458 wikitext text/x-wiki == {{lengua|xib}} == {{pron-graf|leng=xib|v=bors}} === Etimología === {{etimología|leng=xib|incierta}}, pero probablemente relacionado con el vasco ''[[bost#Vasco|bost]]'' ('cinco').<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 171 | obs = Ullastret, plomo, M.L.H. C.2.3a; Siles: 1985, nº 538.}}</ref><ref>{{referencia | autor = Orduña Aznar, Eduardo | fecha = 2011 | url = https://ojs.ehu.eus/index.php/Veleia/article/view/6301/8075 | título = Los numerales ibéricos y el protovasco | cat=artículo}}</ref><ref>{{referencia | autor = Ferrer i Jané, Joan | fecha = 2009 | url = https://ifc.dpz.es/recursos/publicaciones/29/54/32ferrer.pdf | título = El sistema de numerales ibérico: avances en su conocimiento | cat=artículo}}</ref> === {{numeral|xib}} === {{xib.esc|borste}} ;1 {{csem|leng=xib|números}}: {{plm|cinco}}. == {{lengua|sv}} == {{pron-graf|leng=sv|fone=`bɔʂʈə}} === Etimología === {{etimología2|leng=sv|Derivado de {{l+|sv|borst}}, ('[[cerda]]')}}. === {{sustantivo neutro|sv}} === ;1 {{csem|leng=sv|utensilios}}: {{plm|cepillo}}. === Véase también === {{w|leng=sv}} === Declinación === {{sv.sust|c-ar|borst}} == Referencias y notas == <references /> 001kbt7es0bht2s7s5g25xpgnn8z0zr Wikcionario:Solicitudes/EN 4 53167 6123565 6115820 2026-07-25T10:04:07Z CitationsFreak 149699 palabras 6123565 wikitext text/x-wiki {{solicitudes|inglés}} {{solicitudesotros}} {{abecedario}} == A == *[[aboard]] *[[accommodate]] *[[adorn]] *[[affirm]] *[[antidote]] *[[antidisestablishmentarianism]] *[[Australian]] == B == *[[baggage]] *[[beverage]] *[[bounce]] *[[breach]] *[[buggy]] == C == *[[capacious]] *[[compilation]] *[[contamination]] *[[contour]] *[[Czech]] == D == *[[decimate]] *[[defiance]] *[[desperation]] *[[divisive]] == E == *[[eligible]] *[[emit]] *[[entail]] *[[experimental]] *[[explosive]] *[[extinct]] *[[extract]] == F == *[[feudal]] *[[finite]] *[[firefighter]] *[[flourish]] *[[forceful]] *[[freshly]] *[[fuse]] *[[fusion]] == G == *[[gauge]] *[[genie]] *[[gist]] *[[goblet]] *[[graphic]] *[[grease]] *[[guidance]] == H == *[[Haitian]] *[[hamburger]] *[[hamster]] *[[harass]] *[[hedgehog]] *[[housewife]] == I == *[[imprison]] *[[insight]] *[[insure]] *[[invest]] *[[Iranian]] *[[ironic]] == J == *[[jeer]] *[[jinx]] *[[jog]] == K == *[[kettle]] == L == *[[leverage]] *[[loosely]] == M == *[[messy]] *[[milk of human kindness]] *[[missile]] *[[monstrous]] == N == *[[normative]] *[[Norwegian]] == O == *[[obese]] *[[octagon]] *[[oddly]] *[[optimist]] *[[orchestra]] *[[oxidation]] == P == *[[particle]] *[[partnership]] *[[pathway]] *[[pertain]] *[[prevalent]] *[[prominence]] *[[psychiatric]] == Q == *[[quail]] *[[query]] == R == *[[recur]] *[[relatable]] *[[relay]] *[[rooster]] *[[rouse]] == S == *[[salty]] *[[shiny]] *[[shiver]] *[[shrew]] *[[simplify]] == T == *[[tariff]] *[[tint]] *[[tonal]] *[[torrent]] *[[traction]] *[[trustworthy]] *[[Turkish]] == U == *[[ultimatum]] *[[undo]] *[[unify]] *[[undertake]] *[[unlock]] == V == *[[vaporize]] *[[venue]] *[[vestige]] *[[vile]] *[[villain]] *[[Volga German]] == W == *[[warmly]] *[[wean]] *[[wedge]] *[[withhold]] *[[wring]] == X == == Y == *[[yikes]] == Z == ph3kgrl2rrf7891evmbo16pbyvz0zgf ortopédico 0 55687 6123441 5750401 2026-07-24T15:56:11Z Tmagc 158167 6123441 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|sufijo|ortopedia|ico}}. === {{adjetivo|es}} === {{es.adj}} ;1: Que ejerce la [[ortopedia]] o relativo a ella. ;2 {{csem|medicina}}: Dicho de un miembro del cuerpo: que fue implantado o reconstruido artificialmente tras haberlo perdido. {{ejemplo|Una pierna '''ortopédica'''.}} === {{sustantivo masculino y femenino|es}} === {{es.sust|mf}} ;3: {{variante|ortopedista}}. === Traducciones === {{trad-arriba}} <!-- formato: {{t+|idioma|<acepción#>|palabra|género}} p. ej. {{t+|fr|1|chose|f}} --> {{trad-abajo}} == Referencias y notas == <references /> 22wmb0zg6uef1pjtjhwzbs5hnyp5fie 6123442 6123441 2026-07-24T15:56:25Z Tmagc 158167 /* {{adjetivo|es}} */ 6123442 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|sufijo|ortopedia|ico}}. === {{adjetivo|es}} === {{es.adj}} ;1: Que ejerce la [[ortopedia]] o relativo a ella. ;2 {{csem|medicina}}: Dicho de un miembro del cuerpo: que fue implantado o reconstruido artificialmente tras haberse perdido. {{ejemplo|Una pierna '''ortopédica'''.}} === {{sustantivo masculino y femenino|es}} === {{es.sust|mf}} ;3: {{variante|ortopedista}}. === Traducciones === {{trad-arriba}} <!-- formato: {{t+|idioma|<acepción#>|palabra|género}} p. ej. {{t+|fr|1|chose|f}} --> {{trad-abajo}} == Referencias y notas == <references /> pxi70fvg1g4tzwacdzareio0g43ukup pindonga 0 56367 6123518 5730139 2026-07-25T02:39:28Z Tmagc 158167 6123518 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología 1 === {{etimología|sufijo|pender|onga}}. ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1: {{plm|mujer}} [[aficionado|aficionada]] a [[salir]] y [[divertir]]se. {{ámbito|España}} {{uso|coloquial|despectivo}} {{wikisauro|noctámbulo}} ==== {{adjetivo|es}} ==== {{es.adj}} ;2: De segunda marca. {{uso|coloquial|malsonante}} {{ámbito|Argentina}} {{sinónimo|berreta}} ==== {{interjección|es}} ==== ;3: {{impropia|Úsase para expresar vehemente rechazo}}. {{ámbito|Rioplatense}} {{uso|coloquial|malsonante}} {{ejemplo|'No den pelota a los que dicen 'qué horrible que está el mundo' y que estamos poco menos que postrados. ¡''Pindonga''!', exclamó Mujica.|c=pagina|t="Necesitamos un sacudón ético y moral", afirmó Mujica en el Cerro|f=2009-06-01|u=http://www.larepublica.com.uy/larepublica/2009/06/01/nota/366832}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> hzyjjjrhvr1b60fl85l1i4atc90wlmw espiga 0 66302 6123536 6093562 2026-07-25T03:09:32Z Tmagc 158167 6123536 wikitext text/x-wiki {{definición}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|la|spica}}. === {{sustantivo femenino|es}} === {{es.sust}} [[Archivo:Inflorescence diagram.jpg|thumb|[1] Diagrama de una ''espiga'']] [[Archivo:Mortise_and_tenon_joint.svg|thumb|(5) Mortaja (izquierda) y espiga (derecha)]] ;1 {{csem|botánica}}: Tipo de [[inflorescencia]] [[racemoso|racemosa]] en la cual el [[eje]] es [[alargado]], con [[cabillo]]s muy cortos o sin ninguno, como en el trigo y el [[espliego]]; sus flores más jóvenes se ubican en el [[ápice]] del mismo.<ref name="dlc1914" /><ref name=esp>{{tomoespasa|Tomo=22}}</ref> ;2: Parte de un [[arma blanca]] que se extiende dentro de su [[empuñadura]] o, de una herramienta en su mango.<ref name=esp /> ;3: {{plm|parte}} [[superior]] de la [[espada]] en donde se asegura la [[guarnición]].<ref name="dlc1914">{{DLC1914|441}}</ref> ;4: {{plm|hilo}} o [[aguja]] de [[metal precioso]] que servía para sujetar los [[alfiler]]es, [[imperdible]]s y [[medallón|medallones]] a las [[vestidura]]s de las [[menina]]s. ;5 {{csem|carpintería}}: {{plm|protuberancia}} que encaja en la cavidad de la [[mortaja]] para unir dos tablas o maderos. Se suelen encolar. {{sinónimo|tesillo}} ;6 {{csem|náutica}}: {{plm|trozo}} comprendido entre el [[nervio]] del [[foque]] y el [[extremo]] de fuera de un [[botalón]]; trozo que en este [[caso]] sustituye al botalón de [[petifoque]] y sirve para [[alargar]] esta [[vela]]. {{sinónimo|galope}}. ;7 {{csem|náutica}}: {{plm|remate}} superior del [[calcés]] de un [[palo]] o [[mastelero]], en el cual se [[encajar|encaja]] el [[agujero]] [[cuadrado]] del [[tamborete]]. ;8 {{csem|náutica}}: {{plm|cualquier}} remate cuadrado, labrado en la parte superior de una percha o asta, para encajar en él una perilla o tamborete. ;9 {{csem|náutica}}: {{plm|punta}} [[más]] [[alto|alta]] de una [[vela de cuchillo]]. ;10 {{csem|escultura}}: {{plm|porción}} de [[piedra]] o [[mármol]] que se [[respetar|respeta]] al [[ejecutar]] una [[estatua]], para asegurar las partes [[demasiado]] [[débil]]es que por el [[peso]] se [[poder|podrían]] [[quebrar]]. === Locuciones === * [[quedarse a la espiga]]: Permanecer hasta el final para recoger o hacer uso de lo no aprovechado o desechado por los demás * [[en espiga]]: a [[punto]] de [[echar]] espigas. === Véase también === {{W}} === Traducciones === {{trad-arriba}} {{t|ca|t1=espiga}} {{t|en|t1=ear}} {{t|eo|t1=spiko}} {{t|fr|a1=1|t1=épi}} {{t|en|a1=1|t1=spike}} {{t|it|t1=spiga}} {{t|pt|t1=espiga}} {{trad-abajo}} == Referencias y notas == <references /> 7k8uxsowdllht3edh9v1defbtlastzd taught 0 73918 6123500 5912322 2026-07-25T00:33:19Z Adelpine 34679 Agrega una transcripción AFI tomada de [[en:taught]] y precisa los hablantes de otras 6123500 wikitext text/x-wiki == {{lengua|en}} == {{pron-graf|leng=en |pron=Received Pronunciation|fono=tɔːt|audio=en-uk-taught.ogg|aunota=Gloucestershire |2pron=General American y dialectos de los EE. UU., sin la fusión cot-caught|2fono=tɔt|2audio=LL-Q1860 (eng)-Assorted-Interests-taught.wav|2aunota=Nueva York |3pron=General American, Atlantic Canadian, dialecto de los Grandes Lagos|3fono=tɑt|3audio=en-us-taught.ogg|3aunota=California|3audio2=LL-Q1860 (eng)-Semperosculto-taught.wav|3aunota2=EE. UU.|3audio3=LL-Q1860 (eng)-Wodencafe-taught.wav|3aunota3=Texas|3audio4=LL-Q1860 (eng)-Grendelkhan-taught.wav|3aunota4=Connecticut |4pron=Standard Canadian, Boston, Maine|4fono=tɒt |5pron=Australia, Nueva Zelanda|5fono=toːt |6pron=Escocia|6fono=tɔt |7pron=Irlanda|7fono=t̪ɒːt |ls=1 }} === Forma verbal === ;1: {{fv-en|teach|pas}}. ;2: {{fv-en|teach|part}}. == Referencias y notas == <references /> q60nwiyayk1otiou7dopk6sdxrxj2b6 hiru 0 78868 6123487 6123197 2026-07-24T23:12:08Z CarpetanoComplutense 161160 6123487 wikitext text/x-wiki == {{lengua|eu}} == {{pron-graf|leng=eu|v=hirur}} === Etimología === {{etimología|leng=eu|euq-pro|*(h)irur}}.<ref>{{referencia | autor = Trask, Robert Lawrence | fecha = 2008 | url = https://www.sussex.ac.uk/webteam/gateway/file.php?name=lxwp23-08-edb.pdf | título = Etymological Dictionary of Basque | cat=libro | p = 389 | inst = Universidad de Sussex | editor = Wheeler, Max}}</ref> === {{adjetivo cardinal|eu}} === ;1: {{plm|tres}}. [[Categoría:EU:Números]] === Véase también === {{W|idioma=eu}} == {{lengua|ja|escritura=romaji}} == {{pron-graf|leng=ja|fone=çiɾɯ̟ᵝ}} === Etimología === {{etimología|leng=ja}} === {{sustantivo|ja}} === '''hiru''': [[昼]] ([[ひる]]) ;1: {{plm|día}} == {{lengua|zai}} == {{pron-graf|leng=zai}} === Etimología === {{etimología|leng=zai}} === {{adverbio|zai}} === ;1: {{plm|adelante}}. == Referencias y notas == <references /> jb846zun495arjms5wwnrni0394x1z8 sei 0 78870 6123484 5873892 2026-07-24T23:05:28Z CarpetanoComplutense 161160 6123484 wikitext text/x-wiki == {{lengua|eu}} == {{pron-graf|leng=eu}} === Etimología === {{etimología|leng=eu|euq-pro|*sei}}. No relacionado con el latín ''[[sex#Latín|sex]]'' ni prestado de lenguas romances vecinas.<ref>{{referencia | autor = Trask, Robert Lawrence | fecha = 2008 | url = https://www.sussex.ac.uk/webteam/gateway/file.php?name=lxwp23-08-edb.pdf | título = Etymological Dictionary of Basque | cat=libro | p = 338 | inst = Universidad de Sussex | editor = Wheeler, Max | obs = Todas las variedades romances vecinas tienen una sibilante final en su palabra para 'seis', y por lo tanto un préstamo debería haber producido un ''*seits'' o ''*seis'', en el mejor de los casos.}}</ref> === {{adjetivo cardinal|eu}} === ;1: {{plm|seis}}. [[Categoría:EU:Números]] === Véase también === {{W|idioma=eu}} == {{lengua|it}} == {{pron-graf|leng=it}} === Etimología === {{etimología|leng=it}} === {{adjetivo cardinal|it}} === ;1: {{plm|seis}} === {{adjetivo ordinal|it}} === ;2: {{plm|seis}} === {{sustantivo masculino|it}} === ;3: {{plm|seis}} [[Categoría:IT:Números]] == Referencias y notas == <references /> cqmv9aktsw9jvgf0i4ntej5pw98wgf2 6123485 6123484 2026-07-24T23:07:06Z CarpetanoComplutense 161160 6123485 wikitext text/x-wiki == {{lengua|eu}} == {{pron-graf|leng=eu}} === Etimología === {{etimología|leng=eu|euq-pro|*sei}}.<ref>{{referencia | autor = Trask, Robert Lawrence | fecha = 2008 | url = https://www.sussex.ac.uk/webteam/gateway/file.php?name=lxwp23-08-edb.pdf | título = Etymological Dictionary of Basque | cat=libro | p = 388 | inst = Universidad de Sussex | editor = Wheeler, Max}}</ref> No relacionado con el latín ''[[sex#Latín|sex]]'' ni prestado de lenguas romances vecinas.<ref>{{referencia | autor = Trask, Robert Lawrence | fecha = 2008 | url = https://www.sussex.ac.uk/webteam/gateway/file.php?name=lxwp23-08-edb.pdf | título = Etymological Dictionary of Basque | cat=libro | p = 338 | inst = Universidad de Sussex | editor = Wheeler, Max | obs = Todas las variedades romances vecinas tienen una sibilante final en su palabra para 'seis', y por lo tanto un préstamo debería haber producido un ''*seits'' o ''*seis'', en el mejor de los casos.}}</ref> === {{adjetivo cardinal|eu}} === ;1: {{plm|seis}}. [[Categoría:EU:Números]] === Véase también === {{W|idioma=eu}} == {{lengua|it}} == {{pron-graf|leng=it}} === Etimología === {{etimología|leng=it}} === {{adjetivo cardinal|it}} === ;1: {{plm|seis}} === {{adjetivo ordinal|it}} === ;2: {{plm|seis}} === {{sustantivo masculino|it}} === ;3: {{plm|seis}} [[Categoría:IT:Números]] == Referencias y notas == <references /> 85tkr08t1p0creech4bbcg5eoybb8fe 6123486 6123485 2026-07-24T23:10:40Z CarpetanoComplutense 161160 6123486 wikitext text/x-wiki == {{lengua|eu}} == {{pron-graf|leng=eu}} === Etimología === {{etimología|leng=eu|euq-pro|*sei}}.<ref>{{referencia | autor = Trask, Robert Lawrence | fecha = 2008 | url = https://www.sussex.ac.uk/webteam/gateway/file.php?name=lxwp23-08-edb.pdf | título = Etymological Dictionary of Basque | cat=libro | p = 388 | inst = Universidad de Sussex | editor = Wheeler, Max}}</ref> No relacionado con el latín ''[[sex#Latín|sex]]'' ni prestado de lenguas romances vecinas.<ref>{{referencia | autor = Trask, Robert Lawrence | fecha = 2008 | url = https://www.sussex.ac.uk/webteam/gateway/file.php?name=lxwp23-08-edb.pdf | título = Etymological Dictionary of Basque | cat=libro | p = 338 | inst = Universidad de Sussex | editor = Wheeler, Max | obs = Todas las variedades romances vecinas tienen una sibilante final en su palabra para 'seis', y por lo tanto un préstamo debería haber producido un ''*seits'' o ''*seis'', en el mejor de los casos.}}</ref> === {{adjetivo cardinal|eu}} === ;1: {{plm|seis}}. [[Categoría:EU:Números]] === Véase también === {{W|idioma=eu}} == {{lengua|it}} == {{pron-graf|leng=it}} === Etimología === {{etimología|leng=it|la|sex}}. === {{adjetivo cardinal|it}} === ;1: {{plm|seis}} === {{adjetivo ordinal|it}} === ;2: {{plm|seis}} === {{sustantivo masculino|it}} === ;3: {{plm|seis}} [[Categoría:IT:Números]] == Referencias y notas == <references /> q1u63a3so7p5n3bo5n1bblzpjxtvdtc zazpi 0 78871 6123491 4682957 2026-07-24T23:41:21Z CarpetanoComplutense 161160 6123491 wikitext text/x-wiki == {{lengua|eu}} == {{pron-graf|leng=eu}} === Etimología === {{etimología|leng=eu|euq-pro|*zazpi}}.<ref>{{referencia | autor = Trask, Robert Lawrence | fecha = 2008 | url = https://www.sussex.ac.uk/webteam/gateway/file.php?name=lxwp23-08-edb.pdf | título = Etymological Dictionary of Basque | cat=libro | p = 388 | inst = Universidad de Sussex | editor = Wheeler, Max}}</ref> === {{adjetivo cardinal|eu}} === ;1: {{plm|siete}}. [[Categoría:EU:Números]] === Véase también === {{W|idioma=eu}} == Referencias y notas == <references /> lqctk2fvs46rphrfpp3tscsq5o6ez0b 6123492 6123491 2026-07-24T23:53:17Z CarpetanoComplutense 161160 6123492 wikitext text/x-wiki == {{lengua|eu}} == {{pron-graf|leng=eu}} === Etimología === {{etimología|leng=eu|euq-pro|*zazpi}}.<ref>{{referencia | autor = Trask, Robert Lawrence | fecha = 2008 | url = https://www.sussex.ac.uk/webteam/gateway/file.php?name=lxwp23-08-edb.pdf | título = Etymological Dictionary of Basque | cat=libro | p = 388 | inst = Universidad de Sussex | editor = Wheeler, Max}}</ref> Mitxelena sugiere ''*bortza-z-bi'' ('cinco y dos'), pero es altamente improbable.<ref>{{referencia | autor = Trask, Robert Lawrence | fecha = 2008 | url = https://www.sussex.ac.uk/webteam/gateway/file.php?name=lxwp23-08-edb.pdf | título = Etymological Dictionary of Basque | cat=libro | p = 369 | inst = Universidad de Sussex | editor = Wheeler, Max | obs = Requiere que se haya perdido la primera sílaba original (cuestionable).}}</ref><ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 543 | obs = Orduña (2011a, p. 134) replica que esto es muy improbable ya que la presencia del artículo implica una forma tardía, medieval, para la formación ''ex novo'' de un numeral bajo, ''zazpi'' es vasco común por lo que debe ser anterior a la fragmentación dialectal vasca y no muestra variación alguna.}}</ref> === {{adjetivo cardinal|eu}} === ;1: {{plm|siete}}. [[Categoría:EU:Números]] === Véase también === {{W|idioma=eu}} == Referencias y notas == <references /> oz7lzcn8p5f2srb08bkdvbz2ecluba1 zortzi 0 78873 6123497 5814676 2026-07-25T00:18:42Z CarpetanoComplutense 161160 6123497 wikitext text/x-wiki == {{lengua|eu}} == {{pron-graf|leng=eu|audio=Eus-zortzi.ogg|aunota=San Sebastián}} === Etimología === {{etimología|leng=eu|euq-pro|*zortzi}}.<ref>{{referencia | autor = Trask, Robert Lawrence | fecha = 2008 | url = https://www.sussex.ac.uk/webteam/gateway/file.php?name=lxwp23-08-edb.pdf | título = Etymological Dictionary of Basque | cat=libro | p = 386 | inst = Universidad de Sussex | editor = Wheeler, Max}}</ref> ==== {{adjetivo cardinal|eu}} ==== ;1 {{csem|leng=eu|números}}: {{plm|ocho}}. ==== Véase también ==== {{W|idioma=eu}} == Referencias y notas == <references /> g8wbr4zy2bqh9591xc9up077y3dq3vn WTF 0 86008 6123474 5883499 2026-07-24T22:05:11Z Jh38 175577 /* {{sigla|en}} */ 6123474 wikitext text/x-wiki == {{lengua|en}} == {{pron-graf|leng=en}} === Etimología 1 === {{etimología2|Siglas del inglés "[[what|What]] the [[fuck]]" o "[[who]] the fuck".|leng=en}} ==== {{sigla|en}} ==== ;1: ¿Pero qué coño?, ¿Pero qué demonios? , ¿Pero qué cojones? ([[España]]), ¿Qué chucha? ([[Chile]], [[Perú]]), ¿Qué mierda?, ¿Qué concha? ([[Chile]], [[Argentina]]), ¿Qué paso aquí?, ¿Qué diantres?, ¿Qué carajos?, ¿Qué chingados?, ¿Pero qué chingados?, ¿Pero qué verga?, ¿Pero qué verga esta pasando? ([[México]]), ¿Qué puñeta? ([[Puerto Rico]]), ¿Cómo es la verga? ([Maracaibo-Venezuela]) {{uso|leng=en|malsonante|jerga|internet}} === Etimología 2 === {{etimología2|Siglas del inglés "[[World]] [[Taekwondo]] [[Federation]]".|leng=en}} ==== {{sigla|en}} ==== ;1: Iniciales de la Federación Mundial de [[Taekwondo]]. == Referencias y notas == <references /> 06oxr3aolpbkk2zsdqtsnpoejw18fi6 mortaja 0 94449 6123535 5738632 2026-07-25T03:07:29Z Tmagc 158167 /* {{sustantivo femenino|es}} */ 6123535 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología 1 === {{etimología|la|mortualia|significado=no}}, "[[vestidura]]s [[fúnebre]]s", y esta sustantivación {{etim|la|mortualis}}, {{etim|la|mortuarius}}, {{etim|la|mortuus}}, participio {{etim|la|mori}}, "[[morir]]", en última instancia {{etim|ine-pro|*mr̥-}} o {{l+|ine-pro|*mr̥-to-}}. ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1: {{plm|vestidura}} [[simple]] con que se [[envolver|envuelve]] a los [[difunto]]s para su [[entierro]]. {{sinónimo|sudario}}. ;2: {{plm|hoja}} de [[papel]] con que se enrolla el contenido de un [[cigarrillo]]. {{ámbito|' América cita requerida}} ==== Locuciones ==== * [[mortaja de esparto]]: esterilla ==== Traducciones ==== {{trad-arriba}} {{t|de|a1=1|t1=Totenhemd}} {{t|ar|a1=1|t1=كفن}} {{t|hy|a1=1|t1=սավան}} {{t|ca|a1=1|t1=mortalla|g1=f}} {{t|yue|a1=1|t1=壽衣}} {{t|fa|a1=1|t1=کفن}} {{t|fi|a1=1|t1=käärinliina|t2=kuolinvaate}} {{t|fr|a1=1|t1=linceul|g1=m|t2=suaire|g2=m}} {{t|gd|a1=1|t1=anart-bàis|g1=m}} {{t|el|a1=1|t1=σάβανο|g1=n}} {{t|hu|a1=1|t1=halotti lepel}} {{t|io|a1=1|t1=sepulto-tuko}} {{t|en|a1=1|t1=shroud|t2=winding sheet}} {{t|ku|a1=1|t1=kefen}} {{t|nl|a1=1|t1=lijkgewaad|t2=lijkwade|g2=c}} {{t|pl|a1=1|t1=całun}} {{t|pt|a1=1|t1=sudário}} {{t|ru|a1=1|t1=плащаница|t2=саван|g2=m}} {{t|sv|a1=1|t1=svepning|g1=c}} {{t|tr|a1=1|t1=kefen}} {{t|uk|a1=1|t1=плащаниця}} {{t|ur|a1=1|t1=کفن}} {{trad-abajo}} === Etimología 2 === {{etimología|fro|mortaige}}, y este de origen incierto, quizá {{etim|ar|رز}} (rázza), "[[encajar]]". Compárese el moderno {{l+|fr|mortaise}} o el inglés {{l+|en|mortise}}. ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1 {{csem|carpintería}}: {{plm|depresión}} o [[calado]] que se [[practicar|practica]] en una [[superficie]] para hacer encajar la [[espiga]]. {{sinónimo|muesca}} {{antónimo|espiga}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> e0e1kg5yy96swwaojse0pk9gvqca5lc 6123537 6123535 2026-07-25T03:09:52Z Tmagc 158167 6123537 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología 1 === {{etimología|la|mortualia|significado=no}}, "[[vestidura]]s [[fúnebre]]s", y esta sustantivación {{etim|la|mortualis}}, {{etim|la|mortuarius}}, {{etim|la|mortuus}}, participio {{etim|la|mori}}, "[[morir]]", en última instancia {{etim|ine-pro|*mr̥-}} o {{l+|ine-pro|*mr̥-to-}}. ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1: {{plm|vestidura}} [[simple]] con que se [[envolver|envuelve]] a los [[difunto]]s para su [[entierro]]. {{sinónimo|sudario}}. ;2: {{plm|hoja}} de [[papel]] con que se enrolla el contenido de un [[cigarrillo]]. {{ámbito|' América cita requerida}} ==== Locuciones ==== * [[mortaja de esparto]]: esterilla ==== Traducciones ==== {{trad-arriba}} {{t|de|a1=1|t1=Totenhemd}} {{t|ar|a1=1|t1=كفن}} {{t|hy|a1=1|t1=սավան}} {{t|ca|a1=1|t1=mortalla|g1=f}} {{t|yue|a1=1|t1=壽衣}} {{t|fa|a1=1|t1=کفن}} {{t|fi|a1=1|t1=käärinliina|t2=kuolinvaate}} {{t|fr|a1=1|t1=linceul|g1=m|t2=suaire|g2=m}} {{t|gd|a1=1|t1=anart-bàis|g1=m}} {{t|el|a1=1|t1=σάβανο|g1=n}} {{t|hu|a1=1|t1=halotti lepel}} {{t|io|a1=1|t1=sepulto-tuko}} {{t|en|a1=1|t1=shroud|t2=winding sheet}} {{t|ku|a1=1|t1=kefen}} {{t|nl|a1=1|t1=lijkgewaad|t2=lijkwade|g2=c}} {{t|pl|a1=1|t1=całun}} {{t|pt|a1=1|t1=sudário}} {{t|ru|a1=1|t1=плащаница|t2=саван|g2=m}} {{t|sv|a1=1|t1=svepning|g1=c}} {{t|tr|a1=1|t1=kefen}} {{t|uk|a1=1|t1=плащаниця}} {{t|ur|a1=1|t1=کفن}} {{trad-abajo}} === Etimología 2 === {{etimología|fro|mortaige}}, y este de origen incierto, quizá {{etim|ar|رز}} (rázza), "[[encajar]]". Compárese el moderno {{l+|fr|mortaise}} o el inglés {{l+|en|mortise}}. [[Archivo:Mortise_and_tenon_joint.svg|thumb|(1) Mortaja (izquierda) y espiga (derecha)]] ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1 {{csem|carpintería}}: {{plm|depresión}} o [[calado]] que se [[practicar|practica]] en una [[superficie]] para hacer encajar la [[espiga]]. {{sinónimo|muesca}} {{antónimo|espiga}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> 2j27h4hat5gp0s1aecwd9xfqx3s0dmg estancar 0 100497 6123477 6117841 2026-07-24T22:10:40Z Tmagc 158167 ítems 6123477 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|incierta}}: * Del latín vulgar {{l+|la-vul|*stānticāre}}, del latín {{l+|la|stans|stāntis}}. * Del latín vulgar {{l+|la-vul|*extankāre}}, del galo {{l+|cel-gau|*tankos|glosa=quietud}}. === {{verbo transitivo|es}} === ;1: {{plm|detener}} o [[impedir]] el curso de un [[líquido]].<ref>{{DRAE2001}}</ref> {{uso|utcp}}. ;2: {{plm|parar}}, suspender o interrumpir la [[marcha]] de un [[proceso]]. {{uso|utcp}}. ;3: {{plm|impedir}} o evitar la venta libre de alguna mercancía o materia prima por establecerse el [[monopolio]] de esta. ;4: {{plm|impedir}} que algún objeto o asunto en particular se actualice, hacer que permanezca en un mismo estado a pesar del paso del tiempo. {{uso|por extensión|utcp}} === Conjugación === {{es.v}} === Traducciones === {{trad-arriba}} {{t|fr|a1=1|a2=3|t1=retenir|t2=monopoliser}} {{t|pt|a1=1-2|t1=estancar}} {{trad-abajo}} == Referencias y notas == <references /> ovm87ozhd4877zg4lk6bqccj5j2fmpw opportunities 0 102872 6123397 6044944 2026-07-24T12:44:43Z Adelpine 34679 Agrega algunas transcripciones AFI elaboradas a partir de las de [[opportunity]] + /z/ 6123397 wikitext text/x-wiki == {{lengua|en}} == {{pron-graf|leng=en |pron=Received Pronunciation|fono=ˌɒp.əˈtjuː.nɪ.tɪz|fono2=ˌɒp.əˈt͡ʃuː.nɪ.tɪz|fono2=ˌɒp.əˈt͡ʃuː.nɪ.tɪz|fone3=ˌɒp.əˈt͡ʃʉː.nɪ.tɪz|fnota3=goose fronting|fone4=ˌɒp.əˈt͡ʃy̯ː.nɪ.tɪz|fnota4=goose fronting|audio4=|aunota4=Gran Bretaña, [ˌɒp.əˈt͡ʃɪy̯.nɪ.tɪz] |2pron=General American, Canadá|2fono=ˌɑ.pɚˈtu.nə.tiz|2fone2=ˌɑ.pɚˈtu.nə.ɾiz|2fone3=ˌɑ.pɚˈtʉ.nə.ɾiz|2fnota3=goose fronting|2fone4=ˌɑ.pɚˈty.nɪ.tiz|2fnota4=goose fronting|2fone5=ˌɑ.pɚˈty.nɪ.ɾiz|2fnota5=goose fronting|2audio5=en-us-opportunities.ogg|2aunota5=California|2fone6=ˌɑ.pɚˈt͡ʃu.nɪ.ɾiz|2fone7=ˌɑ.pɚˈt͡ʃʉ.nɪ.ɾiz|2fnota7=goose fronting|2audio7=|2aunota7=Texas, [ˌɑ.pɚˈt͡ʃɪʉ̯.nɪ.ɾiz]|2fone8=ˌɑ.pɚˈt͡ʃɪ.nɪ.ɾiz|2fnota8=goose fronting|2audio8=|2aunota8=Connecticut |3pron=Australia|3fono=ˌɔp.əˈtjʉː.nə.tiz|3fnota1=culto|3fone2=ˌɔp.əˈtjʉː.nə.ɾiz|3fnota2=culto|3fono3=ˌɔp.əˈt͡ʃʉː.nə.tiz|3fone4=ˌɔp.əˈt͡ʃʉː.nə.ɾiz |ls=5 }} === Forma sustantiva === ;1: {{forma sustantivo plural|leng=en|opportunity}}. == Referencias y notas == <references /> qbu75hjeklrbq66k6g2wetw8giiblch indar 0 117996 6123488 5903398 2026-07-24T23:17:19Z CarpetanoComplutense 161160 6123488 wikitext text/x-wiki == {{lengua|eu}} == {{pron-graf|leng=eu}} === Etimología === {{etimología|leng=eu|euq-pro|*indar}}.<ref>{{referencia | autor = Trask, Robert Lawrence | fecha = 2008 | url = https://www.sussex.ac.uk/webteam/gateway/file.php?name=lxwp23-08-edb.pdf | título = Etymological Dictionary of Basque | cat=libro | p = 20 | inst = Universidad de Sussex | editor = Wheeler, Max}}</ref> === {{sustantivo inanimado|eu}} === ;1: {{plm|fuerza}} === Véase también === {{W|idioma=eu}} === Declinación === {{eu.sust|inan}} == Referencias y notas == <references /> s1663j0mvmujvmfofpqigpcydjaciq3 Antumalén 0 131154 6123455 5191356 2026-07-24T18:28:59Z InternetArchiveBot 128971 Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5 6123455 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}} <!-- niña del sol --> === {{sustantivo propio|es}} === ;1: {{antropónimo femenino}}<ref>(Asistente Educacional NOMBRES MAPUCHES [https://web.archive.org/web/20160305003158/http://asistenteeducacional.bligoo.com/content/view/244349/NOMBRES-MAPUCHES.html%26page%3D3%26reverse%3Dtrue])</ref> === Traducciones === {{trad-arriba}} <!-- formato: {{t+|idioma|<acepción#>|palabra|género}} p. ej. {{t+|fr|1|chose|f}} --> {{trad-abajo}} == Referencias y notas == <references /> 5y7lykgg62j8v3qxto004ckdrrlk1k6 ciclo 0 145502 6123400 5859173 2026-07-24T12:48:00Z Jemily1 121719 desambiguación añadida 6123400 wikitext text/x-wiki {{desambiguación|cicló}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|la|cyclus}}, {{etim|grc|κυκλός}}, {{etim|ine-pro|*kuklo|ciclo}}, *[[kweklo]]. El grado pleno de esta raíz está preservado en el inglés [[wheel]]< inglés antiguo [[hweol]] < proto-germánico *[[hwehol]]. === {{sustantivo masculino|es}} === {{es.sust}} ;1: {{plm|periodo}} de tiempo con unas características comunes, en contraposición al periodo anterior o posterior, que tendrá unas características diferentes. ;2 {{csem|ciclismo}}: {{plm|bicicleta}}. === Véase también === {{w}} === Traducciones === {{trad-arriba}} {{t|gl|a1=1|t1=ciclo}} {{t|en|a1=1|t1=cycle}} {{t|it|a1=1|t1=ciclo}} {{trad-abajo}} == Referencias y notas == <references /> 6weblqx6a741x8g3cpszsmzj11xtf8e Palomo 0 153254 6123436 5779043 2026-07-24T15:46:15Z Tmagc 158167 6123436 wikitext text/x-wiki {{desambiguación|palomo}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}} === {{sustantivo propio|es}} === ;1: {{apellido}}. === Véase también === {{w}} <!-- http://www.heraldica.es/ --> == Referencias y notas == <references /> mplmphzqfzxn6t7gzq196xx8msrwnf1 Conor 0 162190 6123503 5474668 2026-07-25T01:06:18Z Tmagc 158167 6123503 wikitext text/x-wiki {{desambiguación|conor}} == {{lengua|en}} == {{pron-graf|leng=en|v1=Connor}} === Etimología 1 === {{etimología|leng=en|ga|Conchúr}}, variante moderna del nombre {{l+|sga|Conchobar}}, significando este "{{l+|es|amante}} de los {{l+|es|lobos}}". ==== {{sustantivo propio|en}} ==== ;1: {{antropónimo masculino|leng=en}}. == Referencias y notas == <references /> 8utl0zxsir3tabterrv527mz6x5jtdg gelatina 0 168792 6123447 5727505 2026-07-24T16:19:54Z Tmagc 158167 /* Etimología 1 */ 6123447 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología 1 === {{etimología|it|gelatina}}. Doblete de [[gel]] y [[helado]]. ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1: {{plm|sustancia}} [[coloidal]], [[sólida]] y [[transparente]] obtenida a partir de la [[cocción]] de algunas partes de los [[animal]]es como [[tejido]] [[conjuntivo]], [[hueso]]s y [[cartílagos]]. ;2 {{csem|alimentos}}: {{plm|alimento}} obtenido con una [[sustancia]] sólida, gelatinosa y transparente mezclada con [[zumo]] de [[fruta]]s. {{ejemplo|Para preparar ''gelatina'' de fresa necesitamos las fresas, el azúcar y el licor de almendra amarga.}} {{sinónimo|jalea}}. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{t|pl|a1=1|t1=żelatyna|t2=galaretka}} {{trad-abajo}} == Referencias y notas == <references /> byh0ax0hbsv3esyxixvmlrmlx8obq0i 6123448 6123447 2026-07-24T16:37:36Z ~2026-34597-22 183061 imagen 6123448 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología 1 === {{etimología|it|gelatina}}. Doblete de [[gel]] y [[helado]]. ==== {{sustantivo femenino|es}} ==== {{es.sust}} [[File:Small orange jelly.jpg|thumb|[2] gelatina de naranja]] ;1: {{plm|sustancia}} [[coloidal]], [[sólida]] y [[transparente]] obtenida a partir de la [[cocción]] de algunas partes de los [[animal]]es como [[tejido]] [[conjuntivo]], [[hueso]]s y [[cartílagos]]. ;2 {{csem|alimentos}}: {{plm|alimento}} obtenido con una [[sustancia]] sólida, gelatinosa y transparente mezclada con [[zumo]] de [[fruta]]s. {{ejemplo|Para preparar ''gelatina'' de fresa necesitamos las fresas, el azúcar y el licor de almendra amarga.}} {{sinónimo|jalea}}. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{t|pl|a1=1|t1=żelatyna|t2=galaretka}} {{trad-abajo}} == Referencias y notas == <references /> 5ja2c6kv5mg1c6bmsjzk5fcm6i22mby sequor 0 172445 6123505 5904632 2026-07-25T01:35:32Z Tmagc 158167 /* Conjugación */ 6123505 wikitext text/x-wiki == {{lengua|la}} == {{pron-graf|leng=la|pron=clásico|fone=ˈsɛ.kʷɔr}} === Etimología === {{etimología|leng=la|itc-pro|*sekʷ-}}e/o-, y este del protoindoeuropeo {{l+|ine-pro|ine=x|*sekʷ-}} ("[[seguir]]", "[[acompañar]]").<ref name="vaan">{{DeVaan|555-556}}</ref> Compárese el sánscrito {{l+|sa|सचते}} (sácate "[[seguir]]", "[[perseguir]]"), el griego antiguo {{l+|grc|ἕπομαι|tr=hepomai|glosa=seguir}}, el lituano {{l+|lt|sèkti}} ("[[seguir]]", "[[perseguir]]") y el gótico {{l+|got|𐍃𐌰𐌹𐍈𐌰𐌽|tr=saihwan|glosa=ver}}.<ref name="vaan" /> → {{l+|la|insece|īnsece}}, {{l+|la|secus}}, {{l+|la|socius}} === {{verbo transitivo|la}} === ;1: {{plm|ir}} detrás, [[seguir]].<ref name="ol">{{Oxf-lat}}</ref> ;2: {{plm|perseguir}}, [[intentar]] [[alcanzar]].<ref name="ol" /> ;3: {{plm|suceder}}.<ref name="ol" /> ;4: {{plm|corresponder}}. {{uso|leng=la|dícese especialmente de premios o castigos}}.<ref name="ol" /> ;5: {{plm|corresponder}} en [[herencia]] (u otros procesos legales). {{uso|leng=la|dícese de propiedades, responsabilidades, etc.}}<ref name="ol" /> ;6: {{plm|ser}} el [[siguiente]], [[seguir]], [[venir]] después. {{uso|leng=la|en sucesiones de cosas, eventos, etc.}}<ref name="ol" /> ;7: {{plm|proseguir}}, [[continuar]].<ref name="ol" /> ;8: {{plm|seguir}} [[orden|órdenes]], [[obedecer]].<ref name="ol" /> ;9: {{plm|seguir}} el [[ejemplo]].<ref name="ol" /> ;10: {{plm|tomar}} por [[guía]].<ref name="ol" /> ;11: {{plm|actuar}} [[acorde]] con.<ref name="ol" /> ;12: {{plm|acompañar}}, [[escoltar]].<ref name="ol" /> ;13: {{plm|seguir}}, [[aliar]]se. {{uso|leng=la|política, guerra}}.<ref name="ol" /> ;14: {{plm|unir}}se, [[adherir]]se. {{uso|leng=la|a partidos, causas, doctrinas, filosofías, etc.}}<ref name="ol" /> ;15: {{plm|intentar}} [[llegar]] a.<ref name="ol" /> ;16: {{plm|tratar}} de [[obtener]], [[buscar]].<ref name="ol" /> ;17: {{plm|obtener}}, [[alcanzar]].<ref name="ol" /> ;18: {{plm|seguir}}, [[recorrer]]. {{uso|leng=la|una línea, un camino, etc., físicamente, con la vista, con la mano, etc.}}<ref name="ol" /> ;19: {{plm|seguir}} con el [[oído]].<ref name="ol" /> ;20: {{plm|recorrer}} una [[narrativa]], [[hacer]] un [[recuento]] de una [[narrativa]].<ref name="ol" /> ;21: {{plm|examinar}}. {{uso|leng=la|documentos, textos, etc.}}<ref name="ol" /> ==== Información adicional ==== {{derivad|assequor|assecue|assecula|consequor|consectarius|consecutio|conseque|consequens|consequenter|consequentia|consequius|exsequor|exsecutio|exsecutor|exsequens|exsequiae|insequor|insecundus|insecutio|insecutor|obsequor|obsecula|obsequella|obsequens|obsequenter|obsequentia|obsequibilis|obsequium|obsequiosus|pedisequus|pedisequa|pedisequarius|pedisecuaria|persequor|persecutio|persequens|prosequor|prosecutor|prosequium|secta|sector|assector|consector|consectatio|insector|insectator|persector|sectarius|sectator|secundus|secundani|secundarius|subsecundarius|secunde|secundo|obsecundo|obsecundanter|secundum|secutorius|secutor|secutuleius|sequax|persequax|sequella|sequens|sequentia|subsequor|subsequens}} ==== Descendientes ==== {{trad-arriba|Descendientes}} {{d|ca|niv=1|d1=seguir}} {{d|es|niv=1|d1=seguir}} {{d|eo|niv=1|d1=sekvi}} {{d|fr|niv=1|d1=suivre}} {{d|it|niv=1|d1=seguire}} {{d|oc|niv=1|d1=seguir}} {{d|pt|niv=1|d1=seguir}} {{trad-abajo}} === Conjugación === {{la.v|3|sequor|secūt|nucleoperf2=sequūt|secūt|nucleosup2=sequūt}} == Referencias y notas == <references /> 9xjyleo12zbu8qw39ufemetylrefeyz confido 0 176890 6123502 6060557 2026-07-25T01:04:51Z Tmagc 158167 /* Conjugación */ 6123502 wikitext text/x-wiki == {{lengua|la}} == {{pron-graf|leng=la|ayuda=cōnfīdō}} === Etimología === {{etimología|leng=la|prefijo|con|glosa=con|fido|alt2=fīdō, -ere|glosa2=confiar}}.<ref name="ol">{{Oxf-lat}}</ref> === {{verbo intransitivo|la}} === ;1: {{plm|poner}}le su [[confianza]] a, [[tener]] [[confianza]] en. {{uso|leng=la|con ablativo o dativo}}.<ref name="ol" /> {{ejemplo|leng=la|sibi confidere|trad=tenerse confianza, ser seguro de sí mismo.}} ;2: {{plm|confiar}}, [[estar]] [[seguro]]. {{uso|leng=la|con infinitivo y acusativo}}.<ref name="ol" /> === Conjugación === {{la.v|3|semidepon=v|cōnfīdō|cōnfīs|cōnfīs}} == Referencias y notas == <references /> 755r810pkvl0jqhdmc2y798okeral14 sak bok 0 177142 6123512 6040414 2026-07-25T02:16:20Z 26agcp 138617 /* {{lengua|yua}} */ amplío información, agrego imagen y referencias 6123512 wikitext text/x-wiki == {{lengua|yua}} == {{pron-graf|leng=yua}} === Etimología === {{etimología|leng=yua}}. [[Archivo:Garceta nivea, Humedal Batuco.jpg|thumb|(1)]] ==== {{locución|yua|sustantiva}} ==== {{yua.sust}} ;1 {{csem|aves|leng=yua}}: {{impropia|(nombre de varias especies, en particular [[w:Egretta thula|Egretta thula]])}} {{plm|garza}} de color {{l|es|blanco}}.<ref>{{Cordemex|p=711|cita=SAK BOK}}</ref><ref>{{referencia|c=libro|a1=Alfredo Dorantes Euan|a2=Ingrid A. Tello López|a3=Aldo I. Echeverría Caro|a4=Gerardo I. Linares Hernández|a5=Ariadna Ibarra Morales|a6=Davira Y. Palma Cancino|a7=Darleny R. Sanmiguel Caamal|a8=Sebastián Gay Escalante|a9=Richard E. Feldman|u=https://www.cicy.mx/Documentos/CICY/sitios/CircuitoEtnobiologico/Repositorio/Etapa4/Acceso-Universal/2024_Catalogo-aves-CICY.pdf|t=Guía de aves del Jardín Botánico Regional “Roger Orellana”|f=2024|editorial=Centro de Investigación Científica de Yucatán|edición=2|formato=PDF|lugar=México|p=145}}</ref> == Referencias y notas == <references /> 92scwqy5fm8j2diro2020mihivgnken beechʼ 0 203219 6123528 5318101 2026-07-25T02:55:29Z 26agcp 138617 /* {{lengua|yua}} */ 6123528 wikitext text/x-wiki == {{lengua|yua}} == {{pron-graf|leng=yua|g=beech'}} === Etimología === {{etimología|leng=yua}}. [[Archivo:Colinus nigrogularis 1 (cropped).jpg|thumb|(1)]] ==== {{sustantivo|yua}} ==== {{yua.sust}} ;1 {{csem|aves|leng=yua}}: {{plm|codorniz}}.<ref>{{ALMY 2007|p=24|cita=BEECH’}}</ref> == Referencias y notas == <references /> gy1ineo4hel5bchi3uwp10qjnraumsh exclamares 0 242546 6123415 5544270 2026-07-24T13:41:31Z Jemily1 121719 quito desambiguación 6123415 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|exclamar|p=2stv|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> cap4k9hqewt6anjo158xu8yzvkbem5c rescoldare 0 255293 6123408 5551539 2026-07-24T12:54:10Z Jemily1 121719 desambiguación corregida 6123408 wikitext text/x-wiki {{desambiguación|rescoldaré}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|rescoldar|p=1s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} ;2: {{forma verbo|rescoldar|p=3s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> 9s9pezm69rflrr614j113fd51tjhjn9 orzareis 0 306699 6123406 5550049 2026-07-24T12:52:25Z Jemily1 121719 desambiguación corregida 6123406 wikitext text/x-wiki {{desambiguación|orzaréis}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|orzar|p=2p|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> 5ozbwpb4n0fafr2t5pa7vyt973cqbk7 orzare 0 306701 6123405 5527099 2026-07-24T12:51:38Z Jemily1 121719 desambiguación corregida 6123405 wikitext text/x-wiki {{desambiguación|orzaré}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|orzar|p=1s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} ;2: {{forma verbo|orzar|p=3s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> 5t0eivaegwo8zqby6n8wgvbzsh4memv orzares 0 306790 6123404 5523790 2026-07-24T12:50:57Z Jemily1 121719 desambiguación eliminada 6123404 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|orzar|p=2stv|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> fx7m33f2f8fmey8bgxi4yflgvwlx8ea critiquizaras 0 327045 6123398 5957410 2026-07-24T12:46:02Z Jemily1 121719 desambiguación añadida 6123398 wikitext text/x-wiki {{desambiguación|critiquizarás}} == {{lengua|es}} == {{pron-graf|v1=critiquizases}} === Forma verbal === ;1: {{forma verbo|critiquizar|m=subjuntivo|p=2stv|t=imperfecto}}. == Referencias y notas == <references /> i17pdc6az81xymex2cjv8yg5um9ttc4 critiquizare 0 327058 6123399 5529651 2026-07-24T12:46:51Z Jemily1 121719 desambiguación corregida 6123399 wikitext text/x-wiki {{desambiguación|critiquizaré}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|critiquizar|p=1s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} ;2: {{forma verbo|critiquizar|p=3s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> mnnbm8692j1zpyljabde5nbocnfirx5 caballereáremos 0 327458 6123414 5531906 2026-07-24T12:59:27Z Jemily1 121719 desambiguación corregida 6123414 wikitext text/x-wiki {{desambiguación|caballerearemos}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|caballerear|p=1p|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> 059z22qqw9w9i5tw95o7yndr4op1eon caballereare 0 327472 6123413 5546884 2026-07-24T12:58:25Z Jemily1 121719 desambiguación corregida 6123413 wikitext text/x-wiki {{desambiguación|caballerearé}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|caballerear|p=1s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} ;2: {{forma verbo|caballerear|p=3s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> itpf7ttyuxe048sh42m712dtqyv3o5a espurreáremos 0 343088 6123407 5550363 2026-07-24T12:52:58Z Jemily1 121719 desambiguación corregida 6123407 wikitext text/x-wiki {{desambiguación|espurrearemos}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|espurrear|p=1p|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> osuc07l6bh4ivencfxxlwj5q16yizx8 afufáremos 0 411147 6123412 5547987 2026-07-24T12:57:46Z Jemily1 121719 desambiguación corregida 6123412 wikitext text/x-wiki {{desambiguación|afufaremos}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|afufar|p=1p|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> g00bwcldk3tosf8udud16vj2506y0a4 ciclare 0 457992 6123402 5549835 2026-07-24T12:49:22Z Jemily1 121719 desambiguación corregida 6123402 wikitext text/x-wiki {{desambiguación|ciclaré}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|ciclar|p=1s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} ;2: {{forma verbo|ciclar|p=3s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> 7ee0daernw01zn0dchgnrcr1dtdb3sq ciclareis 0 457997 6123403 5550020 2026-07-24T12:50:14Z Jemily1 121719 desambiguación corregida 6123403 wikitext text/x-wiki {{desambiguación|ciclaréis}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|ciclar|p=2p|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> jvnc8f7fivz9h4c23vvkexyuau72siz ciclá 0 458000 6123401 4011176 2026-07-24T12:48:31Z Jemily1 121719 desambiguación añadida 6123401 wikitext text/x-wiki {{desambiguación|cicla}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|ciclar|p=vos|t=imperativo|afirmativo=s|enclítico=|pencl=}}. {{uso}} para el negativo se emplea el presente del [[subjuntivo]]. {{relacionado|cicla|nota1=tú}}. == Referencias y notas == <references /> b18ph58e2g1j2nfai2hhbcxmjwuefol esfúmate 0 487823 6123465 4457153 2026-07-24T20:19:28Z Charlyfar 7832 /* Forma verbal */ 6123465 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|esfumarse|p=tú|t=imperativo|afirmativo=s|enclítico=s|pencl=te}}. {{uso}} para el negativo se emplea el presente del [[subjuntivo]]. {{relacionado|esfumate|nota1=vos}}. *:'''Nota''': Se usa mayormente como una manera de decirle a una persona que se marche de un lugar. == Referencias y notas == <references /> kbtczl0uh2c1uw1p496m2y3rwe89fbs 6123466 6123465 2026-07-24T20:23:11Z Tmagc 158167 Revertido el cambio de [[Special:Contributions/Charlyfar|Charlyfar]] ([[User talk:Charlyfar|disc.]]) a la última edición de [[User:HydrizBot|HydrizBot]] 4457153 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|esfumarse|p=tú|t=imperativo|afirmativo=s|enclítico=s|pencl=te}}. {{uso}} para el negativo se emplea el presente del [[subjuntivo]]. {{relacionado|esfumate|nota1=vos}}. == Referencias y notas == <references /> az4akkt1veaf870uuls0lb7573bw12j engurruminare 0 521812 6123417 5550483 2026-07-24T13:43:14Z Jemily1 121719 desambiguación corregida 6123417 wikitext text/x-wiki {{desambiguación|engurruminaré}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|engurruminar|p=1s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} ;2: {{forma verbo|engurruminar|p=3s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> adf1m2lvr25x7ag7gf5djkr2qcktzn1 engurrumináremos 0 521833 6123418 5550914 2026-07-24T13:43:59Z Jemily1 121719 desambiguación corregida 6123418 wikitext text/x-wiki {{desambiguación|engurruminaremos}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|engurruminar|p=1p|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> 5g6m0nyjsrc0hn3kx7mm6y5g18svm2s engurruminá 0 521846 6123416 4019267 2026-07-24T13:42:31Z Jemily1 121719 desambiguación añadida 6123416 wikitext text/x-wiki {{desambiguación|engurrumina}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|engurruminar|p=vos|t=imperativo|afirmativo=s|enclítico=|pencl=}}. {{uso}} para el negativo se emplea el presente del [[subjuntivo]]. {{relacionado|engurrumina|nota1=tú}}. == Referencias y notas == <references /> bb0cjjtwjwtgmhbmvjjfh8awxoq23bq reabriéremos 0 557558 6123563 5519288 2026-07-25T08:50:52Z Jemily1 121719 quito desambiguación 6123563 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|reabrir|p=1p|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> 4fzzwmw2kv956zji5w2ns1bgpna7408 reabriere 0 557568 6123560 5508230 2026-07-25T08:46:42Z Jemily1 121719 quito desambiguación 6123560 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|reabrir|p=1s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} ;2: {{forma verbo|reabrir|p=3s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> pri4iqqznoawdqhub0zpuwacozmg3iv reabrieres 0 557569 6123561 5510677 2026-07-25T08:47:22Z Jemily1 121719 quito desambiguación 6123561 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|reabrir|p=2stv|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> 818262yg1lagyg3hpovcmiu2n4p4tdh reabriereis 0 557570 6123564 5542000 2026-07-25T08:51:20Z Jemily1 121719 quito desambiguación 6123564 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|reabrir|p=2p|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> nh2rknkexq5kan8r8bub7ne3p1tf4xm reabrieren 0 557572 6123562 5549246 2026-07-25T08:48:54Z Jemily1 121719 quito desambiguación 6123562 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|reabrir|p=3p|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> 79hmhufje0bjzgb4zd2yn6ezarl9amr trafulcare 0 620166 6123409 5540396 2026-07-24T12:55:06Z Jemily1 121719 desambiguación corregida 6123409 wikitext text/x-wiki {{desambiguación|trafulcaré}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|trafulcar|p=1s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} ;2: {{forma verbo|trafulcar|p=3s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> ghjxyl06vcc6wwuqp52trs2tqii535j trafulcáremos 0 620169 6123410 5525367 2026-07-24T12:55:58Z Jemily1 121719 desambiguación corregida 6123410 wikitext text/x-wiki {{desambiguación|trafulcaremos}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|trafulcar|p=1p|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> ohldb2cexsbskkrc2i5vhk4m6xafneb embornare 0 676361 6123567 5539750 2026-07-25T10:41:03Z Jemily1 121719 corrijo desambiguación 6123567 wikitext text/x-wiki {{desambiguación|embornaré}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|embornar|p=1s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} ;2: {{forma verbo|embornar|p=3s|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> 7q5fnyeufjbca95kb9yjw0iiie7es8m embornáremos 0 676365 6123568 5531550 2026-07-25T10:41:40Z Jemily1 121719 corrijo desambiguación 6123568 wikitext text/x-wiki {{desambiguación|embornaremos}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|embornar|p=1p|t=futuro|m=subjuntivo}}. {{uso|anticuado}} == Referencias y notas == <references /> c3itqfaetmzdq3csogxnbz3zt40hxae emborná 0 676366 6123566 4017194 2026-07-25T10:40:19Z Jemily1 121719 añado desambiguación 6123566 wikitext text/x-wiki {{desambiguación|emborna}} == {{lengua|es}} == {{pron-graf}} === Forma verbal === ;1: {{forma verbo|embornar|p=vos|t=imperativo|afirmativo=s|enclítico=|pencl=}}. {{uso}} para el negativo se emplea el presente del [[subjuntivo]]. {{relacionado|emborna|nota1=tú}}. == Referencias y notas == <references /> ics9r7netrkd09w17h0och45hx8lt1c gofre 0 722706 6123522 5746177 2026-07-25T02:49:31Z Tmagc 158167 6123522 wikitext text/x-wiki {{desambiguación|gofré}} == {{lengua|es}} == {{pron-graf}} === Etimología 1 === {{etimología|fr|gaufre}}, y este {{etim|frk|*wafla}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|gastronomía}}: {{plm|wafle}}. === Forma flexiva === ==== Forma verbal ==== ;1: {{forma verbo|gofrar|1s|t=presente|m=subjuntivo}}. ;2: {{forma verbo|gofrar|3s|presente|subjuntivo}}. ;3 : {{forma verbo|gofrar|p=usted|m=imperativo}}. == Referencias y notas == <references /> pquvexbzwp7vrzcjrfqee1he3bn323m 6123523 6123522 2026-07-25T02:50:17Z Tmagc 158167 /* {{sustantivo masculino|es}} */ 6123523 wikitext text/x-wiki {{desambiguación|gofré}} == {{lengua|es}} == {{pron-graf}} === Etimología 1 === {{etimología|fr|gaufre}}, y este {{etim|frk|*wafla}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|gastronomía}}: {{plm|wafle}}. {{ámbito|España}} === Forma flexiva === ==== Forma verbal ==== ;1: {{forma verbo|gofrar|1s|t=presente|m=subjuntivo}}. ;2: {{forma verbo|gofrar|3s|presente|subjuntivo}}. ;3 : {{forma verbo|gofrar|p=usted|m=imperativo}}. == Referencias y notas == <references /> 31kmjlyscehl1z23hkzpluqleym6vbm narcisismo 0 872636 6123434 5926882 2026-07-24T15:44:39Z Tmagc 158167 /* Etimología */ 6123434 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|sufijo|narciso|ismo}}. === {{sustantivo masculino|es}} === {{es.sust}} ;1: {{plm|admiración}} o amor excesivo hacia uno mismo. {{relacionado|narciso}} ;2 {{csem|psicología}}: {{plm|complacimiento}} [[exagerar|exagerado]] [[acerca de]] [[galanura]] de la [[imagen]] y de las [[capacidad]]es de la propia [[persona]]. {{sinónimo|egolatría}} {{relacionado|autoestima|narciso|presunción|vanidad}} {{ejemplo|El '''''narcisismo''''' o [[trastorno]] ''narcisista'' es un [[diagnóstico]] dentro de la [[clasificación]] de los trastornos de la [[personalidad]]. La [[rabia]] ''narcisista'' se produce cuando una persona con '''''narcisismo''''' [[percibir|percibe]] que está siendo atacada por otra.|c=pagina|t=¿Cómo influyen tus emociones en tu comportamiento?|u=http://www.ehowenespanol.com/cuales-son-causas-rabia-narcisista-lista_112397/}} === Véase también === {{w}} * [[ego]] * [[egocentrismo]] === Traducciones === {{trad-arriba}} {{t|af|t1=narsisme}} {{t|de|t1=Narzissmus}} {{t|ar|t1=نرجسية}} {{t|arz|t1=نرجسيه}} {{t|be|t1=нарцысізм}} {{t|bg|t1=нарцисизъм}} {{t|ca|t1=narcisisme}} {{t|cs|t1=narcismus}} {{t|ko|t1=나르시시즘}} {{t|da|t1=narcissisme}} {{t|sh|t1=narcizam|t2=нарцисоидност}} {{t|sk|t1=narcizmus}} {{t|sl|t1=narcizem}} {{t|eo|t1=narcisismo}} {{t|et|t1=nartsissism}} {{t|fi|t1=narsismi}} {{t|fr|t1=narcissisme}} {{t|ka|t1=ნარცისიზმი}} {{t|el|t1=ναρκισσισμός}} {{t|he|t1=נרקיסיזם}} {{t|hi|t1=आत्मरति}} {{t|hu|t1=nárcizmus}} {{t|id|t1=narsisisme}} {{t|en|t1=narcissism}} {{t|ga|t1=naircisíocht}} {{t|it|t1=narcisismo}} {{t|ja|t1=ナルシシズム}} {{t|kn|t1=ಆತ್ಮರತಿ}} {{t|kk|t1=нарциссизм}} {{t|ku|t1=narsîsîzm}} {{t|lt|t1=narcisizmas}} {{t|lb|t1=Narzissmus}} {{t|sq|t1=narzissmus}} {{t|zh|t1=自戀}} {{t|nl|t1=narcisme}} {{t|nb|t1=narsissisme}} {{t|fa|t1=خودشیفتگی}} {{t|pl|t1=narcyzm}} {{t|pt|t1=narcisismo}} {{t|ro|t1=narcisism}} {{t|ru|t1=нарциссизм}} {{t|sh|t1=narcizam}} {{t|sv|t1=narcissism}} {{t|ta|t1=தற்காதல்}} {{t|tr|t1=narsisizm}} {{t|uk|t1=нарцисизм}} {{trad-abajo}} == Referencias y notas == <references /> olqgxm4eelie612lmpbxp56tvbdorg4 amortajar 0 873491 6123549 5800414 2026-07-25T03:24:53Z Tmagc 158167 6123549 wikitext text/x-wiki {{desambiguación}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|confijo|a|mortaja|ar}}. === {{verbo transitivo|es}} === ;1: Poner la [[mortaja]] al difunto.<ref name="au">{{DLC1914|64}}.</ref> ;2: Por extensión, [[cubrir]], [[envolver]]. ;3: Cavar la mortaja en la madera. === Conjugación === {{es.v}} === Véase también === * [[amortajado]] === Traducciones === {{trad-arriba}} <!--{{t+|de|?|}}--> <!--{{t+|ar|?|}}--> <!--{{t+|bg|?|}}--> <!--{{t+|ca|?|}}--> <!--{{t+|eo|?|}}--> <!--{{t+|fr|?|}}--> <!--{{t+|en|?|}}--> <!--{{t+|it|?|}}--> <!--{{t+|ja|?|}}--> <!--{{t+|nl|?|}}--> <!--{{t+|pl|?|}}--> <!--{{t+|pt|?|}}--> {{trad-abajo}} == Referencias y notas == <references /> 4o4lkiolm5y55touynal1skykqd7bze 6123550 6123549 2026-07-25T03:25:23Z Tmagc 158167 /* {{verbo transitivo|es}} */ 6123550 wikitext text/x-wiki {{desambiguación}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|confijo|a|mortaja|ar}}. === {{verbo transitivo|es}} === ;1: Poner la [[mortaja]] al difunto.<ref name="au">{{DLC1914|64}}.</ref> ;2: Por extensión, [[cubrir]], [[envolver]]. ;3: Calar la mortaja en la madera. === Conjugación === {{es.v}} === Véase también === * [[amortajado]] === Traducciones === {{trad-arriba}} <!--{{t+|de|?|}}--> <!--{{t+|ar|?|}}--> <!--{{t+|bg|?|}}--> <!--{{t+|ca|?|}}--> <!--{{t+|eo|?|}}--> <!--{{t+|fr|?|}}--> <!--{{t+|en|?|}}--> <!--{{t+|it|?|}}--> <!--{{t+|ja|?|}}--> <!--{{t+|nl|?|}}--> <!--{{t+|pl|?|}}--> <!--{{t+|pt|?|}}--> {{trad-abajo}} == Referencias y notas == <references /> sq0tpe69yn39bmrjls52o1x85fm3vjg baach 0 881856 6123519 5318081 2026-07-25T02:40:09Z 26agcp 138617 /* {{lengua|yua}} */ + imagen y referencia 6123519 wikitext text/x-wiki {{desambiguación|bach|Bach|bách|bạch|bac̱h|}} == {{lengua|yua}} == {{pron-graf|leng=yua}} === Etimología === {{etimología|leng=yua}}. [[Archivo:Plain Chachalaca Roadside.png|thumb|(1)]] ==== {{sustantivo|yua}} ==== {{yua.sust}} ;1 {{csem|aves|leng=yua}}: {{taxón|Ortalis}} {{plm|chachalaca}}.<ref>{{ALMY 2007|p=18|cita=BAACH}}</ref> {{sinónimo|leng=yua|kobaʼ}} == Referencias y notas == <references /> 39e8z19gohe321yosq9yka5ynncu3tb pichʼ 0 946607 6123571 5615198 2026-07-25T11:16:57Z 26agcp 138617 /* {{lengua|yua}} */ 6123571 wikitext text/x-wiki {{desambiguación|pich|piich}} == {{lengua|yua}} == {{pron-graf|leng=yua|g=pich'}} === Etimología === {{etimología|leng=yua}}. [[Archivo:Melodious Blackbird (8258746422).jpg|thumb|(1)]] ==== {{sustantivo|yua}} ==== {{yua.sust}} ;1 {{csem|aves|leng=yua}}: {{taxón|Dives dives}} {{plm|tordo}} cantor.<ref>{{ALMY 2007|p=172|cita=PICH’}}</ref> == Referencias y notas == <references /> dqx4t6k1ejpdlwlen3zzns0dl9jxt4t lontananza 0 979279 6123456 5730127 2026-07-24T18:36:11Z Tmagc 158167 /* Etimología */ 6123456 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|it|lontananza}}, de {{l+|it|lontano|glosa=lejos}}. === {{sustantivo femenino|es}} === {{es.sust}} ;1 {{csem|arte|pintura}}: {{plm|términos}} de un cuadro más distantes del plano principal.<ref>{{DLC1914|627}}</ref> {{ejemplo|De cuando en cuando<br>Alguna corazonada<br>Que terminó siendo un viaje a la nada<br>Es la lontananza de la esperanza<br>La ruta más popular|c=canción|t=La Calavera|a=Bersuit Vergarabat|f=2004}} === Locuciones === * [[en lontananza]] === Traducciones === {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> hp3rpo8d2x3gawxipdmb41fmmnkc3s3 wafle 0 1012286 6123520 6052546 2026-07-25T02:48:54Z Tmagc 158167 6123520 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología 1 === {{etimología|en|waffle}}, y este {{etim|nl|wafel}}. [[Archivo:Waffles with Strawberries.jpg|miniaturadeimagen|(1) afles con [[frutilla|frutillas]]]] [[File:Knitted_Waffle_fabric.jpg|thumb|(2)]] ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|gastronomía}}: Galleta de harina, huevo y leche, prensada con un patrón cuadriculado. Frecuentemente se come caliente y con algún tipo de aditivo dulce o salado.<ref>{{Damer}}</ref> {{ámbito|Latinoamérica}} {{sinónimo|gofre|guafle|''waffle''}} {{hiperónimo|comida|postre}} {{relacionado|waflera}} {{ejemplo|Disfruta de esta deliciosa receta de ''wafles''.|url=https://cocinamia.com.mx/receta/como-hacer-wafles/|título=¿Cómo hacer wafles?|fecha=2021|c=pagina|fc=2023-1-13}} {{ejemplo|Nada tiene de malo un ''wafle'' crocante por fuera y esponjoso por dentro, cubierto de mantequilla y jarabe de arce.|url=https://feeds.aarp.org/hogar-familia/casa-jardin/info-2022/recetas-para-waflera.html?_amp=true|título=Recetas ingeniosas para hacer en la waflera (y no son wafles)|autor=Terry Ward|fecha=2022|c=pagina|sitio=AARP|fc=2023-1-13}} ;2 {{csem|textiles}}: Tipo de tela que tiene un relieve cuadriculado que imita la superficie de un wafle. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{t|eo|a1=1|t1=vaflo}} {{t|en|a1=1|t1=waffle}} {{trad-abajo}} == Referencias y notas == <references /> cuxt74ca8pgvy2vvma67h8hqdclc7uw 6123521 6123520 2026-07-25T02:49:07Z Tmagc 158167 6123521 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología 1 === {{etimología|en|waffle}}, y este {{etim|nl|wafel}}. [[Archivo:Waffles with Strawberries.jpg|miniaturadeimagen|(1) afles con [[frutilla|frutillas]]]] [[File:Knitted_Waffle_fabric.jpg|thumb|(2)]] ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|gastronomía}}: Galleta de harina, huevo y leche, prensada con un patrón cuadriculado. Frecuentemente se come caliente y con algún tipo de aditivo dulce o salado.<ref>{{Damer}}</ref> {{ámbito|Latinoamérica}} {{sinónimo|gofre}} {{hiperónimo|comida|postre}} {{relacionado|waflera}} {{ejemplo|Disfruta de esta deliciosa receta de ''wafles''.|url=https://cocinamia.com.mx/receta/como-hacer-wafles/|título=¿Cómo hacer wafles?|fecha=2021|c=pagina|fc=2023-1-13}} {{ejemplo|Nada tiene de malo un ''wafle'' crocante por fuera y esponjoso por dentro, cubierto de mantequilla y jarabe de arce.|url=https://feeds.aarp.org/hogar-familia/casa-jardin/info-2022/recetas-para-waflera.html?_amp=true|título=Recetas ingeniosas para hacer en la waflera (y no son wafles)|autor=Terry Ward|fecha=2022|c=pagina|sitio=AARP|fc=2023-1-13}} ;2 {{csem|textiles}}: Tipo de tela que tiene un relieve cuadriculado que imita la superficie de un wafle. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{t|eo|a1=1|t1=vaflo}} {{t|en|a1=1|t1=waffle}} {{trad-abajo}} == Referencias y notas == <references /> qeabk1xpol9ci1b88joszxakt3ujwm0 6123524 6123521 2026-07-25T02:50:39Z Tmagc 158167 6123524 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología 1 === {{etimología|en|waffle}}, y este {{etim|nl|wafel}}. [[Archivo:Waffles with Strawberries.jpg|miniaturadeimagen|(1) Wafles con [[frutilla|frutillas]]]] [[File:Knitted_Waffle_fabric.jpg|thumb|(2)]] ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|gastronomía}}: Galleta de harina, huevo y leche, prensada con un patrón cuadriculado. Frecuentemente se come caliente y con algún tipo de aditivo dulce o salado.<ref>{{Damer}}</ref> {{ámbito|Latinoamérica}} {{sinónimo|gofre}} {{hiperónimo|comida|postre}} {{relacionado|waflera}} {{ejemplo|Disfruta de esta deliciosa receta de ''wafles''.|url=https://cocinamia.com.mx/receta/como-hacer-wafles/|título=¿Cómo hacer wafles?|fecha=2021|c=pagina|fc=2023-1-13}} {{ejemplo|Nada tiene de malo un ''wafle'' crocante por fuera y esponjoso por dentro, cubierto de mantequilla y jarabe de arce.|url=https://feeds.aarp.org/hogar-familia/casa-jardin/info-2022/recetas-para-waflera.html?_amp=true|título=Recetas ingeniosas para hacer en la waflera (y no son wafles)|autor=Terry Ward|fecha=2022|c=pagina|sitio=AARP|fc=2023-1-13}} ;2 {{csem|textiles}}: Tipo de tela que tiene un relieve cuadriculado que imita la superficie de un wafle. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{t|eo|a1=1|t1=vaflo}} {{t|en|a1=1|t1=waffle}} {{trad-abajo}} == Referencias y notas == <references /> tdfgui80eg0sdki93padiwtb40m3w8z yúuyum 0 1017052 6123570 5928286 2026-07-25T11:05:47Z 26agcp 138617 /* {{lengua|yua}} */ formato 6123570 wikitext text/x-wiki == {{lengua|yua}} == {{pron-graf|leng=yua}} === Etimología === {{etimología|leng=yua}}. [[Archivo:Icterus auratus 60726713.jpg|thumb|(1)]] ==== {{sustantivo|yua}} ==== {{yua.sust}} ;1 {{csem|aves|leng=yua}}: {{taxón|Icterus auratus|Icterus gularis}} {{plm|bolsero}}, [[oropéndola]].<ref>{{ALMY 2007|p=274|cita=YÚUYUM}}</ref> == Referencias y notas == <references /> jsrhjubu44jm173k0682pkkc0f524s1 CP 0 1027882 6123419 5181206 2026-07-24T15:20:00Z ~2026-41134-51 183681 /* {{sigla|en}} */ 6123419 wikitext text/x-wiki 6123420 6123419 2026-07-24T15:21:21Z ~2026-41134-51 183681 /* {{sigla|en}} */ 6123420 wikitext text/x-wiki 6123421 6123420 2026-07-24T15:21:55Z ~2026-41134-51 183681 /* {{lengua|en}} */ 6123421 wikitext text/x-wiki 6123422 6123421 2026-07-24T15:22:33Z Tmagc 158167 Revertidos los cambios de [[Special:Contributions/~2026-41134-51|~2026-41134-51]] ([[User talk:~2026-41134-51|disc.]]) a la última edición de [[User:PFSV-UY|PFSV-UY]] 5181206 wikitext text/x-wiki == {{lengua|en}} == {{pron-graf|leng=en}} === Etimología === {{etimología|leng=en}}. === {{sigla|en}} === ;1: {{impropia|{{plm|sigla}} de}} {{l|en|child pornography}} ;2: {{impropia|{{plm|sigla}} de}} {{l|en|cyberpunk}} ;3: {{impropia|{{plm|sigla}} de}} {{l|en|copy-protected}} == Referencias y notas == <references /> h3g53p2l7wecui87ncqa5dezvlslrm8 Alostibaś 0 1044030 6123489 5669957 2026-07-24T23:28:46Z CarpetanoComplutense 161160 6123489 wikitext text/x-wiki == {{lengua|xib}} == {{pron-graf|leng=xib}} === Etimología === {{etimología|leng=xib|confijo|alos|oŕtin}}.<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 34 | obs = Ensérune, pátera campaniense, MLH. B.1.35.}}</ref><ref>{{referencia | autor = Velaza, Javier | fecha = 2006 | url = https://ifc.dpz.es/recursos/publicaciones/25/20/13velaza.pdf | título = Tras las huellas del femenino en ibérico | cat=artículo}}</ref> ==== {{sustantivo propio|xib}} ==== {{xib.esc|alostibaś}} ;1: ''{{plm|nombre de pila}}''. [[Categoría:XIB:Antropónimos]] ==== Véase también ==== * [http://hesperia.ucm.es/consulta_hesperia/onomastica/corpus.php?id2=5240 Hesperia] == Referencias y notas == <references /> 4uv9ayuveki3e1grr4vmffwn6z7oiqx 6123494 6123489 2026-07-25T00:07:04Z CarpetanoComplutense 161160 6123494 wikitext text/x-wiki == {{lengua|xib}} == {{pron-graf|leng=xib}} === Etimología === {{etimología|leng=xib|confijo|alos|tibaś}}.<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 34 | obs = Ensérune, pátera campaniense, MLH. B.1.35.}}</ref><ref>{{referencia | autor = Velaza, Javier | fecha = 2006 | url = https://ifc.dpz.es/recursos/publicaciones/25/20/13velaza.pdf | título = Tras las huellas del femenino en ibérico | cat=artículo}}</ref> ==== {{sustantivo propio|xib}} ==== {{xib.esc|alostibaś}} ;1: ''{{plm|nombre de pila}}''. [[Categoría:XIB:Antropónimos]] ==== Véase también ==== * [http://hesperia.ucm.es/consulta_hesperia/onomastica/corpus.php?id2=5240 Hesperia] == Referencias y notas == <references /> f3aihsozoewyemn4yhd7qdb6bq6x0mj baŕśkunes 0 1044031 6123495 6121987 2026-07-25T00:12:43Z CarpetanoComplutense 161160 6123495 wikitext text/x-wiki == {{lengua|xib}} == {{pron-graf|leng=xib|v=baśkunes}} === Etimología === {{etimología|leng=xib|incierta}}, pero probablemente relacionado o derivado en última instancia del protovasco ''[[*euskala]]''. ==== {{sustantivo|xib}} ==== {{xib.esc|ba1ŕ3ś1ku2n102e1s1}} ;1: [[vascón|Vascones]]. ==== Véase también ==== {{w|Barscunes}} == Referencias y notas == <references /> tkeizqmbq5e4vxmxau782lockfj9ouj nigger 0 1044716 6123423 6121017 2026-07-24T15:23:23Z ~2026-41134-51 183681 /* {{lengua|en}} */ 6123423 wikitext text/x-wiki 6123427 6123423 2026-07-24T15:37:45Z Tmagc 158167 Revertido el cambio de [[Special:Contributions/~2026-41134-51|~2026-41134-51]] ([[User talk:~2026-41134-51|disc.]]) a la última edición de [[User:Tmagc|Tmagc]] 6121017 wikitext text/x-wiki {{desambiguación|}} == {{lengua|en}} == {{pron-graf|leng=en}} === Etimología === {{etimología|leng=en|la|niger|negro}}. ==== {{sustantivo|en}} ==== {{en.sust|c}} ;1: {{plm|negro de mierda}}. {{uso|leng=en|vulgar|malsonante|despectivo}} == Referencias y notas == <references /> p9y86h0r90sg7l80l087jvqexqq4vxj cíclope 0 1048016 6123449 5732671 2026-07-24T16:53:26Z ~2026-34597-22 183061 imagen 6123449 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|la|cyclops}}, {{etim|grc|κύκλωψ}}. <!-- Para una palabra de otro idioma, utilice {{etimología|(CÓDIGO DE IDIOMA)|(PALABRA)|(SIGNIFICADO)}}. Para elegir otra opción u otro tipo de etimología, consulte la página Plantilla:etimología --> ==== {{sustantivo masculino|es}} ==== {{es.sust}} [[File:Guido Reni - Polyphemus - Google Art Project.jpg|thumb|[1] un cíclope]] ;1 {{csem|mitología|historia}}: Cada uno de los [[gigante]]s que, según la mitología griega, eran hijos del Cielo y de la Tierra, y de los cuales se decía que tenían solo un [[ojo]] en medio de la [[frente]]. Se les suponía ocupados en fabricar [[rayo]]s para Júpiter en la fragua de Vulcano, bajo el monte Etna.<ref>{{DLE1925}}</ref> ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} <!-- formato: {{t|idioma|t1=(traducción1)|t2=(traducción2|...(hay más opciones))}} p. ej. {{t|fr|t1=chose|a1=1|g1=f}} (ver más ejemplos en Plantilla:t/doc) --> {{trad-abajo}} <!-- si va a insertar una nueva sección de etimología o de idioma, por favor, hágalo ↑ arriba ↑ de esta línea. NO BORRE LO QUE ESTÁ DEBAJO, GRACIAS. --> == Referencias y notas == <references /> f5ny7dn5mezmztsiiqil8m1yhh1ssj8 galga 0 1059566 6123534 5891391 2026-07-25T03:04:22Z Tmagc 158167 /* Etimología 4 */ 6123534 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología 1 === {{etimología|femenino|galgo}}, según Corominas: "explicable por el rápido movimiento".<ref>{{DCECH}}</ref> ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1: Piedra grande que, arrojada desde lo alto de una cuesta, baja rodando y dando saltos.<ref name=dle1925 /> ;2: Hormiga amarilla que anda muy velozmente.<ref name=dle1925 /> {{ámbito|Honduras}} ==== Véase también ==== * [[galgo]] ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} === Etimología 2 === {{etimología|la|caliga}}.<ref name=dle1925 /> ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1 {{csem|ropa}}: Cada una de las cintas cosidas al zapato de las mujeres para sujetarle a la canilla de la pierna.<ref name=dle1925 /> ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} === Etimología 3 === {{etimología|fr|gale}}, [[galle]], {{etim|la|galla}}.<ref name=dle1925>{{DLE1925}}</ref> ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1 {{csem|enfermedades}}: Erupción cutánea, parecida a la sarna, que sale frecuentemente en el pescuezo a las personas desaseadas.<ref name=dle1925 /> ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} === Etimología 4 === {{etimología|nl|galg|horca, poste}}.<ref name=dle1925 /> ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1: Palo grueso y largo atado por los extremos fuertemente a la caja del carro, que sirve de freno, al oprimir el cubo de una de las ruedas.<ref name=dle1925 /> ;2: Féretro o andas en que se lleva a enterrar a los pobres.<ref name=dle1925 /> ;3 {{csem|náutica}}: El orinque o el anclote con que se engalga o refuerza en malos tiempos el ancla fondeada.<ref name=dle1925 /> ;4 {{csem|náutica}}: Por extensión, ayuda que se da al ancla empotrada en tierra, haciendo firme en su cruz un calabrote que se amarra a un noray, para evitar que el esfuerzo del buque pueda arrancarla.<ref name=dle1925 /> ;5 {{csem|mecánica}}: Tira metálica de espesor calibrado que se usa para medir la holgura en espacios estrechos. ;6 {{csem|pesos y medidas}}: Unidad de grosor que equivale a 0,25 micrómetros. ==== Véase también ==== * [[galgas]] ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} === Forma flexiva === ==== Forma adjetivo ==== ;1: {{forma adjetivo|galgo|femenino|singular}}. == Referencias y notas == <references /> jtifgcu0x7v1u0cm8tkaqrnoavs0m4y Módulo:flex/la 828 1059810 6123478 6121433 2026-07-24T22:16:52Z Tmagc 158167 test 6123478 Scribunto text/plain -- FLEXIÓN DEL LATÍN -- Adaptado desde en.wikt por Tmagc local export = {} local unpack = unpack or table.unpack local insert = table.insert local concat = table.concat local m_table = require("Módulo:tabla") local list_to_set = m_table.listToSet local keys_to_list = m_table.keysToList local insert_if_not = m_table.insertIfNot local deep_copy = m_table.deepCopy local contains = m_table.contains local append = m_table.append local merge = m_table.merge local m_str = require("Módulo:string") local u = m_str.char local match = m_str.match local sub = m_str.sub local gsub = m_str.gsub local gsubb = m_str.gsubb local split = m_str.split local gsplit = m_str.gsplit local find = m_str.find local m_str_avanzado = require("Módulo:string/avanzado") local toNFD = m_str_avanzado.toNFD local toNFC = m_str_avanzado.toNFC local m_flex = require("Módulo:flex") local f = m_flex.f local f_links = m_flex.f_links local parsear_arreglo = m_flex.parsear_arreglo local separar_palabras = m_flex.separar_palabras local combinar_copulativa = m_flex.combinar_copulativa local sobreescribir_formas = m_flex.sobreescribir_formas local desactivar_formas = m_flex.desactivar_formas local agregar_enlaces = m_flex.agregar_enlaces local formatear_formas = m_flex.formatear_formas local comprobar_defectivo = m_flex.comprobar_defectivo local renderizar_tabla = m_flex.renderizar_tabla local renderizar_encabezado = m_flex.renderizar_encabezado local COLOR_H = m_flex.COLOR_H local COLOR_NP = m_flex.COLOR_NP local COLOR_IND = m_flex.COLOR_IND local COLOR_COND = m_flex.COLOR_COND local COLOR_SUBJ = m_flex.COLOR_SUBJ local COLOR_IMPER = m_flex.COLOR_IMPER local MACRON = u(0x304) local BREVE = u(0x306) local DIAER = u(0x308) local DBREVE = u(0x361) local ACCENT = "[" .. MACRON .. BREVE .. DIAER .. DBREVE .. "]" local VOWEL = "[aæeioœuyAÆEIOŒUY]" local cons_to_vowel = { ["j"] = "i", ["J"] = "I", ["v"] = "u", ["V"] = "U", } local function normalizar_enlace(x) x = toNFD(x) x = gsub(x, ACCENT, "") return toNFC(x) end local function join(a, b) a, b = toNFD(a), toNFD(b) -- If the first part ends in "j" or "v", convert it to "i" or "u" unless -- the second part begins with a vowel. if not match(b, "^" .. VOWEL) then a = gsub(a, "[jvJV]$", cons_to_vowel) end return toNFC(a..b) end local function add_form(decl, slot, stem, suf) if type(slot) == "string" then slot = {slot} end for _,slt in ipairs(slot) do if type(decl[slt]) == "nil" or decl[slt] == "" then decl[slt] = {} elseif type(decl[slt]) == "string" then decl[slt] = {decl[slt]} end insert_if_not(decl[slt], join(stem, suf)) end end local function remove_forms(decl, forms) for form,_ in pairs(decl) do for _,rx in ipairs(forms) do if form:find(rx) then forms[form] = {} break end end end end local function merge_forms(forms, forms2, keys) keys = keys or forms2 for key,arr in pairs(keys) do if not forms[key] then forms[key] = {} end if type(forms2[key]) == "string" then insert_if_not(forms[key], forms2[key]) elseif type(forms2[key]) == "table" then for _,a in ipairs(forms2[key]) do insert_if_not(forms[key], a) end end end end local noun_decl = {} noun_decl["0"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = stem forms["dat_sg"] = stem forms["acc_sg"] = stem forms["abl_sg"] = stem forms["voc_sg"] = stem forms["nom_pl"] = stem forms["gen_pl"] = stem forms["dat_pl"] = stem forms["acc_pl"] = stem forms["abl_pl"] = stem forms["voc_pl"] = stem -- with locative if data.loc then forms["loc_sg"] = stem forms["loc_pl"] = stem end end local function alt_gen_pl_in_um(stem, forms, types, subtitles, i_stem) if types.genplum then add_form(forms, "gen_pl", stem, (i_stem and "i" or "") .. "um") elseif types.not_genplum then -- FIXME: not a contraction. -- insert_if_not(subtitles, "uncontracted genitive plural") end end noun_decl["1"] = function(data, args) local forms, types, loc, subtitles = data.forms, data.types, data.loc, data.subtitles local stem = args[1] -- normal 1st local nom_sg = "a" local gen_loc_sg = "ae" local dat_sg = "ae" local acc_sg = "am" local abl_sg = "ā" local voc_sg = "a" local nom_voc_pl = "ae" local gen_pl = "ārum" local dat_abl_loc_pl = "īs" local acc_pl = "ās" insert_if_not(data.title, "primera declinación") insert_if_not(data.categories, "LA:Sustantivos de la primera declinación") -- ām if types.am then nom_sg = "ām" acc_sg = "ām" abl_sg = {"ām", "ā"} voc_sg = "ām" -- all Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") --Greek Ma if types.Ma then nom_sg = "ās" acc_sg = "ān" voc_sg = "ā" -- Greek Me elseif types.Me then nom_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" -- Greek else nom_sg = "ē" gen_loc_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" end end -- ābus if types.abus then dat_abl_loc_pl = "ābus" end add_form(forms, "nom_sg", stem, nom_sg) add_form(forms, "gen_sg", stem, gen_loc_sg) add_form(forms, "dat_sg", stem, dat_sg) add_form(forms, "acc_sg", stem, acc_sg) add_form(forms, "abl_sg", stem, abl_sg) add_form(forms, "voc_sg", stem, voc_sg) add_form(forms, {"nom_pl", "voc_pl"}, stem, nom_voc_pl) add_form(forms, "gen_pl", stem, gen_pl) add_form(forms, {"dat_pl", "abl_pl"}, stem, dat_abl_loc_pl) add_form(forms, "acc_pl", stem, acc_pl) -- with locative if loc then add_form(forms, "loc_sg", stem, gen_loc_sg) add_form(forms, "loc_pl", stem, dat_abl_loc_pl) end end noun_decl["2"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "segunda declinación") insert_if_not(data.categories, "LA:Sustantivos de la segunda declinación") -- normal 2nd forms["nom_sg"] = stem1 .. "us" forms["gen_sg"] = stem1 .. "ī" forms["dat_sg"] = stem1 .. "ō" forms["acc_sg"] = stem1 .. "um" forms["abl_sg"] = stem1 .. "ō" forms["voc_sg"] = stem1 .. "e" forms["nom_pl"] = stem1 .. "ī" forms["gen_pl"] = stem1 .. "ōrum" forms["dat_pl"] = stem1 .. "īs" forms["acc_pl"] = stem1 .. "ōs" forms["abl_pl"] = stem1 .. "īs" forms["voc_pl"] = stem1 .. "ī" -- all neuter if types.N then forms["nom_sg"] = stem1 .. "um" forms["voc_sg"] = stem1 .. "um" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- neuter ium if types.ium then forms["nom_sg"] = stem1 .. "ium" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" forms["voc_sg"] = stem1 .. "ium" forms["nom_pl"] = stem1 .. "ia" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "ia" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "ia" -- neuter us, plural a elseif types.a then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- -vom (aevom, etc.) elseif types.vom then forms["nom_sg"] = stem1 .. "om" forms["acc_sg"] = stem1 .. "om" forms["voc_sg"] = stem1 .. "om" -- neuter Greek in -os (cētos) elseif types.Greek and types.us then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "os" forms["voc_sg"] = stem1 .. "os" forms["nom_pl"] = stem1 .. "ē" forms["gen_pl"] = stem1 .. "ōn" forms["acc_pl"] = stem1 .. "ē" forms["voc_pl"] = stem1 .. "ē" -- neuter Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "on" forms["acc_sg"] = stem1 .. "on" forms["voc_sg"] = stem1 .. "on" -- neuter us elseif types.us then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "ī" forms["acc_pl"] = stem1 .. "ōs" forms["voc_pl"] = stem1 .. "ī" end -- er elseif types.er then forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "ī" forms["dat_sg"] = stem2 .. "ō" forms["acc_sg"] = stem2 .. "um" forms["abl_sg"] = stem2 .. "ō" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ī" forms["gen_pl"] = stem2 .. "ōrum" forms["dat_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "ōs" forms["abl_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "ī" -- ius elseif types.ius then forms["nom_sg"] = stem1 .. "ius" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" if types.voci then -- Only for proper names and fīlius, genius forms["voc_sg"] = stem1 .. "ī" else forms["voc_sg"] = stem1 .. "ie" end forms["nom_pl"] = stem1 .. "iī" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "iōs" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "iī" -- -vos (servos, etc.) elseif types.vos then forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "om" -- Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "on" if data.num == "pl" then forms["nom_pl"] = stem1 .. "oe" forms["voc_pl"] = stem1 .. "oe" else forms["nom_pl"] = {stem1 .. "ī", stem1 .. "oe"} forms["voc_pl"] = {stem1 .. "ī", stem1 .. "oe"} end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- with -um genitive plural alt_gen_pl_in_um(stem2, forms, types, subtitles, types.ius or types.ium) -- with locative if data.loc then if types.ius or types.ium then forms["loc_sg"] = stem2 .. "iī" forms["loc_pl"] = stem2 .. "iīs" else forms["loc_sg"] = stem2 .. "ī" forms["loc_pl"] = stem2 .. "īs" end end end local acc_sg_i_stem_subtypes = { acc_im = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [abl -ī]; -- cannabis, senapis, sinapis [abl -e, -ī] acc_sg = {"im"}, title = {"accusative singular in ''-im''"}, }, acc_im_in = { -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [abl -ī]; -- Baetis, Tigris [acc -e, -ī] acc_sg = {"im", "in"}, title = {"accusative singular in ''-im'' or ''-in''"}, }, acc_im_in_em = { -- e.g. tigris, river Līris acc_sg = {"im", "in", "em"}, title = {"accusative singular in ''-im'', ''-in'' or ''-em''"}, }, acc_im_em = { acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or ''-em''"}, }, acc_im_occ_em = { -- febris, pelvis, puppis, restis, securis, turris [abl -ī, -e] acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or occasionally ''-em''"}, }, acc_em_im = { -- aqualis, clavis, lens, navis [abl -e, -ī]; -- cutis, restis [abl -e] acc_sg = {"em", "im"}, title = {"accusative singular in ''-em'' or ''-im''"}, }, } local abl_sg_i_stem_subtypes = { abl_i = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [acc -im]; -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [acc -im or -in]; -- canalis "water pipe", months in -is or -er, nouns originally i-stem adjectives such as aedilis, affinis, bipennis, familiaris, sodalis, volucris, etc. [acc -em] abl_sg = {"ī"}, title = {"ablative singular in ''-ī''"}, }, abl_i_e = { -- febris, pelvis, puppis, restis, securis, turris [acc -im, -em] abl_sg = {"ī", "e"}, title = {"ablative singular in ''-ī'' or ''-e''"}, }, abl_e_i = { -- cannabis, senapis, sinapis [acc -im]; -- Baetis, Tigris [acc -im, -in]; -- aqualis, clavis, lens, navis [acc -em, -im]; -- finis, mugilis, occiput, pugil, rus, supellex, vectis [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or ''-ī''"}, }, abl_e_occ_i = { -- amnis, anguis, avis, civis, classis, fustis, ignis, imber, orbis, pars, postis, sors, unguis, vesper [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or occasionally ''-ī''"}, }, } local function extract_stem(form, ending) local base = match(form, "^(.*)" .. ending .. "$") if not base then error("Form " .. form .. " should end in -" .. ending) end return base end local function count_vowels(stem) return select(2, toNFD(stem):gsub("[aeiouyAEIOUY]", "")) end noun_decl["3"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] -- local function non_i_stem_type() -- return (count_vowels(stem1) > count_vowels(stem2) and "parisyllabic" or "imparisyllabic") .. " non-i-stem" -- end insert_if_not(data.title, "tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") --normal 3rd forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "is" forms["dat_sg"] = stem2 .. "ī" forms["acc_sg"] = stem2 .. "em" forms["abl_sg"] = stem2 .. "e" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ēs" forms["gen_pl"] = stem2 .. "um" forms["dat_pl"] = stem2 .. "ibus" forms["acc_pl"] = stem2 .. "ēs" forms["abl_pl"] = stem2 .. "ibus" forms["voc_pl"] = stem2 .. "ēs" local acc_sg_i_stem_subtype = false local not_acc_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if acc_sg_i_stem_subtypes[subtype] then acc_sg_i_stem_subtype = true break end end for acc_sg_subtype, _ in pairs(acc_sg_i_stem_subtypes) do if types["not_" .. acc_sg_subtype] then not_acc_sg_i_stem_subtype = true break end end local abl_sg_i_stem_subtype = false local not_abl_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if abl_sg_i_stem_subtypes[subtype] then abl_sg_i_stem_subtype = true break end end for abl_sg_subtype, _ in pairs(abl_sg_i_stem_subtypes) do if types["not_" .. abl_sg_subtype] then not_abl_sg_i_stem_subtype = true break end end -- all Greek if types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") -- Greek er if types.er then stem1 = extract_stem(stem1, "ēr") forms["nom_sg"] = stem1 .. "ēr" forms["gen_sg"] = stem1 .. "eris" forms["dat_sg"] = stem1 .. "erī" forms["acc_sg"] = {stem1 .. "era", stem1 .. "erem"} forms["abl_sg"] = stem1 .. "ere" forms["voc_sg"] = stem1 .. "ēr" forms["nom_pl"] = stem1 .. "erēs" forms["gen_pl"] = stem1 .. "erum" forms["dat_pl"] = stem1 .. "eribus" forms["acc_pl"] = stem1 .. "erēs" forms["abl_pl"] = stem1 .. "eribus" forms["voc_pl"] = stem1 .. "erēs" -- Greek on elseif types.on then stem1 = extract_stem(stem1, "ōn") forms["nom_sg"] = stem1 .. "ōn" forms["gen_sg"] = {stem1 .. "ontis", stem1 .. "ontos"} forms["dat_sg"] = stem1 .. "ontī" forms["acc_sg"] = stem1 .. "onta" forms["abl_sg"] = stem1 .. "onte" forms["voc_sg"] = stem1 .. "ōn" forms["nom_pl"] = stem1 .. "ontēs" forms["gen_pl"] = {stem1 .. "ontum", stem1 .. "ontium"} forms["dat_pl"] = stem1 .. "ontibus" forms["acc_pl"] = {stem1 .. "ontēs", stem1 .. "ontās"} forms["abl_pl"] = stem1 .. "ontibus" forms["voc_pl"] = stem1 .. "ontēs" -- Greek i-stem elseif types.I then forms["gen_sg"] = {stem2 .. "is", stem2 .. "eōs", stem2 .. "ios"} forms["acc_sg"] = {stem2 .. "im", stem2 .. "in", stem2 .. "em{MED}"} forms["abl_sg"] = {stem2 .. "ī", stem2 .. "e{MED}"} forms["voc_sg"] = {stem2 .. "is", stem2 .. "i"} forms["nom_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["gen_pl"] = {stem2 .. "ium", stem2 .. "eōn"} forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["voc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} if types.poetic_esi then forms["dat_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} forms["abl_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} end -- normal Greek else forms["gen_sg"] = stem2 .. "os" if match(toNFD(stem2), "[yY]" .. ACCENT .. "*$") then forms["acc_sg"] = stem2 .. "n" else forms["acc_sg"] = stem2 .. "a" end forms["nom_pl"] = stem2 .. "es" forms["acc_pl"] = stem2 .. "as" forms["voc_pl"] = stem2 .. "es" if match(toNFD(stem1), "[iyIY]" .. ACCENT .. "*s$") then -- Per Hiley, words in -is and -ys have a poetic vocative -- without the -s, but otherwise the vocative is the same -- as the nominative. forms["voc_sg"] = {stem1, (stem1:gsub("s$", "")).."{L}"} end end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- polis if types.polis then stem1 = extract_stem(stem1, "polis") insert_if_not(data.title, "parcialmente griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "polis" forms["gen_sg"] = stem1 .. "polis" forms["dat_sg"] = stem1 .. "polī" forms["acc_sg"] = {stem1 .. "polim", stem1 .. "polin"} forms["abl_sg"] = stem1 .. "polī" forms["voc_sg"] = {stem1 .. "polis", stem1 .. "polī"} end -- all neuter if types.N then forms["acc_sg"] = stem1 -- neuter I stem if types.I then -- pure variety if types.pure then forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "ia" forms["gen_pl"] = stem2 .. "ium" forms["acc_pl"] = stem2 .. "ia" forms["voc_pl"] = stem2 .. "ia" -- non-pure variety (rare) else forms["nom_pl"] = stem2 .. "a" forms["gen_pl"] = {stem2 .. "ium", stem2 .. "um"} forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- normal neuter else forms["nom_pl"] = stem2 .. "a" forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- I stem elseif types.I or acc_sg_i_stem_subtype or abl_sg_i_stem_subtype then forms["gen_pl"] = stem2 .. "ium" -- Per Allen and Greenough, Hiley and others, the acc_pl in -īs -- applied originally to all i-stem nouns, and was current as an -- alternative form up through Caesar. forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "īs"} -- pure variety if types.pure then forms["acc_sg"] = stem2 .. "im" forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "īs" end local num = data.num for subtype, _ in pairs(types) do local acc_sg_i_stem_props = acc_sg_i_stem_subtypes[subtype] if acc_sg_i_stem_props then forms["acc_sg"] = {} for _, ending in ipairs(acc_sg_i_stem_props.acc_sg) do insert_if_not(forms["acc_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(acc_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end -- FIXME: needs to be done for neuter nouns as well. for subtype, _ in pairs(types) do local abl_sg_i_stem_props = abl_sg_i_stem_subtypes[subtype] if abl_sg_i_stem_props then forms["abl_sg"] = {} for _, ending in ipairs(abl_sg_i_stem_props.abl_sg) do insert_if_not(forms["abl_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(abl_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end end -- with locative if data.loc then -- As far as I can tell, in general both dative singular and -- ablative singular could be used for the third-declension locative, -- with different time periods preferring different forms. -- http://dcc.dickinson.edu/grammar/latin/3rd-declension-locative-case -- mentions rūrī along with either Carthāginī or Carthāgine. -- Wikipedia in https://en.wikipedia.org/wiki/Locative_case#Latin -- says this: -- -- In archaic times, the locative singular of third declension nouns -- was still interchangeable between ablative and dative forms, but in -- the Augustan Period the use of the ablative form became fixed. -- Therefore, both forms "rūrī" and "rūre" may be encountered. -- -- Lewis and Short confirm this. local loc_sg = forms["dat_sg"] if type(loc_sg) == "table" then loc_sg = deep_copy(loc_sg) else loc_sg = {loc_sg} end local abl_sg = forms["abl_sg"] if type(abl_sg) == "table" then for _, form in ipairs(abl_sg) do insert_if_not(loc_sg, deep_copy(form)) end else insert_if_not(loc_sg, abl_sg) end forms["loc_sg"] = loc_sg forms["loc_pl"] = deep_copy(forms["abl_pl"]) --The following is what we used to have, but I simply cannot believe it. --if types.Greek and not types.s then -- forms["loc_pl"] = stem2 .. "ēs" --end end end noun_decl["4"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "cuarta declinación") insert_if_not(data.categories, "LA:Sustantivos de la cuarta declinación") -- normal 4th forms["nom_sg"] = stem .. "us" forms["gen_sg"] = stem .. "ūs" forms["dat_sg"] = stem .. "uī" forms["acc_sg"] = stem .. "um" forms["abl_sg"] = stem .. "ū" forms["voc_sg"] = stem .. "us" forms["nom_pl"] = stem .. "ūs" forms["gen_pl"] = stem .. "uum" forms["dat_pl"] = stem .. "ibus" forms["acc_pl"] = stem .. "ūs" forms["abl_pl"] = stem .. "ibus" forms["voc_pl"] = stem .. "ūs" if types.echo then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end add_form(forms, "acc_sg", stem, "ōn") elseif types.Callisto then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end end -- neuter if types.N then forms["nom_sg"] = stem .. "ū̆{?}" forms["gen_sg"] = {stem .. "ūs{C}", stem .. "ū{S}"} forms["dat_sg"] = {stem .. "uī{C}", stem .. "ū{S}"} forms["acc_sg"] = stem .. "ū̆{?}" forms["voc_sg"] = stem .. "ū̆{?}" forms["nom_pl"] = stem .. "ua" forms["acc_pl"] = stem .. "ua" forms["voc_pl"] = stem .. "ua" end -- ubus if types.ubus then forms["dat_pl"] = stem .. "ubus" forms["abl_pl"] = stem .. "ubus" end -- with locative if data.loc then forms["loc_sg"] = forms["abl_sg"] forms["loc_pl"] = forms["abl_pl"] end end noun_decl["5"] = function(data, args) local forms, types = data.forms, data.types local stem = args[1] insert_if_not(data.title, "quinta declinación") insert_if_not(data.categories, "LA:Sustantivos de la quinta declinación") -- ies if types.i then stem = stem .. "i" end forms["nom_sg"] = stem .. "ēs" forms["gen_sg"] = stem .. "eī" forms["dat_sg"] = stem .. "eī" forms["acc_sg"] = stem .. "em" forms["abl_sg"] = stem .. "ē" forms["voc_sg"] = stem .. "ēs" forms["nom_pl"] = stem .. "ēs" forms["gen_pl"] = stem .. "ērum" forms["dat_pl"] = stem .. "ēbus" forms["acc_pl"] = stem .. "ēs" forms["abl_pl"] = stem .. "ēbus" forms["voc_pl"] = stem .. "ēs" -- ies if types.i then forms["gen_sg"] = stem .. "ēī" forms["dat_sg"] = stem .. "ēī" end --with locative if data.loc then forms["loc_sg"] = stem .. "ē" forms["loc_pl"] = stem .. "ēbus" end end noun_decl["sgpl"] = function(data, args) local forms = data.forms local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem1 forms["gen_sg"] = stem1 forms["dat_sg"] = stem1 forms["acc_sg"] = stem1 forms["abl_sg"] = stem1 forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 forms["gen_pl"] = stem2 forms["dat_pl"] = stem2 forms["acc_pl"] = stem2 forms["abl_pl"] = stem2 forms["voc_pl"] = stem2 -- with locative if data.loc then forms["loc_sg"] = stem1 forms["loc_pl"] = stem2 end end noun_decl["indecl"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = stem forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} -- with locative (for multiword terms) if data.loc then forms["loc_sg"] = {} forms["loc_pl"] = {} end data.num = "sg" end noun_decl["irreg"] = function(data, args) local forms, subtitles, notes = data.forms, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "irregular") insert_if_not(data.categories, "LA:Sustantivos irregulares") forms["nom_sg"] = {} forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = {} forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} if stem == "bōs" then data.decl = "3" local stem1, stem2 = "bōs", "bov" noun_decl["3"](data, {stem1, stem2}) add_form(forms, "abl_sg", stem2, "īd{†}") add_form(forms, "gen_pl", "bo", "um") add_form(forms, "gen_pl", stem2, "erum") add_form(forms, "dat_pl", "", "bōbus") add_form(forms, "dat_pl", "", "būbus") add_form(forms, "abl_pl", "", "bōbus") add_form(forms, "abl_pl", "", "būbus") elseif stem:match("^[dD]eus$") then data.decl = "2" local dD = stem:sub(1, 1) forms["nom_sg"] = dD .. "eus" forms["gen_sg"] = dD .. "eī" forms["dat_sg"] = dD .. "eō" forms["acc_sg"] = dD .. "eum" forms["abl_sg"] = dD .. "eō" forms["voc_sg"] = {dD .. "eus", dD .. "ee"} if stem == "deus" then forms["nom_pl"] = {"dī", "diī", "deī"} forms["gen_pl"] = {"deōrum", "deum"} forms["dat_pl"] = {"dīs", "diīs", "deīs"} forms["acc_pl"] = "deōs" forms["abl_pl"] = {"dīs", "diīs", "deīs"} forms["voc_pl"] = {"dī", "diī", "deī"} end elseif stem == "domus" then data.decl = "4,2" insert_if_not(data.title, "cuarta/segunda declinación") forms["nom_sg"] = "domus" forms["gen_sg"] = {"domūs", "domī"} forms["dat_sg"] = {"domuī", "domō", "domū"} forms["acc_sg"] = "domum" forms["abl_sg"] = {"domū", "domō"} forms["voc_sg"] = "domus" forms["loc_sg"] = "domī" forms["nom_pl"] = "domūs" forms["gen_pl"] = {"domuum", "domōrum"} forms["dat_pl"] = "domibus" forms["acc_pl"] = {"domūs", "domōs"} forms["abl_pl"] = "domibus" forms["voc_pl"] = "domūs" forms["loc_pl"] = {} data.loc = true elseif match(stem, "^[IÏJ]ēs[uū]" .. BREVE .. "?s$") then local ij = sub(stem, 1, 1) local uu = match(stem, "[uū]" .. BREVE .. "?") forms["nom_sg"] = stem forms["gen_sg"] = ij .. "ēsū" forms["dat_sg"] = ij .. "ēsū" forms["acc_sg"] = ij .. "ēs" .. uu .. "m" forms["abl_sg"] = ij .. "ēsū" forms["voc_sg"] = ij .. "ēsū" data.num = "sg" elseif stem == "Mōsēs" or stem == "Moesēs" or match(stem, "^M[oō]" .. BREVE .. "?[īȳ]sēs$") then local mos = sub(stem, 1, -3) forms["nom_sg"] = stem forms["gen_sg"] = {mos .. "ī", mos .. "ēī", mos .. "is", mos .. "ēn", mos .. "eōs"} forms["dat_sg"] = mos .. "ī" forms["acc_sg"] = {mos .. "ēn", mos .. "em"} forms["abl_sg"] = {mos .. "e", mos .. "ēn", mos .. "ī"} forms["voc_sg"] = {mos .. "ēs", mos .. "ē"} data.num = "sg" elseif stem:match("^[ij]ūgerum$") then data.decl = "2,3" local ij = stem:sub(1, 1) insert_if_not(data.title, "segunda/tercera declinación híbrido") forms["nom_sg"] = ij .. "ūgerum" forms["gen_sg"] = ij .. "ūgerī" forms["dat_sg"] = ij .. "ūgerō" forms["acc_sg"] = ij .. "ūgerum" forms["abl_sg"] = ij .. "ūgerō" forms["voc_sg"] = ij .. "ūgerum" forms["nom_pl"] = ij .. "ūgera" forms["gen_pl"] = ij .. "ūgerum" forms["dat_pl"] = ij .. "ūgeribus" forms["acc_pl"] = ij .. "ūgera" forms["abl_pl"] = {ij .. "ūgeribus", ij .. "ūgerīs{†}"} forms["voc_pl"] = ij .. "ūgera" elseif stem == "sūs" then data.decl = "3" forms["nom_sg"] = "sūs" forms["gen_sg"] = "suis" forms["dat_sg"] = "suī" forms["acc_sg"] = "suem" forms["abl_sg"] = "sue" forms["voc_sg"] = "sūs" forms["nom_pl"] = "suēs" forms["gen_pl"] = "suum" forms["dat_pl"] = {"suibus", "sūbus", "subus"} forms["acc_pl"] = "suēs" forms["abl_pl"] = {"suibus", "sūbus", "subus"} forms["voc_pl"] = "suēs" elseif stem == "ēthos" then data.decl = "3" insert_if_not(data.title, "tercera declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "ēthos" forms["gen_sg"] = "ētheos" forms["acc_sg"] = "ēthos" forms["voc_sg"] = "ēthos" forms["nom_pl"] = {"ēthea", "ēthē"} forms["dat_pl"] = {"ēthesi", "ēthesin"} forms["acc_pl"] = {"ēthea", "ēthē"} forms["abl_pl"] = {"ēthesi", "ēthesin"} forms["voc_pl"] = {"ēthea", "ēthē"} elseif stem == "Athōs" then data.decl = "2" insert_if_not(data.title, "segunda declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "Athōs" forms["gen_sg"] = "Athō" forms["dat_sg"] = "Athō" forms["acc_sg"] = {"Athō", "Athōn"} forms["abl_sg"] = "Athō" forms["voc_sg"] = "Athōs" data.num = "sg" elseif stem:match("^[uv]ēnum$") then data.decl = "4,2" local uv = stem:sub(1, 1) insert_if_not(data.title, "cuarta/segunda declinación, defectivo") forms["dat_sg"] = {uv .. "ēnuī", uv .. "ēnō"} forms["acc_sg"] = uv .. "ēnum" data.num = "sg" elseif stem:match("^[uv]īs$") then data.decl = "3" local uv = stem:sub(1, 1) insert_if_not(data.title, "defectivo") forms["nom_sg"] = uv .. "īs" forms["gen_sg"] = uv .. "īs" forms["dat_sg"] = uv .. "ī" forms["acc_sg"] = uv .. "im" forms["abl_sg"] = uv .. "ī" forms["voc_sg"] = uv .. "īs" forms["nom_pl"] = uv .. "īrēs" forms["gen_pl"] = uv .. "īrium" forms["dat_pl"] = uv .. "īribus" forms["acc_pl"] = {uv .. "īrēs", uv .. "īrīs"} forms["abl_pl"] = uv .. "īribus" forms["voc_pl"] = uv .. "īrēs" else error("Stem " .. stem .. " not recognized.") end end local adj_decl = {} adj_decl["0+"] = function(data, args) local forms, categories = data.forms, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = stem forms["gen_sg_m"] = stem forms["gen_pl_m"] = stem forms["dat_sg_m"] = stem forms["dat_pl_m"] = stem forms["acc_sg_m"] = stem forms["acc_pl_m"] = stem forms["abl_sg_m"] = stem forms["abl_pl_m"] = stem forms["voc_sg_m"] = stem forms["voc_pl_m"] = stem forms["loc_sg_m"] = stem forms["loc_pl_m"] = stem end adj_decl["1&2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera y segunda declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local original if types.er then local final2 = stem:sub(-2) if final2 == "er" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") elseif final2 == "ur" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") else error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem) end stem, original = args[2], stem end local us = "us" local a_sf = "a" local um = "um" local ae_gsf = "ae" local am = "am" local a_macron = "ā" local i_pl = stem .. "ī" if types.greekA or types.greekE then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") if types.greekA then us = "os" um = "on" am = "ān" else us = "os" a_sf = "ē" um = "on" ae_gsf = "ēs" am = "ēn" a_macron = "ē" end i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = original or (stem .. us) forms["nom_sg_f"] = stem .. a_sf forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_f"] = stem .. ae_gsf forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_f"] = stem .. "ae" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_f"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_f"] = stem .. am forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_f"] = stem .. a_macron forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_f"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = original or (stem .. "e") forms["voc_sg_f"] = stem .. a_sf forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" if types.ius then insert_if_not(data.title, "pronominal") --insert_if_not(subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''") forms["gen_sg_m"] = stem .. "ī̆us" forms["gen_sg_f"] = stem .. "ī̆us" forms["gen_sg_n"] = stem .. "ī̆us" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_f"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" elseif types.not_ius then insert_if_not(data.title, "no pronominal") --insert_if_not(subtitles, "with normal genitive and dative singular") end if stem == "me" then forms["voc_sg_m"] = "mī" end if types.ic then --insert_if_not(subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''") local oc = "oc" local oc_macron = "ōc" if stem == "ill" then oc = "uc" oc_macron = "ūc" end forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = stem .. oc forms["nom_pl_n"] = stem .. "aec" forms["gen_sg_m"] = stem .. "uius" forms["gen_sg_f"] = stem .. "uius" forms["gen_sg_n"] = stem .. "uius" forms["dat_sg_m"] = stem .. "uic" forms["dat_sg_f"] = stem .. "uic" forms["dat_sg_n"] = stem .. "uic" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = stem .. oc forms["acc_pl_n"] = stem .. "aec" forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. oc_macron forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} end if types.distr then if stem:sub(-1) == "n" then forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum{R}"} forms["gen_pl_f"] = {stem .. "um", stem .. "ārum{R}"} forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum{R}"} else error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem) end original = stem stem = args[2] end forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["1-1+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") forms["nom_sg_m"] = stem .. "a" forms["nom_pl_m"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ae" forms["gen_pl_m"] = stem .. "ārum" forms["dat_sg_m"] = stem .. "ae" forms["dat_pl_m"] = stem .. "īs" forms["acc_sg_m"] = stem .. "am" forms["acc_sg_n"] = stem .. "a" forms["acc_pl_m"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ā" forms["abl_pl_m"] = stem .. "īs" forms["voc_sg_m"] = stem .. "a" forms["voc_pl_m"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["2-2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "segunda declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local us = "us" local um = "um" local i_pl = stem .. "ī" if types.greek then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") us = "os" um = "on" i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = stem .. us forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = stem .. "e" forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end local function abl_i_e(...) local function update_slot(forms, slot, f, do_copy) if not forms[slot] then return do_copy elseif do_copy then f = deep_copy(f) end forms[slot] = f return true end function abl_i_e(stem, forms, types) local f, do_copy if types["abl_e_i"] then f = {stem .. "e", stem .. "ī"} elseif types["abl_i_e"] then f = {stem .. "ī", stem .. "e"} else return end do_copy = update_slot(forms, "abl_sg_m", f, do_copy) do_copy = update_slot(forms, "abl_sg_f", f, do_copy) -- Neuter doesn't take -e with i-stems. if not types.I then update_slot(forms, "abl_sg_n", f, do_copy) end end return abl_i_e(...) end adj_decl["3-1+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) if types.par then forms["nom_pl_n"] = stem2 .. "a" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["abl_sg_m"] = stem2 .. "e" forms["abl_sg_n"] = stem2 .. "e" forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"} -- Really? forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"} -- Why does this happen? forms["acc_pl_n"] = stem2 .. "a" forms["voc_pl_n"] = stem2 .. "a" end local es_base = stem1:match("^(.-)ēs$") if es_base and es_base == stem2 then if types.greek then forms["nom_sg_n"] = {stem2 .. "ē̆s{?}"} forms["acc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_m"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["nom_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["acc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["voc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["abl_sg_m"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["abl_sg_n"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["gen_pl_m"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} forms["gen_pl_n"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Adjetivos griegos") elseif types.not_greek then insert_if_not(data.title, "no griego") end end end adj_decl["3-def+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, defectivo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = stem2 .. "ēs" forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" if types.tor then insert_if_not(data.title, "tercera declinación, solo en masculino") insert_if_not(categories, "LA:Adjetivos solo en masculino") remove_forms(forms, {"_f$", "_n$"}) forms["nom_sg_m"] = stem1 forms["gen_sg_m"] = stem2 .. "is" forms["dat_sg_m"] = stem2 .. "ī" forms["acc_sg_m"] = stem2 .. "em" forms["abl_sg_m"] = stem2 .. "e" forms["voc_sg_m"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["gen_pl_m"] = stem2 .. "um" forms["dat_pl_m"] = stem2 .. "ibus" forms["acc_pl_m"] = stem2 .. "ēs" forms["abl_pl_m"] = stem2 .. "ibus" forms["voc_pl_m"] = stem2 .. "ēs" end if types.trix then insert_if_not(data.title, "tercera declinación, solo en femenino o en neutro plural") insert_if_not(categories, "LA:Adjetivos solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en neutro") remove_forms(forms, {"_m$", "sg_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.trixf then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.idis then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = {stem2 .. "is", stem2 .. "os"} forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = {stem2 .. "em", stem2 .. "a"} forms["abl_sg_f"] = stem2 .. "e" forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} forms["gen_pl_f"] = stem2 .. "um" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = {stem2 .. "ēs", stem2 .. "as"} forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} end forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-C+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1 = args[1] local stem2 = stem1 .. "ōr" insert_if_not(data.title, "tercera declinación, comparativo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos comparativos") forms["nom_sg_m"] = stem1 .. "or" forms["nom_sg_n"] = stem1 .. "us" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "a" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 .. "us" forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} forms["acc_pl_n"] = stem2 .. "a" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 .. "or" forms["voc_sg_n"] = stem1 .. "us" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "a" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-P+"] = function(data, args) local forms, notes = data.forms, data.notes local stem2 = args[2] adj_decl["3-1+"](data, args) insert_if_not(data.title, "tercera declinación, participio") insert_if_not(data.categories, "LA:Adjetivos de la tercera declinación") forms["abl_sg_m"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["abl_sg_n"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} end adj_decl["3-2+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem = args[1] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem .. "is" forms["nom_sg_n"] = stem .. "e" forms["nom_pl_m"] = stem .. "ēs" forms["nom_pl_n"] = stem .. "ia" forms["gen_sg_m"] = stem .. "is" forms["gen_sg_n"] = stem .. "is" forms["gen_pl_m"] = stem .. "ium" forms["gen_pl_n"] = stem .. "ium" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" forms["dat_pl_m"] = stem .. "ibus" forms["dat_pl_n"] = stem .. "ibus" forms["acc_sg_m"] = stem .. "em" forms["acc_sg_n"] = stem .. "e" forms["acc_pl_m"] = {stem .. "īs", stem .. "ēs"} forms["acc_pl_n"] = stem .. "ia" forms["abl_sg_m"] = stem .. "ī" forms["abl_sg_n"] = stem .. "ī" forms["abl_pl_m"] = stem .. "ibus" forms["abl_pl_n"] = stem .. "ibus" -- abl_i_e(stem, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem .. "is" forms["voc_sg_n"] = stem .. "e" forms["voc_pl_m"] = stem .. "ēs" forms["voc_pl_n"] = stem .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-3+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con tres terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_f"] = stem2 .. "is" forms["nom_sg_n"] = stem2 .. "e" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_f"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_f"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_f"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_f"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_f"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_f"] = stem2 .. "em" forms["acc_sg_n"] = stem2 .. "e" forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_f"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_f"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_f"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" -- abl_i_e(stem2, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem1 forms["voc_sg_f"] = stem2 .. "is" forms["voc_sg_n"] = stem2 .. "e" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_f"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["indecl+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = {} forms["gen_sg_m"] = {} forms["gen_pl_m"] = {} forms["dat_sg_m"] = {} forms["dat_pl_m"] = {} forms["acc_sg_m"] = stem forms["acc_pl_m"] = {} forms["abl_sg_m"] = {} forms["abl_pl_m"] = {} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["irreg+"] = function(data,args) local forms, types, pos, notes, categories = data.forms, data.types, data.pos, data.notes, data.categories local arg1 = args[1] insert_if_not(data.title, "irregular") insert_if_not(categories, "LA:Adjetivos irregulares") if arg1 == "duo" or arg1 == "ambō" then local stem = sub(arg1, 1, -2) -- data.title = stem == "amb" and "irregular adjective" or "numeral" data.num = "pl" local stem_with_o = stem .. (stem == "amb" and "ō" or "o") forms["nom_pl_m"] = stem_with_o forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem_with_o forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_pl_m"] = stem .. "ōbus" forms["dat_pl_f"] = stem .. "ābus" forms["dat_pl_n"] = stem .. "ōbus" forms["acc_pl_m"] = {stem .. "ōs", stem_with_o} forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem_with_o forms["abl_pl_m"] = stem .. "ōbus" forms["abl_pl_f"] = stem .. "ābus" forms["abl_pl_n"] = stem .. "ōbus" forms["voc_pl_m"] = stem_with_o forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem_with_o if stem == "du" then forms["gen_pl_m"] = {forms["gen_pl_m"], "duum", "duom{†}"} forms["gen_pl_n"] = {forms["gen_pl_n"], "duum", "duom{†}"} end elseif arg1:sub(-6) == "mīlle" then insert_if_not(data.title, "numeral semiindeclinable") local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "le" forms["nom_pl_m"] = {stem .. "ia", stem .. "lia"} forms["gen_sg_m"] = stem .. "le" forms["gen_pl_m"] = {stem .. "ium", stem .. "lium"} forms["dat_sg_m"] = stem .. "le" forms["dat_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["acc_sg_m"] = stem .. "le" forms["acc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["abl_sg_m"] = stem .. "le" forms["abl_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["voc_sg_m"] = stem .. "le" forms["voc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) elseif arg1 == "ille" or arg1 == "iste" or arg1 == "ipse" or arg1 == "olle" then local stem = arg1:sub(1, -2) types.ius = true adj_decl["1&2+"](data, {stem}) insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) forms["nom_sg_m"] = arg1 if arg1 == "ipse" then add_form(forms, "nom_sg_n", stem, "ud{MED}") add_form(forms, "acc_sg_n", stem, "ud{MED}") else forms["nom_sg_n"] = stem .. "ud" forms["acc_sg_n"] = stem .. "ud" end forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} elseif arg1 == "illic" or arg1 == "istic" or arg1 == "isthic" then insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["gen_sg_m"] = stem .. "ī̆usce" forms["gen_sg_f"] = stem .. "ī̆usce" forms["gen_sg_n"] = stem .. "ī̆usce" forms["dat_sg_m"] = stem .. "īc" forms["dat_sg_f"] = stem .. "īc" forms["dat_sg_n"] = stem .. "īc" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. "ōc" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["nom_pl_m"] = stem .. "īsce" forms["nom_pl_f"] = stem .. "aec" forms["nom_pl_n"] = stem .. "aec" forms["gen_pl_m"] = stem .. "ōrunc{?}" forms["gen_pl_f"] = stem .. "ārunc{?}" forms["gen_ok_n"] = stem .. "ōrunc{?}" forms["dat_pl_m"] = stem .. "īsce" forms["dat_pl_f"] = stem .. "īsce" forms["dat_pl_n"] = stem .. "īsce" forms["acc_pl_m"] = stem .. "ōsce" forms["acc_pl_f"] = stem .. "āsce" forms["acc_pl_n"] = stem .. "aec" forms["abl_pl_m"] = stem .. "īsce" forms["abl_pl_f"] = stem .. "īsce" forms["abl_pl_n"] = stem .. "īsce" forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "hice" then insert_if_not(data.title, "demostrativo") -- .. " pronoun" forms["nom_sg_m"] = "hice" forms["nom_sg_f"] = "haece" forms["nom_sg_n"] = "hoce" forms["nom_pl_m"] = "hīce" forms["nom_pl_f"] = "haece" forms["nom_pl_n"] = "haece" forms["gen_sg_m"] = "huiusce" forms["gen_sg_f"] = "huiusce" forms["gen_sg_n"] = "huiusce" forms["gen_pl_m"] = {"hōrunce", "hōrumce"} forms["gen_pl_f"] = {"hārunce", "hārumce"} forms["gen_pl_n"] = {"hōrunce", "hōrumce"} forms["dat_sg_m"] = "huīce" forms["dat_sg_f"] = "huīce" forms["dat_sg_n"] = "huīce" forms["dat_pl_m"] = "hīsce" forms["dat_pl_f"] = "hīsce" forms["dat_pl_n"] = "hīsce" forms["acc_sg_m"] = "hunce" forms["acc_sg_f"] = "hance" forms["acc_sg_n"] = "hoce" forms["acc_pl_m"] = "hōsce" forms["acc_pl_f"] = "hāsce" forms["acc_pl_n"] = "haece" forms["abl_sg_m"] = "hōce" forms["abl_sg_f"] = "hāce" forms["abl_sg_n"] = "hōce" forms["abl_pl_m"] = "hīsce" forms["abl_pl_f"] = "hīsce" forms["abl_pl_n"] = "hīsce" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "plūs" then insert_if_not(data.title, "comparativo") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación con una terminación") data.note = "Ninguna de las formas en singular se usaron en latín clásico" forms["nom_sg_n"] = "plūs" forms["nom_pl_m"] = "plūrēs" forms["nom_pl_n"] = "plūra" forms["gen_sg_m"] = "plūris" forms["gen_sg_n"] = "plūris" forms["gen_pl_m"] = "plūrium" forms["gen_pl_n"] = "plūrium" forms["dat_sg_m"] = "plūrī" forms["dat_sg_n"] = "plūrī" forms["dat_pl_m"] = "plūribus" forms["dat_pl_n"] = "plūribus" forms["acc_sg_m"] = "plūrem" forms["acc_sg_f"] = "plūrem" forms["acc_sg_n"] = "plūs" forms["acc_pl_m"] = {"plūrēs", "plūrīs"} forms["acc_pl_n"] = "plūra" forms["abl_sg_m"] = {"plūrī", "plūre"} forms["abl_sg_f"] = {"plūrī", "plūre"} forms["abl_sg_n"] = {"plūrī", "plūre"} forms["abl_pl_m"] = "plūribus" forms["abl_pl_n"] = "plūribus" forms["voc_sg_n"] = "plūs" forms["voc_pl_m"] = "plūrēs" forms["voc_pl_n"] = "plūra" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif match(arg1, "^egō̆?$") or arg1 == "nōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "nōs" forms["gen_sg_m"] = "meī" forms["gen_pl_m"] = {"nostrī", "nostrum"} forms["dat_sg_m"] = "mihī̆" forms["dat_pl_m"] = "nōbīs" forms["acc_sg_m"] = {"mē", "mēmē"} forms["acc_pl_m"] = "nōs" forms["abl_sg_m"] = {"mē", "mēmē"} forms["abl_pl_m"] = "nōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "nōs" elseif arg1 == "tū" or arg1 == "vōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "vōs" forms["gen_sg_m"] = "tuī" forms["gen_pl_m"] = {"vestrī", "vestrum"} forms["dat_sg_m"] = "tibī̆" forms["dat_pl_m"] = "vōbīs" forms["acc_sg_m"] = {"tē", "tētē"} forms["acc_pl_m"] = "vōs" forms["abl_sg_m"] = {"tē", "tētē"} forms["abl_pl_m"] = "vōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "vōs" elseif arg1 == "suī" then insert_if_not(data.title, "pronombre reflexivo") forms["nom_sg_m"] = {} forms["nom_pl_m"] = {} forms["gen_sg_m"] = arg1 forms["gen_pl_m"] = forms["gen_sg_m"] forms["dat_sg_m"] = "sibī̆" forms["dat_pl_m"] = forms["dat_sg_m"] forms["acc_sg_m"] = {"sē", "sēsē"} forms["acc_pl_m"] = {"sē", "sēsē"} forms["abl_sg_m"] = {"sē", "sēsē"} forms["abl_pl_m"] = {"sē", "sēsē"} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} elseif arg1 == "is" or arg1 == "īdem" then insert_if_not(data.title, "pronombre demostrativo") forms["nom_sg_m"] = "is" forms["nom_sg_f"] = "ea" forms["nom_sg_n"] = "id" forms["nom_pl_m"] = {"iī", "eī", "ī"} forms["nom_pl_f"] = "eae" forms["nom_pl_n"] = "ea" forms["gen_sg_m"] = {"eius", "ejus"} forms["gen_sg_f"] = {"eius", "ejus"} forms["gen_sg_n"] = {"eius", "ejus"} forms["gen_pl_m"] = {"eōrum", "eum"} forms["gen_pl_f"] = "eārum" forms["gen_pl_n"] = {"eōrum", "eum"} forms["dat_sg_m"] = {"eī", "e͡i", "ēī"} forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"} forms["dat_sg_n"] = {"eī", "e͡i", "ēī"} forms["dat_pl_m"] = {"iīs", "eīs", "īs"} forms["dat_pl_f"] = {"iīs", "eīs", "īs", "eābus"} forms["dat_pl_n"] = {"iīs", "eīs", "īs"} forms["acc_sg_m"] = "eum" forms["acc_sg_f"] = "eam" forms["acc_sg_n"] = "id" forms["acc_pl_m"] = "eōs" forms["acc_pl_f"] = "eās" forms["acc_pl_n"] = "ea" forms["abl_sg_m"] = "eō" forms["abl_sg_f"] = "eā" forms["abl_sg_n"] = "eō" forms["abl_pl_m"] = {"iīs", "eīs", "īs"} forms["abl_pl_f"] = {"iīs", "eīs", "īs"} forms["abl_pl_n"] = {"iīs", "eīs", "īs"} if arg1 == "īdem" then forms["nom_sg_m"] = "ī" forms["nom_sg_n"] = "i" forms["acc_sg_n"] = "i" end elseif arg1 == "quis" or arg1 == "quī" then data.note = "La forma ''qua'' es preferida frente a ''quae'' cuando se usa como indefinido" local id = "id" if arg1 == "quī" then insert_if_not(data.title, "determinante relativo/interrogativo") id = "od" forms["nom_sg_m"] = {"quī", "quis", "quei{†}"} forms["nom_sg_f"] = {"quae", "qua"} forms["acc_sg_f"] = "quam" forms["abl_sg_m"] = "quō" forms["abl_sg_f"] = "quā" forms["abl_sg_n"] = "quō" else insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = {"quis", "quī"} forms["nom_sg_f"] = {"quae", "qua", "quis{†}"} forms["acc_sg_f"] = {"quam", "quem{†}"} forms["abl_sg_m"] = {"quō", "quī"} forms["abl_sg_f"] = {"quā", "quī"} forms["abl_sg_n"] = {"quō", "quī"} end forms["nom_sg_n"] = "qu"..id forms["nom_pl_m"] = {"quī", "quei{†}"} forms["nom_pl_f"] = "quae" forms["nom_pl_n"] = {"quae", "qua"} forms["gen_sg_m"] = {"cuius", "quoius{†}"} forms["gen_sg_f"] = {"cuius", "quoius{†}"} forms["gen_sg_n"] = {"cuius", "quoius{†}"} forms["gen_pl_m"] = "quōrum" forms["gen_pl_f"] = "quārum" forms["gen_pl_n"] = "quōrum" forms["dat_sg_m"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_f"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_n"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_n"] = {"quibus", "quīs", "queis{†}"} forms["acc_sg_m"] = "quem" forms["acc_sg_n"] = "qu"..id forms["acc_pl_m"] = "quōs" forms["acc_pl_f"] = "quās" forms["acc_pl_n"] = {"quae", "qua"} forms["abl_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_n"] = {"quibus", "quīs", "queis{†}"} elseif arg1 == "aliquī" then insert_if_not(data.title, "determinante indefinido") forms["nom_sg_m"] = {"aliquī{DET/ADJ}", "aliquis{PRON/SUST}"} forms["nom_sg_f"] = {"aliqua", "aliquae{R}"} forms["nom_sg_n"] = "aliquod" forms["nom_pl_m"] = "aliquī" forms["nom_pl_f"] = "aliquae" forms["nom_pl_n"] = "aliqua" forms["gen_sg_m"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_f"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_n"] = {"alicuius", "aliquoius{†}"} forms["gen_pl_m"] = "aliquōrum" forms["gen_pl_f"] = "aliquārum" forms["gen_pl_n"] = "aliquōrum" forms["dat_sg_m"] = {"alicui", "aliquoi{†}"} forms["dat_sg_f"] = {"alicui", "aliquoi{†}"} forms["dat_sg_n"] = {"alicui", "aliquoi{†}"} forms["dat_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["acc_sg_m"] = "aliquem" forms["acc_sg_f"] = "aliquam" forms["acc_sg_n"] = "aliquod" forms["acc_pl_m"] = "aliquōs" forms["acc_pl_f"] = "aliquās" forms["acc_pl_n"] = "aliqua" forms["abl_sg_m"] = "aliquō" forms["abl_sg_f"] = "aliquā" forms["abl_sg_n"] = "aliquō" forms["abl_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} elseif arg1 == "quisquam" then insert_if_not(data.title, "determinante indefinido, concordancia en negativo") data.note = "En latín clásico, era preferidas las formas de ''ūllus'' en lugar de las esta voz para el femenino y el neutro." forms["nom_sg_m"] = "quisquam" forms["nom_sg_f"] = {"quaequam", "quisquam{†}"} forms["nom_sg_n"] = "quodquam" forms["nom_pl_m"] = "quīquam" forms["nom_pl_f"] = "quaequam" forms["nom_pl_n"] = "quaequam" forms["gen_sg_m"] = "cuiusquam" forms["gen_sg_f"] = "cuiusquam" forms["gen_sg_n"] = "cuiusquam" forms["gen_pl_m"] = "quōrumquam" forms["gen_pl_f"] = "quārumquam" forms["gen_pl_n"] = "quōrumquam" forms["dat_sg_m"] = "cuiquam" forms["dat_sg_f"] = "cuiquam" forms["dat_sg_n"] = "cuiquam" forms["dat_pl_m"] = "quibusquam" forms["dat_pl_f"] = "quibusquam" forms["dat_pl_n"] = "quibusquam" forms["acc_sg_m"] = "quemquam" forms["acc_sg_f"] = {"quamquam", "quemquam{†}"} forms["acc_sg_n"] = "quodquam" forms["acc_pl_m"] = "quōsquam" forms["acc_pl_f"] = "quāsquam" forms["acc_pl_n"] = "quaequam" forms["abl_sg_m"] = {"quōquam", "quīquam{†}"} forms["abl_sg_f"] = "quāquam" forms["abl_sg_n"] = "quōquam" forms["abl_pl_m"] = "quibusquam" forms["abl_pl_f"] = "quibusquam" forms["abl_pl_n"] = "quibusquam" forms["voc_sg_m"] = "quisquam" forms["voc_sg_f"] = "quaequam" forms["voc_sg_n"] = "quodquam" forms["voc_pl_m"] = "quīquam" forms["voc_pl_f"] = "quaequam" forms["voc_pl_n"] = "quaequam" elseif arg1 == "quisquis" then insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = "quisquis" forms["nom_sg_f"] = "quisquis" forms["nom_sg_n"] = {"quidquid", "quicquid"} forms["nom_pl_m"] = "quīquī" forms["nom_pl_f"] = "quaequae" forms["nom_pl_n"] = "quaequae" forms["gen_sg_m"] = "cuiuscuius" forms["gen_sg_f"] = "cuiuscuius" forms["gen_sg_n"] = "cuiuscuius" forms["gen_pl_m"] = "quōrumquōrum" forms["gen_pl_f"] = "quārumquārum" forms["gen_pl_n"] = "quōrumquōrum" forms["dat_sg_m"] = "cuicui" forms["dat_sg_f"] = "cuicui" forms["dat_sg_n"] = "cuicui" forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"} forms["acc_sg_m"] = "quemquem" forms["acc_sg_f"] = "quamquam" forms["acc_sg_n"] = {"quidquid", "quicquid"} forms["acc_pl_m"] = "quōsquōs" forms["acc_pl_f"] = "quāsquās" forms["acc_pl_n"] = "quaequae" forms["abl_sg_m"] = "quōquō" forms["abl_sg_f"] = "quāquā" forms["abl_sg_n"] = "quōquō" forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"} forms["voc_sg_m"] = "quisquis" forms["voc_sg_f"] = "quisquis" forms["voc_sg_n"] = {"quidquid", "quicquid"} forms["voc_pl_m"] = "quīquī" forms["voc_pl_f"] = "quaequae" forms["voc_pl_n"] = "quaequae" elseif arg1 == "ecquis" then insert_if_not(data.title, "pronombre interrogativo") forms["nom_sg_m"] = {"ecquis", "ecquī"} forms["nom_sg_f"] = {"ecqua", "ecquae"} forms["nom_sg_n"] = "ecquid" forms["nom_pl_m"] = "ecquī" forms["nom_pl_f"] = "ecquae" forms["nom_pl_n"] = {"ecqua", "ecquae"} forms["gen_sg_m"] = "eccuius" forms["gen_sg_f"] = "eccuius" forms["gen_sg_n"] = "eccuius" forms["dat_sg_m"] = "eccui" forms["dat_sg_f"] = "eccui" forms["dat_sg_n"] = "eccui" forms["acc_sg_m"] = "ecquem" forms["acc_sg_f"] = "ecquam" forms["acc_sg_n"] = "ecquod" forms["acc_pl_m"] = "ecquōs" forms["acc_pl_f"] = "ecquās" forms["acc_pl_n"] = {"ecqua", "ecquae"} forms["abl_sg_m"] = {"ecquō", "ecquī"} forms["abl_sg_f"] = {"ecquā", "ecquī"} forms["abl_sg_n"] = {"ecquō", "ecquī"} elseif arg1 == "quīdam" then insert_if_not(data.title, "pronombre indefinido") forms["nom_sg_m"] = "quīdam" forms["nom_sg_f"] = "quaedam" forms["nom_sg_n"] = "quiddam" forms["nom_pl_m"] = {"quīdam", "quēsdam{†}"} forms["nom_pl_f"] = "quaedam" forms["nom_pl_n"] = "quaedam" forms["gen_sg_m"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_f"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_n"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_pl_m"] = {"quōrundam", "quōrumdam"} forms["gen_pl_f"] = {"quārundam", "quārumdam"} forms["gen_pl_n"] = {"quōrundam", "quōrumdam"} forms["dat_sg_m"] = {"cuidam", "quoidam{†}"} forms["dat_sg_f"] = {"cuidam", "quoidam{†}"} forms["dat_sg_n"] = {"cuidam", "quoidam{†}"} forms["dat_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_n"] = {"quibusdam", "quīsdam{†}"} forms["acc_sg_m"] = {"quendam", "quemdam"} forms["acc_sg_f"] = {"quandam", "quamdam"} forms["acc_sg_n"] = "quiddam" forms["acc_pl_m"] = {"quōsdam", "quēsdam{†}"} forms["acc_pl_f"] = "quāsdam" forms["acc_pl_n"] = "quaedam" forms["abl_sg_m"] = "quōdam" forms["abl_sg_f"] = "quādam" forms["abl_sg_n"] = "quōdam" forms["abl_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_n"] = {"quibusdam", "quīsdam{†}"} elseif arg1 == "nēmō" then insert_if_not(data.title, "Determinante y pronombre, concordancia en negativo") forms["nom_sg_m"] = "nēmō" forms["nom_sg_f"] = "nēmō" forms["gen_sg_m"] = {"nūllī̆us", "nēminis{R}"} forms["gen_sg_f"] = {"nūllī̆us", "nēminis{R}"} forms["dat_sg_m"] = "nēminī" forms["dat_sg_f"] = "nēminī" forms["acc_sg_m"] = "nēminem" forms["acc_sg_f"] = "nēminem" forms["abl_sg_m"] = {"nūllō", "nēmine{R}"} forms["abl_sg_f"] = {"nūllā", "nēmine{R}"} else error('adjective ' .. arg1 .. ' not recognized') end end local function extract_base(lemma, ending) if ending:find("(", nil, true) then return match(lemma, ending) end return match(lemma, "^(.*)" .. ending .. "$") end local function get_noun_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local subtypes = ending_and_subtypes[2] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. -- In addition, M or F as a subtype is canceled by N, and -- vice-versa, but M doesn't cancel F or vice-versa; instead, -- we simply ignore the conflicting gender specification when -- constructing the combination of specified and inferred subtypes. -- The reason for this is that neuters have distinct declensions -- from masculines and feminines, but masculines and feminines have -- the same declension, and various nouns in Latin that are -- normally masculine are exceptionally feminine and vice-versa -- (nauta, agricola, fraxinus, malus "apple tree", manus, rēs, -- etc.). -- -- In addition, sg as a subtype is canceled by pl and vice-versa. -- It's also possible to specify both, which will override sg but -- not cancel it (in the sense that it won't prevent the relevant -- rule from matching). For example, there's a rule specifying that -- lemmas beginning with a capital letter and ending in -ius take -- the ius.voci.sg subtypes. Specifying such a lemma with the -- subtype both will result in the ius.voci.both subtypes, whereas -- specifying such a lemma with the subtype pl will cause this rule -- not to match, and it will fall through to a less specific rule -- that returns just the ius subtype, which will be combined with -- the explicitly specified pl subtype to produce ius.pl. if specified_subtypes["-" .. subtype] or subtype == "N" and (specified_subtypes.M or specified_subtypes.F) or (subtype == "M" or subtype == "F") and specified_subtypes.N or subtype == "sg" and specified_subtypes.pl or subtype == "pl" and specified_subtypes.sg then not_this_subtype = true break end end end if not not_this_subtype then if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] local base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending == stem2 then return base, stem2, subtypes end else local base = extract_base(lemma, ending) if base then return base, stem2, subtypes end end end end if decltype then error("Unrecognized ending for declension-" .. decltype .. " noun: " .. lemma) end return lemma, stem2, keys_to_list(specified_subtypes) end local patterns = { {"[mM]a", "%0t"}, {"e", ""}, {"([aoAO])([lr])", "%1" .. MACRON .. "%2"}, {"[eE]l", "%0l"}, {"([mM])en", "%1in"}, {"([tT]ūd)ō", "%1in"}, {"([gG])ō", "%1in"}, {"[ōŌ]", "%1n"}, {"er", "r"}, {"[ēi]s", ""}, {"([āēīōūȳĀĒĪŌŪȲ]n)s", function(v) return (gsub(toNFD(v), MACRON, "") .. "t") end}, {"([cC])eps", "%1ipit"}, {"([bp])s", "%1"}, {"us", "or"}, {"s", "t"}, {"ex", "ic"}, {"x", "c"}, } local function make_stem2(stem) local n for _, pattern in ipairs(patterns) do local key = pattern[1] stem, n = gsub(stem, key .. "$", pattern[2]) if n > 0 then -- debug_track("la-utilities/" .. key) REVISAR return toNFC(stem) end end -- debug_track("la-utilities") REVISAR return stem end local function detect_noun_subtype(lemma, stem2, typ, subtypes) local base, _ if typ == "1" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ām", {"F", "am"}}, {"ās", {"M", "Greek", "Ma"}}, {"ēs", {"M", "Greek", "Me"}}, {"ē", {"F", "Greek"}}, {"ae", {"F", "pl"}}, {"a", {"F"}}, }) elseif typ == "2" then local detected_subtypes lemma, stem2, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(.*r)$", {"M", "er"}}, {"^(.*v)os$", {"M", "vos"}}, {"^(.*v)om$", {"N", "vom"}}, -- If the lemma ends in -os and the user said N or -M, then the -- following won't apply, and the second (neuter) -os will applly. {"os", {"M", "Greek"}}, {"os", {"N", "Greek", "us"}}, {"on", {"N", "Greek"}}, -- -ius beginning with a capital letter is assumed a proper name, -- and takes the voci subtype (vocative in -ī) along with the ius -- subtype and sg-only. Other nouns in -ius just take the ius -- subtype. Explicitly specify "sg" so that if .pl is given, -- this rule won't apply. {"^(%u.*)ius$", {"M", "ius", "voci", "sg"}}, {"ius", {"M", "ius"}}, {"ium", {"N", "ium"}}, -- If the lemma ends in -us and the user said N or -M, then the -- following won't apply, and the second (neuter) -us will applly. {"us", {"M"}}, {"us", {"N", "us"}}, {"um", {"N"}}, {"iī", {"M", "ius", "pl"}}, {"ia", {"N", "ium", "pl"}}, -- If the lemma ends in -ī and the user said N or -M, then the -- following won't apply, and the second (neuter) -ī will applly. {"ī", {"M", "pl"}}, {"ī", {"N", "us", "pl"}}, {"oe", {"M", "Greek", "pl"}}, {"a", {"N", "pl"}}, }) stem2 = stem2 or lemma return lemma, stem2, detected_subtypes elseif typ == "3" then if subtypes.pl then if subtypes.Greek then base = lemma:match("^(.*)erēs$") if base then return base .. "ēr", base .. "er", {"er"} end base = lemma:match("^(.*)ontēs$") if base then return base .. "ōn", base .. "ont", {"on"} end base = lemma:match("^(.*)es$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural Greek noun: " .. lemma) end base = lemma:match("^(.*)ia$") if base then return base, stem2 or base, {"N", "I", "pure"} end base = lemma:match("^(.*)a$") if base then return base, stem2 or base, {"N"} end base = lemma:match("^(.*)ēs$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural noun: " .. lemma) end stem2 = stem2 or make_stem2(lemma) local detected_subtypes if subtypes.Greek then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"is", ""}, {"I"}}, {"ēr", {"er"}}, {"ōn", {"on"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} end if not subtypes.N then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"^(%u.*pol)is$", ""}, {"F", "polis", "sg", "loc"}}, {{"tūdō", "tūdin"}, {"F"}}, {{"tās", "tāt"}, {"F"}}, {{"tūs", "tūt"}, {"F"}}, {{"tiō", "tiōn"}, {"F"}}, {{"siō", "siōn"}, {"F"}}, {{"xiō", "xiōn"}, {"F"}}, {{"gō", "gin"}, {"F"}}, {{"or", "ōr"}, {"M"}}, {{"tr[iī]x", "trīc"}, {"F"}}, {{"is", ""}, {"I"}}, {{"^(%l.*)ēs$", ""}, {"I"}}, }) if base then return lemma, stem2, detected_subtypes end end base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"us", "or"}, {"N"}}, {{"us", "er"}, {"N"}}, {{"ma", "mat"}, {"N"}}, {{"men", "min"}, {"N"}}, {{"^(%u.*)e$", ""}, {"N", "sg"}}, {{"e", ""}, {"N", "I", "pure"}}, {{"al", "āl"}, {"N", "I", "pure"}}, {{"ar", "ār"}, {"N", "I", "pure"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} elseif typ == "4" then if subtypes.echo or subtypes.Callisto then base = lemma:match("^(.*)ō$") if not base then error("Declension-4 noun of subtype .echo or .Callisto should end in -ō: " .. lemma) end if subtypes.Callisto then return base, nil, {"F", "sg"} else return base, nil, {"F"} end end return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", {"M"}}, {"ū̆", {"N"}}, {"ūs", {"M", "pl"}}, {"ua", {"N", "pl"}}, }) elseif typ == "5" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"iēs", {"F", "i"}}, {"iēs", {"F", "i", "pl"}}, {"ēs", {"F"}}, {"ēs", {"F", "pl"}}, }) elseif typ == "sgpl" then return lemma, stem2, {} elseif typ == "irreg" and lemma == "domus" then -- [[domus]] auto-sets data.loc = true, but we need to know this -- before declining the noun so we can propagate it to other segments. return lemma, nil, {"loc"} elseif typ == "indecl" or typ == "irreg" and ( lemma == "Deus" or match(lemma, "^[IJ]ēs[uū]s$") or lemma == "Athōs" or lemma == "vēnum" ) then -- Indeclinable nouns, and certain irregular nouns, set data.num = "sg", -- but we need to know this before declining the noun so we can -- propagate it to other segments. return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", {"both"}}, {"", {"sg"}}, {"", {"pl"}}, }) elseif typ == "indecl" or typ == "irreg" then return lemma, nil, {} else return nil, nil, {} end end -- Given ENDINGS_AND_SUBTYPES (a list of four-tuples of ENDING, RETTYPE, -- SUBTYPES, PROCESS_RETVAL), check each ENDING in turn against LEMMA and -- STEM2. If it matches, return a four-tuple BASE, STEM2, RETTYPE, NEW_SUBTYPES -- where BASE is normally the remainder of LEMMA minus the ending, STEM2 is -- as passed in, RETTYPE is as passed in, and NEW_SUBTYPES is the same as -- SUBTYPES minus any subtypes beginning with a hyphen. If no endings match, -- throw an error if DECLTYPPE is non-nil, mentioning the DECLTYPE -- (user-specified declension); but if DECLTYPE is nil, just return the tuple -- nil, nil, nil, nil. -- -- In order for a given entry to match, ENDING must match and also the subtypes -- in SUBTYPES (a list) must not be incompatible with the passed-in -- user-specified subtypes SPECIFIED_SUBTYPES (a set, i.e. a table where the -- keys are strings and the value is always true). "Incompatible" means that -- a given SUBTYPE is specified in either one and -SUBTYPE in the other, or -- that "pl" is found in SPECIFIED_SUBTYPES and not in SUBTYPES. -- -- The ending spec in ENDINGS_AND_SUBTYPES is one of the following: -- -- 1. A simple string, e.g. "tūdō", specifying an ending. -- 2. A regex that should match the entire lemma (it should be anchored at -- the beginning with ^ and at the end with $), and contains a single -- capturing group to match the base. -- 3. A pair {SIMPLE_STRING_OR_REGEX, STEM2_ENDING} where -- SIMPLE_STRING_OR_REGEX is one of the previous two possibilities and -- STEM2_ENDING is a string specifying the corresponding ending that must -- be present in STEM2. If this form is used, the combination of -- base + STEM2_ENDING must exactly match STEM2 in order for this entry -- to be considered a match. An example is {"is", ""}, which will match -- lemma == "follis", stem2 == "foll", but not lemma == "lapis", -- stem2 == "lapid". -- -- If PROCESS_STEM2 is given and the returned STEM2 would be nil, call -- process_stem2(BASE) to get the STEM2 to return. local function get_adj_type_and_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes, process_stem2) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local rettype = ending_and_subtypes[2] local subtypes = ending_and_subtypes[3] local process_retval = ending_and_subtypes[4] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. if specified_subtypes["-" .. subtype] then not_this_subtype = true break end -- A subtype is canceled if the user specified SUBTYPE and -- -SUBTYPE is given in the to-be-returned subtypes. local must_not_be_present = subtype:match("^%-(.*)$") if must_not_be_present and specified_subtypes[must_not_be_present] then not_this_subtype = true break end end end if not not_this_subtype then local base if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending ~= stem2 then base = nil end else base = extract_base(lemma, ending) end if base then -- Remove subtypes of the form -SUBTYPE from the subtypes -- to be returned. local new_subtypes = {} for _, subtype in ipairs(subtypes) do if subtype:sub(1, 1) ~= "-" then insert(new_subtypes, subtype) end end if process_retval then base, stem2 = process_retval(base, stem2) end if process_stem2 then stem2 = stem2 or process_stem2(base) end return base, stem2, rettype, new_subtypes end end end if not decltype then return lemma, stem2, nil, keys_to_list(specified_subtypes) elseif decltype == "" then error("Unrecognized ending for adjective: " .. lemma) else error("Unrecognized ending for declension-" .. decltype .. " adjective: " .. lemma) end end -- Autodetect the type and subtype of an adjective given all the information -- specified by the user: lemma, stem2, declension type and specified subtypes. -- Four values are returned: the lemma base (i.e. the stem of the lemma, as -- required by the declension functions), the value of stem2 to pass to the -- declension function, the declension type and the autodetected subtypes. -- Note that this will not detect a given subtype if -SUBTYPE is specified for -- any subtype that would be returned, or if SUBTYPE is specified and -SUBTYPE -- is among the subtypes that would be returned (such subtypes are filtered out -- of the returned subtypes). local function detect_adj_type_and_subtype(lemma, stem2, typ, subtypes) local function base_as_stem2(base, stem2) return base, base end local function constant_base(baseval) return function(base, stem2) return baseval, nil end end local function decl12_stem2(base) return base end local function decl3_stem2(base) return make_stem2(base) end local decl12_entries = { {"us", "1&2+", {}}, {"a", "1&2+", {}}, {"um", "1&2+", {}}, {"ī", "1&2+", {"pl"}}, {"ae", "1&2+", {"pl"}}, {"a", "1&2+", {"pl"}}, -- Nearly all -os adjectives are greekA {"os", "1&2+", {"greekA", "-greekE"}}, {"os", "1&2+", {"greekE", "-greekA"}}, {"ē", "1&2+", {"greekE", "-greekA"}}, {"on", "1&2+", {"greekA", "-greekE"}}, {"on", "1&2+", {"greekE", "-greekA"}}, {"^(.*er)$", "1&2+", {"er"}}, {"^(.*ur)$", "1&2+", {"er"}}, {"^(h)ic$", "1&2+", {"ic"}}, } local decl3_entries = { {"^(.*er)$", "3-3+", {"I"}}, {"^(.*er)$", "3-3+", {}}, {"is", "3-2+", {"I"}}, {"is", "3-2+", {}}, {"e", "3-2+", {"I"}}, {"e", "3-2+", {}}, {"^(.*[ij])or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(.*[ij])or$", "3-C+", {}}, {"^(min)or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(min)or$", "3-C+", {}}, {"^(.*trīx)$", "3-def+", {"trix", "abl_i_e", "-abl_e_i"}}, {"^(.*trīx)$", "3-def+", {"trix"}}, {"^(.*tor)$", "3-def+", {"tor", "abl_i_e", "-abl_e_i"}}, {"^(.*tor)$", "3-def+", {"tor"}}, -- Detect -ēs as 3-1 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like quadripēs, volucripēs). -- Essentially, for declension-3 adjectives, we require that -- .pl is given if the lemma is plural. -- -- Most 3-1 adjectives are i-stem (e.g. audāx) so we require -I -- to be given with non-i-stem adjectives. The first entry below -- will apply when -I isn't given, the second when it is given. {"^(.*ēs)$", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"I"}}, {"^(.*ēs)$", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"par"}}, {"^(.*[ij])ōrēs$", "3-C+", {"pl"}}, {"^(min)ōrēs$", "3-C+", {"pl"}}, -- If .pl with -ēs, we don't know if the adjective is 3-1, 3-2 -- or 3-3. Since 3-2 is probably the most common, we infer it -- (as well as the fact that these adjectives *are* in a sense -- 3-2 since they have a distinct neuter in -(i)a. Note that -- we have two entries here; the first one will apply unless -- -I is given, and will infer an i-stem adjective; the second -- one will apply otherwise (and infer a non-i-stem 3-1 adjective). {"ēs", "3-2+", {"pl", "I"}, base_as_stem2}, {"ēs", "3-1+", {"pl", "par"}, base_as_stem2}, -- Same for neuters. {"ia", "3-2+", {"pl", "I"}, base_as_stem2}, {"a", "3-1+", {"pl", "par"}, base_as_stem2}, -- As above for -ēs but for miscellaneous singulars. {"", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"I"}}, {"", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"par"}}, } local function get_subtypes_and_endings(typ, f) local subtypes_and_endings = {} for _, v in ipairs(decl3_entries) do if f(v) then v = deep_copy(v) v[2] = typ insert(subtypes_and_endings, v) end end return subtypes_and_endings end local function compare(spec) return spec[2] == typ end if typ == "+" then local base, new_stem2, rettype, new_subtypes = get_adj_type_and_subtype_by_ending(lemma, stem2, nil, subtypes, decl12_entries, decl12_stem2) if rettype then return base, new_stem2, rettype, new_subtypes else return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) end elseif typ == "3+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) elseif typ == "1&2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl12_entries, decl12_stem2) elseif typ == "1-1+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"a", typ, {}}, {"ae", typ, {"pl"}}, }) elseif typ == "2-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", typ, {}}, {"um", typ, {}}, {"ī", typ, {"pl"}}, {"a", typ, {"pl"}}, {"os", typ, {"greek"}}, {"on", typ, {"greek"}}, {"oe", typ, {"greek", "pl"}}, }) elseif typ == "3-1+" then -- Use the specs from `decl3_entries`, but add the two i-stem 3-2+ specs when plural-only, as they're the same when 3-1+. local subtypes_and_endings = get_subtypes_and_endings(typ, function(spec) local spec1, spec2 = spec[1], spec[2] return spec2 == typ or (spec2 == "3-2+" and spec1 == "ēs" or spec1 == "ia") end) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-def+" then -- Like 3-1+ but defective in gender local subtypes_and_endings = get_subtypes_and_endings(typ, compare) insert(subtypes_and_endings, {"", typ, {"I"}}) insert(subtypes_and_endings, {"", typ, {"par"}}) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"is", typ, {}}, {"e", typ, {}}, -- Detect -ēs as 3-2 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like isoscelēs). Essentially, -- for declension-3 adjectives, we require that .pl is given -- if the lemma is plural. {"ēs", typ, {}}, {"ēs", typ, {"pl"}}, {"ia", typ, {"pl"}}, }, decl3_stem2) elseif typ == "3-3+" or typ == "3-P+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ēs", typ, {"pl"}, base_as_stem2}, {"ia", typ, {"pl"}, base_as_stem2}, {"", typ, {}}, }, decl3_stem2) elseif typ == "3-C+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, get_subtypes_and_endings(typ, compare), decl3_stem2) elseif typ == "irreg+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(duo)$", typ, {"pl"}}, {"^(ambō)$", typ, {"pl"}}, {"^(mīll?ia)$", typ, {"N", "pl"}, constant_base("mīlle")}, -- match ea {"^(ea)$", typ, {}, constant_base("is")}, -- match id {"^(id)$", typ, {}, constant_base("is")}, -- match plural eī, iī {"^([ei]ī)$", typ, {"pl"}, constant_base("is")}, -- match plural ea, eae {"^(eae?)$", typ, {"pl"}, constant_base("is")}, -- match eadem {"^(eadem)$", typ, {}, constant_base("īdem")}, -- match īdem, idem {"^([īi]dem)$", typ, {}, constant_base("īdem")}, -- match plural īdem {"^(īdem)$", typ, {"pl"}}, -- match plural eadem, eaedem {"^(eae?dem)$", typ, {"pl"}, constant_base("īdem")}, -- match illa, ipsa, ista; it doesn't matter if we overmatch because -- we'll get an error as we use the stem itself in the returned base {"^(i[lps][lst])a$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match illud, istud; as above, it doesn't matter if we overmatch {"^(i[ls][lt])ud$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match ipsum {"^(ipsum)$", typ, {}, constant_base("ipse")}, -- match plural illī, ipsī, istī; as above, it doesn't matter if we -- overmatch {"^(i[lps][lst])ī$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- match plural illa, illae, ipsa, ipsae, ista, istae; as above, it -- doesn't matter if we overmatch {"^(i[lps][lst])ae?$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- Detect quī as non-plural unless .pl specified. {"^(quī)$", typ, {}}, -- Otherwise detect quī as plural. {"^(quī)$", typ, {"pl"}}, -- Same for quae. {"^(quae)$", typ, {}, constant_base("quī")}, {"^(quae)$", typ, {"pl"}, constant_base("quī")}, {"^(quid)$", typ, {}, constant_base("quis")}, {"^(quod)$", typ, {}, constant_base("quī")}, {"^(qui[cd]quid)$", typ, {}, constant_base("quisquis")}, {"^(quīquī)$", typ, {"pl"}, constant_base("quisquis")}, {"^(quaequae)$", typ, {"pl"}, constant_base("quisquis")}, -- match all remaining lemmas in lemma form {"", typ, {}}, }) elseif typ == "indecl+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", typ, {"both"}}, {"", typ, {"sg"}}, {"", typ, {"pl"}}, }) else -- 0+ return lemma, nil, typ, {} end end local noun_lb = { nom_sg = "sg.", gen_sg = "sg.", dat_sg = "sg.", acc_sg = "sg.", abl_sg = "sg.", voc_sg = "sg.", loc_sg = "sg.", nom_pl = "pl.", gen_pl = "pl.", dat_pl = "pl.", acc_pl = "pl.", abl_pl = "pl.", voc_pl = "pl.", loc_pl = "pl." } function export.sust(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de = "num"}, ["nota"] = {}, } for form,_ in pairs(noun_lb) do params[form] = {lista=true} end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local L = #palabras local M = 1 local declinfo local titles = {} local cats = {} local genero local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, detected_subtypes = detect_noun_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end if not genero then if types.M then genero = "m" end if types.N then genero = "n" end if types.F then genero = "f" end end local es_adj if not r1 and genero then local typ r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) if r1 then c = typ es_adj = true end end assert(r1, "forma no reconocida: "..r[1]) local cb = es_adj and adj_decl[c] or noun_decl[c] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) if es_adj then local forms_ = {} for form,arr in pairs(data.forms) do local f1, f2 = form:match("^(.*)(_"..genero..")$") if f1 then forms_[f1] = arr end end data.forms = forms_ end if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, noun_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if declinfo["loc_sg"] and #declinfo["loc_sg"] == 0 then declinfo["loc_sg"] = nil end if declinfo["loc_pl"] and #declinfo["loc_pl"] == 0 then declinfo["loc_pl"] = nil end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local forms = sobreescribir_formas(declinfo, args, false, {}) comprobar_defectivo(forms, {}) forms = desactivar_formas(forms, function (form) return (form:find("pl$") and nopl) or (form:find("sg$") and nosg) end ) local raiz_nom = f(forms["nom_sg"][1] or forms["nom_pl"][1] or "?") local raiz_gen = f(forms["gen_sg"][1] or forms["gen_pl"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, noun_lb) local t = {} insert(t, {{""}, {"Singular"}, {"Plural"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg"], forms["nom_pl"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg"], forms["gen_pl"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg"], forms["dat_pl"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg"], forms["acc_pl"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg"], forms["abl_pl"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg"], forms["voc_pl"]}) if (forms["loc_sg"] and forms["loc_sg"][1]) or (forms["loc_pl"] and forms["loc_pl"][1]) then insert(t, {{"Locativo", header=true, color=COLOR_H}, forms["loc_sg"], forms["loc_pl"]}) end insert(t, {{args["nota"] or "", colspan=3}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_nom..", "..raiz_gen.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local adj_lb = { nom_sg_m = "m.", nom_sg_n = "n.", nom_sg_f = "f.", nom_pl_m = "m.", nom_pl_n = "n.", nom_pl_f = "f.", gen_sg_m = "m.", gen_sg_n = "n.", gen_sg_f = "f.", gen_pl_m = "m.", gen_pl_n = "n.", gen_pl_f = "f.", dat_sg_m = "m.", dat_sg_n = "n.", dat_sg_f = "f.", dat_pl_m = "m.", dat_pl_n = "n.", dat_pl_f = "f.", acc_sg_m = "m.", acc_sg_n = "n.", acc_sg_f = "f.", acc_pl_m = "m.", acc_pl_n = "n.", acc_pl_f = "f.", abl_sg_m = "m.", abl_sg_n = "n.", abl_sg_f = "f.", abl_pl_m = "m.", abl_pl_n = "n.", abl_pl_f = "f.", voc_sg_m = "m.", voc_sg_n = "n.", voc_sg_f = "f.", voc_pl_m = "m.", voc_pl_n = "n.", voc_pl_f = "f.", } function export.adj(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de="num"}, ["gen"] = {por_defecto="mfn"}, ["nota"] = {}, } for form,_ in pairs(adj_lb) do params[form] = {lista=true} end params["dat_pl"] = {lista=true} params["abl_pl"] = {lista=true} params["loc_pl"] = {lista=true} local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) if args["dat_pl"][1] then args["dat_pl_m"] = deep_copy(args["dat_pl"]) args["dat_pl_n"] = deep_copy(args["dat_pl"]) args["dat_pl_f"] = deep_copy(args["dat_pl"]) end if args["abl_pl"][1] then args["abl_pl_m"] = deep_copy(args["abl_pl"]) args["abl_pl_n"] = deep_copy(args["abl_pl"]) args["abl_pl_f"] = deep_copy(args["abl_pl"]) end if args["loc_pl"][1] then args["loc_pl_m"] = deep_copy(args["loc_pl"]) args["loc_pl_n"] = deep_copy(args["loc_pl"]) args["loc_pl_f"] = deep_copy(args["loc_pl"]) end args["dat_pl"] = nil args["abl_pl"] = nil args["loc_pl"] = nil assert(not find(title, " "), "locuciones no soportadas aún") -- REVISAR local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local L = #palabras local M = 1 local declinfo local titles = {} local cats = {} local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") a = a or subarg b = b or "+" local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end local cb = adj_decl[typ] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) local formas_ = {} -- necesario crear otro arreglo para no modificar las claves durante la iteración for form,arr in pairs(data.forms) do local pref = match(form, "^(.*)_m$") if pref and not data.forms[pref.."_f"] then formas_[pref.."_f"] = deep_copy(arr) end if pref and not data.forms[pref.."_n"] then formas_[pref.."_n"] = deep_copy(arr) end formas_[form] = arr end data.forms = formas_ if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, adj_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local m = find(args["gen"], "m") local fem = find(args["gen"], "f") local n = find(args["gen"], "n") local forms = sobreescribir_formas(declinfo, args, false, {}, adj_lb) comprobar_defectivo(forms) forms = desactivar_formas(forms, function (form) return (form:find("pl") and nopl) or (form:find("sg") and nosg) or (form:find("m$") and not m) or (form:find("f$") and not fem) or (form:find("n$") and not n) end ) local raiz_m = f(forms["nom_sg_m"][1] or forms["nom_pl_m"][1] or "?") local raiz_f = f(forms["nom_sg_f"][1] or forms["nom_pl_f"][1] or "?") local raiz_n = f(forms["nom_sg_n"][1] or forms["nom_pl_n"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, adj_lb) local t = {} insert(t, {{"Singular", colspan=4}, header=true, color=COLOR_H}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg_m"], forms["nom_sg_f"], forms["nom_sg_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg_m"], forms["gen_sg_f"], forms["gen_sg_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg_m"], forms["dat_sg_f"], forms["dat_sg_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg_m"], forms["acc_sg_f"], forms["acc_sg_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg_m"], forms["abl_sg_f"], forms["abl_sg_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg_m"], forms["voc_sg_f"], forms["voc_sg_n"]}) insert(t, {{"Plural", colspan=4, header=true, color=COLOR_H}}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_pl_m"], forms["nom_pl_f"], forms["nom_pl_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_pl_m"], forms["gen_pl_f"], forms["gen_pl_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_pl_m"], forms["dat_pl_f"], forms["dat_pl_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_pl_m"], forms["acc_pl_f"], forms["acc_pl_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_pl_m"], forms["abl_pl_f"], forms["abl_pl_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_pl_m"], forms["voc_pl_f"], forms["voc_pl_n"]}) insert(t, {{args["nota"] or "", colspan=4}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_m..", "..raiz_f..", "..raiz_n.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local EGO, TU, IS, NOS, VOS, EI = 1, 2, 3, 4, 5, 6 local tostr = {"1", "2", "3", "4", "5", "6"} local PRONOMBRES = {"ego", "tū", "is, ea, id", "nōs", "vōs", "eī, eae, ea"} local PRONOMBRES_SUBJ = {"ut ego", "ut tū", "ut is, ut ea, ut id", "ut nōs", "ut vōs", "ut eī, ut eae, ut ea"} local PRONOMBRES_IMP = {"―", "(tū)", "(is, ea, id)", "―", "(vōs)", "(eī, eae, ea)"} local IMPERSONALES = {"", "", "(id)", "", "", ""} local function obtener_pronombre(forma, impers) local conj, p = match(forma, "^(.*)(%d)$") if not p then return nil end p = tonumber(p) if impers then return IMPERSONALES[p] else if find(conj, "^subj") then return PRONOMBRES_SUBJ[p] end if find(conj, "^imper") then return PRONOMBRES_IMP[p] end return PRONOMBRES[p] end end local sufijos = { ["1"] = { inf_act = {"āre","isse"}, inf_pas = {"ārī"}, part_act = {"āns","ūrus"}, part_pas = {"andus","us"}, ger = {"andī","andō","andum"}, sup = {"um","ū"}, ind_pres = {"ō","ās","at","āmus","ātis","ant"}, ind_imp = {"ābam","ābās","ābat","ābāmus","ābātis","ābant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ābō","ābis","ābit","ābimus","ābitis","ābunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","āris","ātur","āmur","āminī","antur", nil,"āre"}, ind_imp_pas = {"ābar","ābāris","ābātur","ābāmur","ābāminī","ābantur", nil,"ābāre"}, ind_fut_pas = {"ābor","āberis","ābitur","ābimur","ābiminī","ābuntur", nil,"ābere"}, subj_pres = {"em","ēs","et","ēmus","ētis","ent"}, subj_imp = {"ārem","ārēs","āret","ārēmus","ārētis","ārent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"er","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_imp_pas = {"ārer","ārēris","ārētur","ārēmur","ārēminī","ārentur", nil,"ārēre"}, imper_pres = {nil,"ā",nil,nil,"āte",nil}, imper_fut = {nil,"ātō","ātō",nil,"ātōte","antō"}, imper_pres_pas = {nil,"āre",nil,nil,"āminī",nil}, imper_fut_pas = {nil,"ātor","ātor",nil,nil,"antor"}, }, ["2"] = { inf_act = {"ēre","isse"}, inf_pas = {"ērī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"eō","ēs","et","ēmus","ētis","ent"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ēbō","ēbis","ēbit","ēbimus","ēbitis","ēbunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"eor","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ēbor","ēberis","ēbitur","ēbimur","ēbiminī","ēbuntur", nil,"ēbere"}, subj_pres = {"eam","eās","eat","eāmus","eātis","eant"}, subj_imp = {"ērem","ērēs","ēret","ērēmus","ērētis","ērent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ear","eāris","eātur","eāmur","eāminī","eantur", nil,"eāre"}, subj_imp_pas = {"ērer","ērēris","ērētur","ērēmur","ērēminī","ērentur", nil,"ērēre"}, imper_pres = {nil,"ē",nil,nil,"ēte",nil}, imper_fut = {nil,"ētō","ētō",nil,"ētōte","entō"}, imper_pres_pas = {nil,"ēre",nil,nil,"ēminī",nil}, imper_fut_pas = {nil,"ētor","ētor",nil,nil,"entor"}, }, ["3"] = { -- 3 (comparar [[capio]] con [[lego]], las raíces con capi- y leg- pero hay que eliminar la doble ii) inf_act = {"ere","isse"}, inf_pas = {"ī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", nil,"ere"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_pres = {"am","ās","at","āmus","ātis","ant"}, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", nil,"āre"}, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", nil,"erēre"}, imper_pres = {nil,"e",nil,nil,"ite",nil}, imper_fut = {nil,"itō","itō",nil,"itōte","untō"}, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil}, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor"}, }, ["3/4"] = { inf_act = {"ere","isse","īre","isse"}, inf_pas = {"ī","īrī"}, part_act = {"ēns","iēns","ūrus"}, part_pas = {"endus","iendus","us"}, ger = {"endī","endō","endum","iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt", "iō","īs",nil,"īmus","ītis","iunt" }, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant", "iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant" }, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent", "iam","iēs","iet","iēmus","iētis","ient" }, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", "ior","ere","ītur","īmur","īminī","iuntur", nil,"īris",nil,nil,nil,nil, nil,"īre" }, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", "iēbar","ēbāre","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāris",nil,nil,nil,nil, nil,"iēbāre" }, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", "iar","ēre","iētur","iēmur","iēminī","ientur", nil,"iēris",nil,nil,nil,nil, nil,"iēre" }, subj_pres = {"am","ās","at","āmus","ātis","ant", "iam","iās","iat","iāmus","iātis","iant", }, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent", "īrem","īrēs","īret","īrēmus","īrētis","īrent" }, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", "iar","āre","iātur","iāmur","iāminī","iantur", nil,"iāris",nil,nil,nil,nil, nil,"iāre" }, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", "īrer","erēre","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēris",nil,nil,nil,nil, nil,"īrēre" }, imper_pres = {nil,"e",nil,nil,"ite",nil, nil,"ī",nil,nil,"īte",nil }, imper_fut = {nil,"itō","itō",nil,"itōte","untō", nil,"ītō","ītō",nil,"ītōte","iuntō" }, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil, nil,"īre",nil,nil,"īminī",nil }, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor", nil,"ītor","ītor",nil,nil,"iuntor" }, }, ["4"] = { inf_act = {"īre","isse"}, inf_pas = {"īrī"}, part_act = {"iēns","ūrus"}, part_pas = {"iendus","us"}, ger = {"iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"iō","īs","it","īmus","ītis","iunt"}, ind_imp = {"iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"iam","iēs","iet","iēmus","iētis","ient"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"ior","īris","ītur","īmur","īminī","iuntur", nil,"īre"}, ind_imp_pas = {"iēbar","iēbāris","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāre"}, ind_fut_pas = {"iar","iēris","iētur","iēmur","iēminī","ientur", nil,"iēre"}, subj_pres = {"iam","iās","iat","iāmus","iātis","iant"}, subj_imp = {"īrem","īrēs","īret","īrēmus","īrētis","īrent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"iar","iāris","iātur","iāmur","iāminī","iantur", nil,"iāre"}, subj_imp_pas = {"īrer","īrēris","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēre"}, imper_pres = {nil,"ī",nil,nil,"īte",nil}, imper_fut = {nil,"ītō","ītō",nil,"ītōte","iuntō"}, imper_pres_pas = {nil,"īre",nil,nil,"īminī",nil}, imper_fut_pas = {nil,"ītor","ītor",nil,nil,"iuntor"}, } } local formas_no_personales = { inf_act = true, inf_pas = true, part_act = true, part_pas = true, ger = true, sup = true, } local formas_personales = { ind_pres = true, ind_imp = true, ind_perf = true, ind_pluperf = true, ind_fut = true, ind_fut_perf = true, ind_fut_sig = true, ind_pres_pas = true, ind_imp_pas = true, ind_fut_pas = true, subj_pres = true, subj_imp = true, subj_perf = true, subj_pluperf = true, subj_aor_sig = true, subj_pres_pas = true, subj_imp_pas = true, imper_pres = true, imper_fut = true, imper_pres_pas = true, imper_fut_pas = true, } local formas = merge(formas_no_personales, formas_personales) local verbos_irregulares = { {"aiō", {"aiō", "aiiō", "aijō", "ajō"}, { desactivar = {"inf_pas","part_pas","ger","sup","ind_pluperf","ind_fut","ind_fut_perf", "ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_perf","subj_pluperf","subj_pres_pas", "subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {"ai"}, nucleoperf = {"a"}, nucleosup = {}, nucleosigm = {}, inf_act = {"aiere"}, ind_pres = {nil,nil,nil,{}}, ind_perf = {{},nil,nil,{},{}}, subj_pres = {nil,nil,nil,{},{}}, subj_imp = {{},{},nil,{},{},{}}, imper_pres = {{},{"ai"},{},{},{},{}}, }}, {"cedo", {"cedo"}, { desactivar = {"inf_act","inf_pas","part_act","part_pas","ger","sup","ind_pluperf","ind_pres","ind_imp","ind_perf", "ind_fut","ind_fut_perf","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres","subj_imp","subj_perf", "subj_pluperf","subj_pres_pas","subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, imper_pres = {nil,{"cedo"},nil,nil,{"cette","cedile"},nil}, }}, {"dīcō", {"dīcō"}, { conj = "3", nucleopres = {"dīc"}, nucleoperf = {"dīx"}, nucleosup = {"dict"}, nucleosigm = {"dīx"}, desactivar = {}, imper_pres = {nil, {"dīc", "dīce"}}, inf_pas = {"dīcī", "dīcier{L}"}, }}, {"dō", {"dō"}, { conj = "1", nucleopres = {"d"}, nucleoperf = {"ded"}, nucleosup = {"dat"}, nucleosigm = {}, desactivar = {}, inf_act = {"dare","dedisse"}, inf_pas = {"darī"}, ind_pres = {nil,nil,nil,{"damus"},{"datis"},nil}, ind_imp = {{"dabam"},{"dabās"},{"dabat"},{"dabāmus"},{"dabātis"},{"dabant"}}, ind_fut = {{"dabō"},{"dabis"},{"dabit"},{"dabimus"},{"dabitis"},{"dabunt"}}, ind_imp_pas = {{"dabar"},{"dabāris","dabāre"},{"dabātur"},{"dabāmur"},{"dabāminī"},{"dabantur"}}, ind_fut_pas = {{"dabor"},{"daberis","dabere"},{"dabitur"},{"dabimur"},{"dabiminī"},{"dabuntur"}}, subj_imp = {{"darem"},{"darēs"},{"daret"},{"darēmus"},{"darētis"},{"darent"}}, subj_imp_pas = {{"darer"},{"darēris","darēre"},{"darētur"},{"darēmur"},{"darēminī"},{"darentur"}}, imper_pres = {nil,nil,nil,nil,{"date"},nil}, imper_fut = {nil,{"datō"},{"datō"},nil,{"datōte"},{"dantō"}}, imper_pres_pas = {nil,{"dare"},nil,nil,{"daminī"},nil}, imper_fut_pas = {nil,{"dator"},{"dator"},nil,nil,{"dator"}}, }}, {"dūcō", {"dūcō"}, { conj = "3", nucleopres = {"dūc"}, nucleoperf = {"dūx"}, nucleosup = {"duct"}, nucleosigm = {}, desactivar = {}, imper_pres = {nil, {"dūc", "dūce"}}, }}, {"edō", {"edō", "ëdō"}, { conj = "3", nucleopres = {"ed"}, nucleoperf = {"ed"}, nucleosup = {""}, nucleosigm = {}, desactivar = {}, inf_act = {"edere","ēsse"}, part_act = {"edēns","ēsūrus","ēssūrus","ēstūrus"}, part_pas = {"edendus","edundus","ēsus","ēssus","ēstus"}, sup = {"ēsum","ēssum","ēstum","ēsū","ēssū","ēstū"}, ind_pres = {nil,{"edis","ēs"},{"edit","ēst"},nil,{"editis","ēstis"},nil}, ind_pres_pas = {nil,{"ederis","edere","ēssis","ēsse"},{"editur","ēstur"}}, subj_pres = {{"edam","edim"},{"edās","edīs"},{"edat","edit","ēst"},{"edāmus","edīmus"},{"edātis","edītis"},{"edant","edint"}}, subj_imp = {{"ederem","ēssem"},{"ederēs","ēssēs"},{"ederet","ēsset"},{"ederēmus","ēssēmus"},{"ederētis","ēssētis"},{"ederent","ēssent"}}, subj_imp_pas = {{"ederer","ēsser"},{"ederēris","ederēre","ēssēris","ēssēre"},{"ederetur","ēssetur"},{"ederēmur","ēssēmur"},{"ederēminī","ēssēminī"},{"ederentur","ēssentur"}}, imper_pres = {nil,{"ede","ēs"},nil,nil,{"edite","ēste"},nil}, imper_fut = {nil,{"editō","ēstō"},{"editō","ēstō"},nil,{"editōte","ēstōte"},{"eduntō"}}, imper_pres_pas = {nil,{"edere","ēsse"},nil,nil,{"ediminī"},nil}, imper_fut_pas = {nil,{"editor","ēstor"},{"editor","ēstor"},nil,nil,{"eduntor"}}, }}, {"eō", {"eō", "ëō"}, { conj = "4", nucleopres = {""}, nucleoperf = {""}, nucleosup = {""}, nucleosigm = {}, desactivar = {"imper_pres_pas"}, inf_act = {"īre","īsse","iisse","īvisse"}, inf_pas = {"īrī","īrier"}, part_act = {"iēns","itūrus"}, part_pas = {"eundum","itum"}, ger = {"eundī","eundō","eundum"}, sup = {"itum","itū"}, ind_pres = {{"eō"},{"īs"},{"it"},{"īmus"},{"ītis"},{"eunt"}}, ind_imp = {{"ībam"},{"ībās"},{"ībat"},{"ībāmus"},{"ībātis"},{"ībant"}}, ind_perf = {{"iī","īvī"},{"īstī","iistī","īvistī"},{"iit","īvit"},{"iimus","īvimus"},{"īstis","iistis","īvistis"},{"iērunt","iēre","īvērunt","īvēre"}}, ind_pluperf = {{"ieram","īveram"},{"ierās","īverās"},{"ierat","īverat"},{"ierāmus","īverāmus"},{"ierātis","īverātis"},{"ierant","īverant"}}, ind_fut = {{"ībō"},{"ībis"},{"ībit"},{"ībimus"},{"ībitis"},{"ībunt"}}, ind_fut_perf = {{"ierō","īverō"},{"ieris","īveris"},{"ierit","īverit"},{"ierimus","īverimus"},{"ieritis","īveritis"},{"ierint","īverint"}}, ind_fut_sig = {nil,nil,nil,nil,nil,nil}, ind_pres_pas = {{},{},{"ītur"},{},{},{}}, ind_imp_pas = {{},{},{"ībātur"},{},{},{}}, ind_fut_pas = {{},{},{"ībitur"},{},{},{}}, subj_pres = {{"eam"},{"eās"},{"eat"},{"eāmus"},{"eātis"},{"eant"}}, subj_imp = {{"īrem"},{"īrēs"},{"īret"},{"īrēmus"},{"īrētis"},{"īrent"}}, subj_perf = {{"ierim","īverim"},{"ierīs","īverīs"},{"ierit","īverit"},{"ierīmus","īverīmus"},{"ierītis","īverītis"},{"ierint","īverint"}}, subj_pluperf = {{"īssem","iissem","īvissem"},{"īssēs","iissēs","īvissēs"},{"īsset","iisset","īvisset"},{"īssēmus","iissēmus","īvissēmus"},{"īssētis","iissētis","īvissētis"},{"īssent","iissent","īvissent"}}, subj_aor_sig = {nil,nil,nil,nil,nil,nil}, subj_pres_pas = {{},{},{"eātur"},{},{},{}}, subj_imp_pas = {{},{},{"īrētur"},{},{},{}}, imper_pres = {nil,nil,nil,nil,nil,nil}, imper_fut = {nil,nil,nil,nil,nil,{"euntō"}}, imper_fut_pas = {nil,{},nil,nil,nil,{}}, }}, {"faciō", {"faciō"}, { conj = "3", nucleopres = {"fac"}, nucleoperf = {"fax"}, nucleosup = {"fact"}, nucleosigm = {"fax","faxs","facs"}, desactivar = {}, ind_pres_pas = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, ind_imp_pas = {{"fīēbam"},{"fīēbās"},{"fīēbat"},{"fīēbāmus"},{"fīēbātis"},{"fīēbant"}}, ind_fut_pas = {{"fīam"},{"fīēs"},{"fīet"},{"fīēmus"},{"fīētis"},{"fīent"}}, subj_pres_pas = {{"fīam"},{"fīās"},{"fīat"},{"fīāmus"},{"fīātis"},{"fīant"}}, subj_imp_pas = {{"fierem"},{"fierēs"},{"fieret"},{"fierēmus"},{"fierētis"},{"fierent"}}, imper_pres = {nil,{"fac","face"},nil,nil,nil,nil}, imper_pres_pas = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut_pas = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"ferō", {"ferō"}, { conj = "3", nucleopres = {"fer"}, nucleoperf = {"tul", "tetul{†}"}, nucleosup = {"lāt"}, nucleosigm = {}, desactivar = {}, inf_act = {"ferre", "tulisse", "tetulisse{†}"}, inf_pas = {"ferrī"}, ind_pres = {nil,{"fers"},{"fert"},nil,{"fertis"}}, ind_pres_pas = {nil,{"ferris","ferre"}}, subj_imp = {{"ferrem"},{"ferrēs"},{"ferret"},{"ferrēmus"},{"ferrētis"},{"ferrent"}}, subj_imp_pas = {{"ferrer"},{"ferrēris","ferrēre"},{"ferrētur"},{"ferrēmur"},{"ferrēminī"},{"ferrentur"}}, imper_pres = {nil,{"fer"},nil,nil,{"ferte"},nil}, imper_pres_pas = {nil,{"ferre"},nil,nil,nil,nil}, imper_fut = {nil,{"fertō"},{"fertō"},nil,{"fertōte"},{"feruntō"}}, imper_fut_pas = {nil,{"fertor"},{"fertor"},nil,nil,nil}, }}, {"fīō", {"fīō"}, { conj = "3", nucleopres = {"fī"}, nucleoperf = {}, nucleosup = {"fact"}, nucleosigm = {}, semidep = true, desactivar = {}, ind_pres = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, imper_pres = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"feruntō"}}, }}, {"inquam", {"inquam"}, { conj = "3", nucleopres = {"inqui"}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, nopasivo = true, desactivar = {"inf_act","inf_pas","part_pas","ger"}, ind_pres = {{"inquam"}}, }}, {"possum", {"possum"}, { conj = "3", nucleopres = {"pot"}, nucleoperf = {"pot"}, nucleosup = {}, nucleosigm = {}, pres = "possō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"posse","potesse{†}"}, part_act = {"potēns"}, ind_pres = {{"possum"},{"potes"},{"potest"},{"possumus"},{"potestis"},{"possunt"}}, ind_imp = {{"poteram"},{"poterās"},{"poterat"},{"poterāmus"},{"poterātis"},{"poterant"}}, ind_fut = {{"poterō"},{"poteris","potere"},{"poterit"},{"poterimus"},{"poteritis"},{"poterunt"}}, ind_perf = {{"potuī"},{"potuistī"},{"potuit"},{"potuimus"},{"potuistis"},{"potuērunt","potuēre"}}, ind_pluperf = {{"potueram"},{"potuerās"},{"potuerat"},{"potuerāmus"},{"potuerātis"},{"potuerant"}}, ind_fut_perf = {{"potuerō"},{"potueris"},{"potuerit"},{"potuerimus"},{"potueritis"},{"potuerunt"}}, subj_pres = {{"possem"},{"possēs"},{"possēt"},{"possēmus"},{"possētis"},{"possent"}}, subj_imp = {{"possim"},{"possīs"},{"possit"},{"possīmus"},{"possītis"},{"possint"}}, subj_perf = {{"potuerim"},{"potuerīs"},{"potuerit"},{"potuerīmus"},{"potuerītis"},{"potuerint"}}, subj_pluperf = {{"potuissem"},{"potuissēs"},{"potuisset"},{"potuissēmus"},{"potuissētis"},{"potuissent"}}, }}, {"sum", {"sum"}, { conj = "3", nucleopres = {"s"}, nucleoperf = {"fu"}, nucleosup = {}, nucleosigm = {}, pres = "sō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres_pas","imper_fut_pas"}, inf_act = {"esse"}, part_act = {"futūrus"}, ind_pres = {{"sum"},{"es"},{"est"},{"sumus"},{"estis"},{"sunt"}}, ind_imp = {{"eram"},{"erās"},{"erat"},{"erāmus"},{"erātis"},{"erant"}}, ind_fut = {{"erō"},{"eris","ere"},{"erit"},{"erimus"},{"eritis"},{"erunt"}}, subj_pres = {{"sim","siem","fuam{†}"},{"sīs","siēs","fuās{†}"},{"sit","siet","fuat{†}"},{"sīmus","siēmus","fuāmus{†}"},{"sītis","siētis","fuātis{†}"},{"sint","sient","fuant{†}"}}, subj_imp = {{"essem","forem"},{"essēs","forēs"},{"esset","foret"},{"essēmus","forēmus"},{"essētis","forētis"},{"essent","forent"}}, imper_pres = {nil,{"es"},nil,nil,{"este"},nil}, imper_fut = {nil,{"estō"},{"estō"},nil,{"estōte"},nil}, }}, {"mālō", {"mālō"}, { conj = "3", nucleopres = {"māl"}, nucleoperf = {"mālu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"mālle","māluisse"}, ind_pres = {{"mālō"},{"māvīs"},{"māvult"},{"mālumus"},{"māvultis"},{"mālunt"}}, subj_pres = {{"mālim"},{"mālīs"},{"mālit"},{"mālīmus"},{"mālītis"},{"mālint"}}, subj_imp = {{"māllem"},{"māllēs"},{"māllet"},{"māllēmus"},{"māllētis"},{"māllent"}}, }}, {"nōlō", {"nōlō"}, { conj = "3", nucleopres = {"nōl"}, nucleoperf = {"nōlu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"nōlle","nōluisse"}, ind_pres = {{"nōlō"},{"nōn vīs","nevīs{†}"},{"nōn vult","nōn volt","nevolt{†}"},{"nōlumus"},{"nōn vultis","nōn voltis","nōltis{†}"},{"nōlunt"}}, subj_pres = {{"nōlim"},{"nōlīs"},{"nōlit"},{"nōlīmus"},{"nōlītis"},{"nōlint"}}, subj_imp = {{"nōllem"},{"nōllēs"},{"nōllet"},{"nōllēmus"},{"nōllētis"},{"nōllent"}}, }}, {"volō", {"volō"}, { conj = "3", nucleopres = {"vol"}, nucleoperf = {"volu"}, nucleosup = {"volit"}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"velle","voluisse"}, ind_pres = {{"volō"},{"vīs"},{"vult","volt{†}"},{"volumus"},{"vultis","voltis{†}"},{"volunt"}}, subj_pres = {{"velim","volim{†}"},{"velīs","volīs{†}"},{"velit","volit{†}"},{"velīmus","volīmus{†}"},{"velītis","volītis{†}"},{"velint","volint{†}"}}, subj_imp = {{"vellem"},{"vellēs"},{"vellet"},{"vellēmus"},{"vellētis"},{"vellent"}}, }}, } local function combinar_prefijo_nucleosufijo(prefijo, nucleosufijo) return prefijo..nucleosufijo end local function combinar_nucleo_sufijo(nucleo, sufijo, agregar_i) if agregar_i and (not find(sufijo, "^[iī]")) and (sufijo ~= "e") and (not find(sufijo, "^er")) then return nucleo.."~i~"..sufijo end return nucleo..sufijo end local function agregar_forma(conjugado, conjinfo, forma) conjinfo[forma] = conjinfo[forma] or {} local sufijos_ = sufijos[conjinfo.conj][forma] local nucleos local prefijo if forma == "sup" then nucleos = conjinfo.nucleosup prefijo = conjinfo.prefijosup or conjinfo.prefijo elseif find(forma, "sig") then nucleos = conjinfo.nucleosigm prefijo = conjinfo.prefijosigm or conjinfo.prefijo elseif find(forma, "perf") then nucleos = conjinfo.nucleoperf prefijo = conjinfo.prefijoperf or conjinfo.prefijo else nucleos = conjinfo.nucleopres prefijo = conjinfo.prefijo end if formas_no_personales[forma] then if conjinfo[forma][1] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma]) do insert_if_not(conjugado[forma], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else for _, sufijo in ipairs(sufijos_) do local nucleos_ = nucleos if forma == "inf_act" and sufijo == "isse" then nucleos_ = conjinfo.nucleoperf elseif forma == "part_act" and sufijo == "ūrus" then nucleos_ = conjinfo.nucleosup elseif forma == "part_pas" and sufijo == "us" then nucleos_ = conjinfo.nucleosup end local agregar_i = conjinfo.I and nucleos_ == conjinfo.nucleopres for _,nucleo in ipairs(nucleos_) do insert_if_not(conjugado[forma], combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(nucleo, sufijo, agregar_i))) end end end return end for i = EGO, EI do local p = tostr[i] if conjinfo[forma][i] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma][i]) do insert_if_not(conjugado[forma..p], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else local k = i while sufijos_[k] do local agregar_i = conjinfo.I and nucleos == conjinfo.nucleopres for j, n in ipairs(nucleos) do local x = combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(n, sufijos_[k], agregar_i)) if conjinfo.always_sync_perf and (forma == "ind_perf" or forma == "ind_pluperf" or forma == "ind_fut_perf" or forma == "subj_perf" or forma == "subj_pluperf") then x = x:gsub("īvī", "iī") x = x:gsub("īvi", "ī") x = x:gsub("īve", "ī") x = x:gsub("īvē", "ē") end insert_if_not(conjugado[forma..p], x) end k = k + 6 end end end end local function get_subtype_by_ending(pres, conjinfo, specs) for _, spec in ipairs(specs) do local base = extract_base(pres, spec[1]) if base then for _,s in ipairs(spec[2]) do if conjinfo[s] == nil then conjinfo[s] = true end end return base end end error("Unrecognized ending for conjugation " .. conjinfo["conj"]) end local function detect_v_type_and_subtypes(conjinfo) local pres = conjinfo["v"] local conj_arg = conjinfo["conj"] pres = toNFC(pres) local base_conj_arg, auto_perf_supine = conj_arg:match("^([124]/?4?)(%+%+?)$") if base_conj_arg then if auto_perf_supine == "++" and base_conj_arg ~= "4" then error("Conjugation types 1++ and 2++ not allowed") end conj_arg = base_conj_arg end conjinfo.conj = conj_arg if conj_arg == "1" then local base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"at", {"impers"}}, {"ātur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "āv" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "āt" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "āss" end end elseif conj_arg == "2" then local base = get_subtype_by_ending(pres, conjinfo, { {"eō", {}}, {"eor", {"dep"}}, {"et", {"impers"}}, {"ētur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "u" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "it" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3" then local base if conjinfo.I == false then -- si explícitamente se indicó que no es del tipo -io, hay que excluir sufijos base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) else base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) end if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end assert(conjinfo["nucleoperf"][1], "especifique todos los núcleos para verbos de la tercera conjugación") assert(conjinfo["nucleosup"][1], "especifique todos los núcleos para verbos de la tercera conjugación") if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3/4" then local base base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "4" then local base = get_subtype_by_ending(pres, conjinfo, { {"iō", {}}, {"ior", {"dep"}}, {"it", {"impers"}}, {"ītur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "irreg" then for _,p in ipairs(verbos_irregulares) do for _,rx in ipairs(p[2]) do local pref, verb = match(conjinfo.v, "^(.*)("..rx..")$") if verb then conjinfo.v = verb conjinfo.prefijo = pref if conjinfo.nucleoperf[1] and conjinfo.nucleoperf[1] ~= "-" then -- [[ecfero]] conjinfo.prefijoperf = conjinfo.nucleoperf[1] conjinfo.nucleoperf = {} end if conjinfo.nucleosup[1] and conjinfo.nucleosup[1] ~= "-" then conjinfo.prefijosup = conjinfo.nucleosup[1] conjinfo.nucleosup = {} end if conjinfo.nucleosigm[1] and conjinfo.nucleosigm[1] ~= "-" then conjinfo.prefijosigm = conjinfo.nucleosigm[1] conjinfo.nucleosigm = {} end conjinfo.irreg = true conjinfo.conj = p[3].conj for k,val in pairs(p[3]) do if not conjinfo[k] or (type(conjinfo[k]) == "table" and not conjinfo[k][1]) then conjinfo[k] = deep_copy(val) end end return conjinfo end end end error("Unrecognized conjugation '" .. conj_arg .. "'") else error("Unrecognized conjugation '" .. conj_arg .. "'") end return conjinfo end function export.v(frame) local title_ = mw.title.getCurrentTitle() local tit = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {alias_de = "conj"}, [2] = {alias_de = "pres"}, [3] = {alias_de = "nucleoperf"}, [4] = {alias_de = "nucleosup"}, [5] = {alias_de = "nucleosigm"}, ["impers"] = {}, -- pas para formas pasivas solamente ["impersonal"] = {alias_de = "impers"}, ["dep"] = {tipo="bool"}, ["depon"] = {alias_de="dep"}, ["deponente"] = {alias_de="dep"}, ["semidep"] = {tipo="bool"}, ["semidepon"] = {alias_de="semidep"}, ["semideponente"] = {alias_de="semidep"}, ["sigm"] = {tipo="bool"}, ["nopasivo"] = {tipo="bool"}, ["soloperf"] = {tipo="bool"}, ["I"] = {tipo="bool"}, ["p3inf"] = {tipo="bool"}, -- sin uso ["poet_sync_perf"] = {tipo="bool"}, -- sin uso ["always_sync_perf"] = {tipo="bool"}, -- solo en [[saevio]] ["conj"] = {requerido=true}, ["pres"] = {requerido=true}, ["nucleopres"] = {lista = true}, ["nucleoperf"] = {lista = true}, ["nucleosup"] = {lista = true}, ["nucleosigm"] = {lista = true}, ["núcleopres"] = {alias_de="nucleopres"}, ["núcleoperf"] = {alias_de="nucleoperf"}, ["núcleosup"] = {alias_de="nucleosup"}, ["paradigma"] = {lista = true}, ["desactivarnucleos"] = {tipo="bool", por_defecto=true}, -- para [[-o]] ["nota"] = {}, } local conjugado = {} for forma,_ in pairs(formas_no_personales) do params[forma] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma] = {} end for forma,_ in pairs(formas_personales) do for i,s in ipairs(tostr) do params[forma..s] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma..s] = {} if i == 1 then params[forma] = {alias_de=forma..s} end end end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) assert(not find(tit, " "), "locuciones no soportadas aún") assert(not (args["dep"] and args["semidep"]), "un verbo no puede ser deponente y semideponente a la vez") local conjinfo = { conj = args.conj, prefijo="", v=args.pres, desactivar = {}, dep=args.dep, semidep=args.semidep, sigm=args.sigm, impers=args.impers, nopasivo=args.nopasivo, soloperf=args.soloperf, I=args.I, p3inf=args.p3inf, poet_sync_perf=args.poet_sync_perf, -- sin uso always_sync_perf=args.always_sync_perf, nucleopres = deep_copy(args.nucleopres), nucleoperf = deep_copy(args.nucleoperf), nucleosup = deep_copy(args.nucleosup), nucleosigm = deep_copy(args.nucleosigm) } conjinfo = detect_v_type_and_subtypes(conjinfo) conjinfo.conj = conjinfo.conj if conjinfo.impers == true then conjinfo.impers = "3" end -- no puede ir conjinfo acá abajo porque si es un sufijo va a quedar "-" en la raíz, lo que anularía todas las formas conjugadas, tiene que venir directo de args if args.desactivarnucleos then if args.nucleopres[1] == "-" then conjinfo.nucleopres = {} end if args.nucleoperf[1] == "-" then conjinfo.nucleoperf = {} end if args.nucleosup[1] == "-" then conjinfo.nucleosup = {} end if args.nucleosigm[1] == "-" then conjinfo.nucleosigm = {} end end local es_irregular = conjinfo.irreg for _,d in ipairs(conjinfo.desactivar) do if formas_no_personales[d] then args[d] = {"no"} else args[d.."2"] = {"no"} end end for forma,_ in pairs(formas) do agregar_forma(conjugado, conjinfo, forma) end local resultante = sobreescribir_formas(conjugado, args) local mostrar_fut_sig = #resultante["ind_fut_sig1"] > 0 local mostrar_aor_sig = #resultante["subj_aor_sig1"] > 0 local defectivo = comprobar_defectivo(resultante, {"^imper", "_sig"}, tostr) local defect2 resultante, defect2 = desactivar_formas(resultante, function (form) return (conjinfo.nopasivo and form:find("_pas")) or (conjinfo.soloperf and not form:find("perf")) or (conjinfo.impers == "pas" and form:find("_pas[^3]")) or (conjinfo.impers == "pas3" and form:find("_pas[^3]")) or (conjinfo.impers == "pas36" and form:find("_pas[^36]")) end ) if defect2 then defectivo = true end -- por ahora innecesario -- local part_no_adj = {} -- for _,e in ipairs(resultante.part) do -- if (find(e, 'PART') or not find(e, 'ADJ')) and not find(e, "†") then -- insert(part_no_adj, gsub1(e, '%b{}', '')) -- end -- end local tit_pres = f(resultante["ind_pres1"][1] or "―") local tit_inf = f(resultante["inf_act"][1] or "―") local tit_perf = f(resultante["ind_perf1"][1] or "―") local tit_sup = f(resultante["sup"][1] or "―") resultante = agregar_enlaces(resultante, tit, normalizar_enlace) local es_impersonal = conjinfo.impers resultante = formatear_formas(resultante, function (x) return obtener_pronombre(x, es_impersonal) end) local impers = conjinfo.impers local cs, cs1, cs2, fila_pronombres_ind, fila_pronombres_subj, fila_pronombres_imper, mostrar_imper if impers == "3" then fila_pronombres_ind = {"", "(id)", color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", "(quod id)", color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", "(id)", color=COLOR_IMPER, header=true, class="pc"} cs = 2 elseif impers == "36" then error("no soportado actualmente") cs = 3 else fila_pronombres_ind = {"", PRONOMBRES[1], PRONOMBRES[2], PRONOMBRES[3], PRONOMBRES[4], PRONOMBRES[5], PRONOMBRES[6], color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", PRONOMBRES_SUBJ[1], PRONOMBRES_SUBJ[2], PRONOMBRES_SUBJ[3], PRONOMBRES_SUBJ[4], PRONOMBRES_SUBJ[5], PRONOMBRES_SUBJ[6], color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", PRONOMBRES_IMP[1], PRONOMBRES_IMP[2], PRONOMBRES_IMP[3], PRONOMBRES_IMP[4], PRONOMBRES_IMP[5], PRONOMBRES_IMP[6], color=COLOR_IMPER, header=true, class="pc"} cs = 7 mostrar_imper = true end cs1 = cs -- math.floor(cs / 2) -- cs2 = cs - cs1 local t = {} insert(t, {{"Formas no personales (verboides)", colspan=cs}, color=COLOR_H, header=true}) if impers == "3" then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else resultante.inf_act.colspan = cs1-1 resultante.inf_pas.colspan = cs1-1 resultante.part_act.colspan = cs1-1 resultante.part_pas.colspan = cs1-1 resultante.ger.colspan = cs1-1 resultante.sup.colspan = cs1-1 if not conjinfo.dep then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) end if not conjinfo.semidep then insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) end if not conjinfo.dep then insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) end if not conjinfo.semidep then insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) end insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) end local function ic(tiempo) if impers == "3" then return resultante[tiempo.."3"] elseif impers == "36" then return resultante[tiempo.."3"], resultante[tiempo.."6"] end return resultante[tiempo.."1"], resultante[tiempo.."2"], resultante[tiempo.."3"], resultante[tiempo.."4"], resultante[tiempo.."5"], resultante[tiempo.."6"] end insert(t, {{"Formas personales", colspan=cs}, color=COLOR_H, header=true}) insert(t, {{"Modo indicativo", colspan=cs}, color=COLOR_IND, header=true}) insert(t, fila_pronombres_ind) if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) end if not conjinfo.dep and not conjinfo.semidep then insert(t, {{"Pretérito perfecto", color=COLOR_IND, header=true}, ic("ind_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_IND, header=true}, ic("ind_pluperf")}) insert(t, {{"Futuro perfecto", color=COLOR_IND, header=true}, ic("ind_fut_perf")}) end if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) end insert(t, {{"Modo subjuntivo", colspan=cs}, color=COLOR_SUBJ, header=true}) insert(t, fila_pronombres_subj) if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) end if not conjinfo.dep and not conjinfo.semidep then insert(t, {{"Pretérito perfecto", color=COLOR_SUBJ, header=true}, ic("subj_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_SUBJ, header=true}, ic("subj_pluperf")}) end if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) end insert(t, {{"Modo imperativo", colspan=cs}, color=COLOR_IMPER, header=true}) insert(t, fila_pronombres_imper) if mostrar_imper then if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) end else insert(t, {{"Como verbo "..(impers == "3" and "impersonal" or "terciopersonal")..", ''"..tit.."'' CARECE de imperativo", color=COLOR_IMPER, header=true, colspan=cs}}) end insert(t, {{f("Leyenda: † arcaico, x no normativo, ~■~ cambio ortográfico, #■# irregularidad"), colspan=cs}}) args["nota"] = args["nota"] or "" if conjinfo.impers == "utc3" then args["nota"] = args["nota"].." NOTA: se usa también como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "umc3" then args["nota"] = args["nota"].." NOTA: se usa más como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "utc36" then args["nota"] = args["nota"].." NOTA: se usa también como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "umc36" then args["nota"] = args["nota"].." NOTA: se usa más como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "pas" or conjinfo.imeprs == "pas3" then args["nota"] = args["nota"].." NOTA: impersonal para las formas pasivas" end if conjinfo.impers == "pas36" then args["nota"] = args["nota"].." NOTA: formas pasivas terciopersonales (solamente tercera persona singular y plural)" end if conjinfo.soloperf then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas del perfecto y pluscuamperfecto con valor de presente, imperfecto o futuro" end if conjinfo.nopasivo then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas activas" end insert(t, {{args["nota"] and args["nota"] or "", colspan=cs}}) local cats = {} local subtits = {} local conj_str if conjinfo.conj == "1" then conj_str = "primera conjugación" elseif conjinfo.conj == "2" then conj_str = "segunda conjugación" elseif conjinfo.conj == "3" then conj_str = "tercera conjugación" elseif conjinfo.conj == "3/4" then conj_str = "tercera/cuarta conjugación" else conj_str = "cuarta conjugación" end insert(cats, "LA:Verbos de la "..conj_str) insert(subtits, conj_str) impers = impers or "" if impers == "3" or find(impers, "^u[tm]c3$") then insert(subtits, "impersonal") insert(cats, "LA:Verbos impersonales") end if defectivo then insert(subtits, "defectivo") insert(cats, "LA:Verbos defectivos") end if conjinfo.dep then insert(subtits, "deponente") insert(cats, "LA:Verbos deponentes") end if conjinfo.semidep then insert(subtits, "semideponente") insert(cats, "LA:Verbos semideponentes") end if es_irregular then insert(subtits, "irregular") insert(cats, "LA:Verbos irregulares") else insert(subtits, "regular") insert(cats, "LA:Verbos regulares") end return renderizar_tabla( frame, "'''Conjugación de ''"..tit_pres..", "..tit_inf..", "..tit_perf..", "..tit_sup.."'''''&emsp;&emsp;("..concat(subtits, ", ")..")", t, ns == 0 and cats or {}) end function export.adv(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { ["n"] = {}, ["nota"] = {alias_de = "n"}, ["comp"] = {lista = true}, ["comparativo"] = {alias_de = "comp"}, ["compnota"] = {lista = true}, ["sup"] = {lista = true}, ["superlativo"] = {alias_de = "sup"}, ["supnota"] = {lista = true}, } local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local head = args[1] local modo = args[2] local enc local cats = {} local cat_pref = "LA:Adverbios" if modo == "-" then enc = "sin comparativo ni superlativo" insert(cats, cat_pref.." incomparables") return renderizar_encabezado( frame, head, enc, args["n"], {}, ns == 0 and cats or {}, normalizar_enlace ) end local flex = {comp={},sup={}} local stem for _, suff in ipairs{"iter", "nter", "ter", "er", "iē", "ē", "rā", "im", "ō"} do stem = match(head, "^(.*)" .. suff .. "$") if stem ~= nil then local comp_suff, sup_suff = "ius", "issimē" if suff == "nter" then stem = stem .. "nt" end if suff == "rā" then comp_suff = "er" .. comp_suff sup_suff = "imē" end insert(flex.comp, stem .. comp_suff) insert(flex.sup, stem .. sup_suff) break end end if not stem and not args.comp[1] and not args.sup[1] then error("Unrecognized adverb type, recognized types are “-ē”, “-er”, “-ter”, “-iter”, “-im”, or “-ō”, “-ra” or specify irregular forms or “-” if incomparable.") end local formas, irr = sobreescribir_formas(flex, args) if args["comp"][1] == "no" then enc = "sin comparativo" insert(cats, cat_pref.." sin comparativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) elseif args["sup"][1] == "no" then enc = "sin superlativo" insert(cats, cat_pref.." sin superlativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end if irr then enc = f("#irregular#") insert(cats, cat_pref.." irregulares") end return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}, {"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end return export 3d2xxhhhag5jbndvuqbzewk5f1tcrt5 6123479 6123478 2026-07-24T22:24:57Z Tmagc 158167 6123479 Scribunto text/plain -- FLEXIÓN DEL LATÍN -- Adaptado desde en.wikt por Tmagc local export = {} local unpack = unpack or table.unpack local insert = table.insert local concat = table.concat local m_table = require("Módulo:tabla") local list_to_set = m_table.listToSet local keys_to_list = m_table.keysToList local insert_if_not = m_table.insertIfNot local deep_copy = m_table.deepCopy local contains = m_table.contains local append = m_table.append local merge = m_table.merge local m_str = require("Módulo:string") local u = m_str.char local match = m_str.match local sub = m_str.sub local gsub = m_str.gsub local gsubb = m_str.gsubb local split = m_str.split local gsplit = m_str.gsplit local find = m_str.find local m_str_avanzado = require("Módulo:string/avanzado") local toNFD = m_str_avanzado.toNFD local toNFC = m_str_avanzado.toNFC local m_flex = require("Módulo:flex") local f = m_flex.f local f_links = m_flex.f_links local parsear_arreglo = m_flex.parsear_arreglo local separar_palabras = m_flex.separar_palabras local combinar_copulativa = m_flex.combinar_copulativa local sobreescribir_formas = m_flex.sobreescribir_formas local desactivar_formas = m_flex.desactivar_formas local agregar_enlaces = m_flex.agregar_enlaces local formatear_formas = m_flex.formatear_formas local comprobar_defectivo = m_flex.comprobar_defectivo local renderizar_tabla = m_flex.renderizar_tabla local renderizar_encabezado = m_flex.renderizar_encabezado local COLOR_H = m_flex.COLOR_H local COLOR_NP = m_flex.COLOR_NP local COLOR_IND = m_flex.COLOR_IND local COLOR_COND = m_flex.COLOR_COND local COLOR_SUBJ = m_flex.COLOR_SUBJ local COLOR_IMPER = m_flex.COLOR_IMPER local MACRON = u(0x304) local BREVE = u(0x306) local DIAER = u(0x308) local DBREVE = u(0x361) local ACCENT = "[" .. MACRON .. BREVE .. DIAER .. DBREVE .. "]" local VOWEL = "[aæeioœuyAÆEIOŒUY]" local cons_to_vowel = { ["j"] = "i", ["J"] = "I", ["v"] = "u", ["V"] = "U", } local function normalizar_enlace(x) x = toNFD(x) x = gsub(x, ACCENT, "") return toNFC(x) end local function join(a, b) a, b = toNFD(a), toNFD(b) -- If the first part ends in "j" or "v", convert it to "i" or "u" unless -- the second part begins with a vowel. if not match(b, "^" .. VOWEL) then a = gsub(a, "[jvJV]$", cons_to_vowel) end return toNFC(a..b) end local function add_form(decl, slot, stem, suf) if type(slot) == "string" then slot = {slot} end for _,slt in ipairs(slot) do if type(decl[slt]) == "nil" or decl[slt] == "" then decl[slt] = {} elseif type(decl[slt]) == "string" then decl[slt] = {decl[slt]} end insert_if_not(decl[slt], join(stem, suf)) end end local function remove_forms(decl, forms) for form,_ in pairs(decl) do for _,rx in ipairs(forms) do if form:find(rx) then forms[form] = {} break end end end end local function merge_forms(forms, forms2, keys) keys = keys or forms2 for key,arr in pairs(keys) do if not forms[key] then forms[key] = {} end if type(forms2[key]) == "string" then insert_if_not(forms[key], forms2[key]) elseif type(forms2[key]) == "table" then for _,a in ipairs(forms2[key]) do insert_if_not(forms[key], a) end end end end local noun_decl = {} noun_decl["0"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = stem forms["dat_sg"] = stem forms["acc_sg"] = stem forms["abl_sg"] = stem forms["voc_sg"] = stem forms["nom_pl"] = stem forms["gen_pl"] = stem forms["dat_pl"] = stem forms["acc_pl"] = stem forms["abl_pl"] = stem forms["voc_pl"] = stem -- with locative if data.loc then forms["loc_sg"] = stem forms["loc_pl"] = stem end end local function alt_gen_pl_in_um(stem, forms, types, subtitles, i_stem) if types.genplum then add_form(forms, "gen_pl", stem, (i_stem and "i" or "") .. "um") elseif types.not_genplum then -- FIXME: not a contraction. -- insert_if_not(subtitles, "uncontracted genitive plural") end end noun_decl["1"] = function(data, args) local forms, types, loc, subtitles = data.forms, data.types, data.loc, data.subtitles local stem = args[1] -- normal 1st local nom_sg = "a" local gen_loc_sg = "ae" local dat_sg = "ae" local acc_sg = "am" local abl_sg = "ā" local voc_sg = "a" local nom_voc_pl = "ae" local gen_pl = "ārum" local dat_abl_loc_pl = "īs" local acc_pl = "ās" insert_if_not(data.title, "primera declinación") insert_if_not(data.categories, "LA:Sustantivos de la primera declinación") -- ām if types.am then nom_sg = "ām" acc_sg = "ām" abl_sg = {"ām", "ā"} voc_sg = "ām" -- all Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") --Greek Ma if types.Ma then nom_sg = "ās" acc_sg = "ān" voc_sg = "ā" -- Greek Me elseif types.Me then nom_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" -- Greek else nom_sg = "ē" gen_loc_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" end end -- ābus if types.abus then dat_abl_loc_pl = "ābus" end add_form(forms, "nom_sg", stem, nom_sg) add_form(forms, "gen_sg", stem, gen_loc_sg) add_form(forms, "dat_sg", stem, dat_sg) add_form(forms, "acc_sg", stem, acc_sg) add_form(forms, "abl_sg", stem, abl_sg) add_form(forms, "voc_sg", stem, voc_sg) add_form(forms, {"nom_pl", "voc_pl"}, stem, nom_voc_pl) add_form(forms, "gen_pl", stem, gen_pl) add_form(forms, {"dat_pl", "abl_pl"}, stem, dat_abl_loc_pl) add_form(forms, "acc_pl", stem, acc_pl) -- with locative if loc then add_form(forms, "loc_sg", stem, gen_loc_sg) add_form(forms, "loc_pl", stem, dat_abl_loc_pl) end end noun_decl["2"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "segunda declinación") insert_if_not(data.categories, "LA:Sustantivos de la segunda declinación") -- normal 2nd forms["nom_sg"] = stem1 .. "us" forms["gen_sg"] = stem1 .. "ī" forms["dat_sg"] = stem1 .. "ō" forms["acc_sg"] = stem1 .. "um" forms["abl_sg"] = stem1 .. "ō" forms["voc_sg"] = stem1 .. "e" forms["nom_pl"] = stem1 .. "ī" forms["gen_pl"] = stem1 .. "ōrum" forms["dat_pl"] = stem1 .. "īs" forms["acc_pl"] = stem1 .. "ōs" forms["abl_pl"] = stem1 .. "īs" forms["voc_pl"] = stem1 .. "ī" -- all neuter if types.N then forms["nom_sg"] = stem1 .. "um" forms["voc_sg"] = stem1 .. "um" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- neuter ium if types.ium then forms["nom_sg"] = stem1 .. "ium" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" forms["voc_sg"] = stem1 .. "ium" forms["nom_pl"] = stem1 .. "ia" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "ia" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "ia" -- neuter us, plural a elseif types.a then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- -vom (aevom, etc.) elseif types.vom then forms["nom_sg"] = stem1 .. "om" forms["acc_sg"] = stem1 .. "om" forms["voc_sg"] = stem1 .. "om" -- neuter Greek in -os (cētos) elseif types.Greek and types.us then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "os" forms["voc_sg"] = stem1 .. "os" forms["nom_pl"] = stem1 .. "ē" forms["gen_pl"] = stem1 .. "ōn" forms["acc_pl"] = stem1 .. "ē" forms["voc_pl"] = stem1 .. "ē" -- neuter Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "on" forms["acc_sg"] = stem1 .. "on" forms["voc_sg"] = stem1 .. "on" -- neuter us elseif types.us then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "ī" forms["acc_pl"] = stem1 .. "ōs" forms["voc_pl"] = stem1 .. "ī" end -- er elseif types.er then forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "ī" forms["dat_sg"] = stem2 .. "ō" forms["acc_sg"] = stem2 .. "um" forms["abl_sg"] = stem2 .. "ō" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ī" forms["gen_pl"] = stem2 .. "ōrum" forms["dat_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "ōs" forms["abl_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "ī" -- ius elseif types.ius then forms["nom_sg"] = stem1 .. "ius" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" if types.voci then -- Only for proper names and fīlius, genius forms["voc_sg"] = stem1 .. "ī" else forms["voc_sg"] = stem1 .. "ie" end forms["nom_pl"] = stem1 .. "iī" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "iōs" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "iī" -- -vos (servos, etc.) elseif types.vos then forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "om" -- Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "on" if data.num == "pl" then forms["nom_pl"] = stem1 .. "oe" forms["voc_pl"] = stem1 .. "oe" else forms["nom_pl"] = {stem1 .. "ī", stem1 .. "oe"} forms["voc_pl"] = {stem1 .. "ī", stem1 .. "oe"} end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- with -um genitive plural alt_gen_pl_in_um(stem2, forms, types, subtitles, types.ius or types.ium) -- with locative if data.loc then if types.ius or types.ium then forms["loc_sg"] = stem2 .. "iī" forms["loc_pl"] = stem2 .. "iīs" else forms["loc_sg"] = stem2 .. "ī" forms["loc_pl"] = stem2 .. "īs" end end end local acc_sg_i_stem_subtypes = { acc_im = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [abl -ī]; -- cannabis, senapis, sinapis [abl -e, -ī] acc_sg = {"im"}, title = {"accusative singular in ''-im''"}, }, acc_im_in = { -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [abl -ī]; -- Baetis, Tigris [acc -e, -ī] acc_sg = {"im", "in"}, title = {"accusative singular in ''-im'' or ''-in''"}, }, acc_im_in_em = { -- e.g. tigris, river Līris acc_sg = {"im", "in", "em"}, title = {"accusative singular in ''-im'', ''-in'' or ''-em''"}, }, acc_im_em = { acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or ''-em''"}, }, acc_im_occ_em = { -- febris, pelvis, puppis, restis, securis, turris [abl -ī, -e] acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or occasionally ''-em''"}, }, acc_em_im = { -- aqualis, clavis, lens, navis [abl -e, -ī]; -- cutis, restis [abl -e] acc_sg = {"em", "im"}, title = {"accusative singular in ''-em'' or ''-im''"}, }, } local abl_sg_i_stem_subtypes = { abl_i = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [acc -im]; -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [acc -im or -in]; -- canalis "water pipe", months in -is or -er, nouns originally i-stem adjectives such as aedilis, affinis, bipennis, familiaris, sodalis, volucris, etc. [acc -em] abl_sg = {"ī"}, title = {"ablative singular in ''-ī''"}, }, abl_i_e = { -- febris, pelvis, puppis, restis, securis, turris [acc -im, -em] abl_sg = {"ī", "e"}, title = {"ablative singular in ''-ī'' or ''-e''"}, }, abl_e_i = { -- cannabis, senapis, sinapis [acc -im]; -- Baetis, Tigris [acc -im, -in]; -- aqualis, clavis, lens, navis [acc -em, -im]; -- finis, mugilis, occiput, pugil, rus, supellex, vectis [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or ''-ī''"}, }, abl_e_occ_i = { -- amnis, anguis, avis, civis, classis, fustis, ignis, imber, orbis, pars, postis, sors, unguis, vesper [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or occasionally ''-ī''"}, }, } local function extract_stem(form, ending) local base = match(form, "^(.*)" .. ending .. "$") if not base then error("Form " .. form .. " should end in -" .. ending) end return base end local function count_vowels(stem) return select(2, toNFD(stem):gsub("[aeiouyAEIOUY]", "")) end noun_decl["3"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] -- local function non_i_stem_type() -- return (count_vowels(stem1) > count_vowels(stem2) and "parisyllabic" or "imparisyllabic") .. " non-i-stem" -- end insert_if_not(data.title, "tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") --normal 3rd forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "is" forms["dat_sg"] = stem2 .. "ī" forms["acc_sg"] = stem2 .. "em" forms["abl_sg"] = stem2 .. "e" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ēs" forms["gen_pl"] = stem2 .. "um" forms["dat_pl"] = stem2 .. "ibus" forms["acc_pl"] = stem2 .. "ēs" forms["abl_pl"] = stem2 .. "ibus" forms["voc_pl"] = stem2 .. "ēs" local acc_sg_i_stem_subtype = false local not_acc_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if acc_sg_i_stem_subtypes[subtype] then acc_sg_i_stem_subtype = true break end end for acc_sg_subtype, _ in pairs(acc_sg_i_stem_subtypes) do if types["not_" .. acc_sg_subtype] then not_acc_sg_i_stem_subtype = true break end end local abl_sg_i_stem_subtype = false local not_abl_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if abl_sg_i_stem_subtypes[subtype] then abl_sg_i_stem_subtype = true break end end for abl_sg_subtype, _ in pairs(abl_sg_i_stem_subtypes) do if types["not_" .. abl_sg_subtype] then not_abl_sg_i_stem_subtype = true break end end -- all Greek if types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") -- Greek er if types.er then stem1 = extract_stem(stem1, "ēr") forms["nom_sg"] = stem1 .. "ēr" forms["gen_sg"] = stem1 .. "eris" forms["dat_sg"] = stem1 .. "erī" forms["acc_sg"] = {stem1 .. "era", stem1 .. "erem"} forms["abl_sg"] = stem1 .. "ere" forms["voc_sg"] = stem1 .. "ēr" forms["nom_pl"] = stem1 .. "erēs" forms["gen_pl"] = stem1 .. "erum" forms["dat_pl"] = stem1 .. "eribus" forms["acc_pl"] = stem1 .. "erēs" forms["abl_pl"] = stem1 .. "eribus" forms["voc_pl"] = stem1 .. "erēs" -- Greek on elseif types.on then stem1 = extract_stem(stem1, "ōn") forms["nom_sg"] = stem1 .. "ōn" forms["gen_sg"] = {stem1 .. "ontis", stem1 .. "ontos"} forms["dat_sg"] = stem1 .. "ontī" forms["acc_sg"] = stem1 .. "onta" forms["abl_sg"] = stem1 .. "onte" forms["voc_sg"] = stem1 .. "ōn" forms["nom_pl"] = stem1 .. "ontēs" forms["gen_pl"] = {stem1 .. "ontum", stem1 .. "ontium"} forms["dat_pl"] = stem1 .. "ontibus" forms["acc_pl"] = {stem1 .. "ontēs", stem1 .. "ontās"} forms["abl_pl"] = stem1 .. "ontibus" forms["voc_pl"] = stem1 .. "ontēs" -- Greek i-stem elseif types.I then forms["gen_sg"] = {stem2 .. "is", stem2 .. "eōs", stem2 .. "ios"} forms["acc_sg"] = {stem2 .. "im", stem2 .. "in", stem2 .. "em{MED}"} forms["abl_sg"] = {stem2 .. "ī", stem2 .. "e{MED}"} forms["voc_sg"] = {stem2 .. "is", stem2 .. "i"} forms["nom_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["gen_pl"] = {stem2 .. "ium", stem2 .. "eōn"} forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["voc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} if types.poetic_esi then forms["dat_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} forms["abl_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} end -- normal Greek else forms["gen_sg"] = stem2 .. "os" if match(toNFD(stem2), "[yY]" .. ACCENT .. "*$") then forms["acc_sg"] = stem2 .. "n" else forms["acc_sg"] = stem2 .. "a" end forms["nom_pl"] = stem2 .. "es" forms["acc_pl"] = stem2 .. "as" forms["voc_pl"] = stem2 .. "es" if match(toNFD(stem1), "[iyIY]" .. ACCENT .. "*s$") then -- Per Hiley, words in -is and -ys have a poetic vocative -- without the -s, but otherwise the vocative is the same -- as the nominative. forms["voc_sg"] = {stem1, (stem1:gsub("s$", "")).."{L}"} end end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- polis if types.polis then stem1 = extract_stem(stem1, "polis") insert_if_not(data.title, "parcialmente griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "polis" forms["gen_sg"] = stem1 .. "polis" forms["dat_sg"] = stem1 .. "polī" forms["acc_sg"] = {stem1 .. "polim", stem1 .. "polin"} forms["abl_sg"] = stem1 .. "polī" forms["voc_sg"] = {stem1 .. "polis", stem1 .. "polī"} end -- all neuter if types.N then forms["acc_sg"] = stem1 -- neuter I stem if types.I then -- pure variety if types.pure then forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "ia" forms["gen_pl"] = stem2 .. "ium" forms["acc_pl"] = stem2 .. "ia" forms["voc_pl"] = stem2 .. "ia" -- non-pure variety (rare) else forms["nom_pl"] = stem2 .. "a" forms["gen_pl"] = {stem2 .. "ium", stem2 .. "um"} forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- normal neuter else forms["nom_pl"] = stem2 .. "a" forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- I stem elseif types.I or acc_sg_i_stem_subtype or abl_sg_i_stem_subtype then forms["gen_pl"] = stem2 .. "ium" -- Per Allen and Greenough, Hiley and others, the acc_pl in -īs -- applied originally to all i-stem nouns, and was current as an -- alternative form up through Caesar. forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "īs"} -- pure variety if types.pure then forms["acc_sg"] = stem2 .. "im" forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "īs" end local num = data.num for subtype, _ in pairs(types) do local acc_sg_i_stem_props = acc_sg_i_stem_subtypes[subtype] if acc_sg_i_stem_props then forms["acc_sg"] = {} for _, ending in ipairs(acc_sg_i_stem_props.acc_sg) do insert_if_not(forms["acc_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(acc_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end -- FIXME: needs to be done for neuter nouns as well. for subtype, _ in pairs(types) do local abl_sg_i_stem_props = abl_sg_i_stem_subtypes[subtype] if abl_sg_i_stem_props then forms["abl_sg"] = {} for _, ending in ipairs(abl_sg_i_stem_props.abl_sg) do insert_if_not(forms["abl_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(abl_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end end -- with locative if data.loc then -- As far as I can tell, in general both dative singular and -- ablative singular could be used for the third-declension locative, -- with different time periods preferring different forms. -- http://dcc.dickinson.edu/grammar/latin/3rd-declension-locative-case -- mentions rūrī along with either Carthāginī or Carthāgine. -- Wikipedia in https://en.wikipedia.org/wiki/Locative_case#Latin -- says this: -- -- In archaic times, the locative singular of third declension nouns -- was still interchangeable between ablative and dative forms, but in -- the Augustan Period the use of the ablative form became fixed. -- Therefore, both forms "rūrī" and "rūre" may be encountered. -- -- Lewis and Short confirm this. local loc_sg = forms["dat_sg"] if type(loc_sg) == "table" then loc_sg = deep_copy(loc_sg) else loc_sg = {loc_sg} end local abl_sg = forms["abl_sg"] if type(abl_sg) == "table" then for _, form in ipairs(abl_sg) do insert_if_not(loc_sg, deep_copy(form)) end else insert_if_not(loc_sg, abl_sg) end forms["loc_sg"] = loc_sg forms["loc_pl"] = deep_copy(forms["abl_pl"]) --The following is what we used to have, but I simply cannot believe it. --if types.Greek and not types.s then -- forms["loc_pl"] = stem2 .. "ēs" --end end end noun_decl["4"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "cuarta declinación") insert_if_not(data.categories, "LA:Sustantivos de la cuarta declinación") -- normal 4th forms["nom_sg"] = stem .. "us" forms["gen_sg"] = stem .. "ūs" forms["dat_sg"] = stem .. "uī" forms["acc_sg"] = stem .. "um" forms["abl_sg"] = stem .. "ū" forms["voc_sg"] = stem .. "us" forms["nom_pl"] = stem .. "ūs" forms["gen_pl"] = stem .. "uum" forms["dat_pl"] = stem .. "ibus" forms["acc_pl"] = stem .. "ūs" forms["abl_pl"] = stem .. "ibus" forms["voc_pl"] = stem .. "ūs" if types.echo then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end add_form(forms, "acc_sg", stem, "ōn") elseif types.Callisto then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end end -- neuter if types.N then forms["nom_sg"] = stem .. "ū̆{?}" forms["gen_sg"] = {stem .. "ūs{C}", stem .. "ū{S}"} forms["dat_sg"] = {stem .. "uī{C}", stem .. "ū{S}"} forms["acc_sg"] = stem .. "ū̆{?}" forms["voc_sg"] = stem .. "ū̆{?}" forms["nom_pl"] = stem .. "ua" forms["acc_pl"] = stem .. "ua" forms["voc_pl"] = stem .. "ua" end -- ubus if types.ubus then forms["dat_pl"] = stem .. "ubus" forms["abl_pl"] = stem .. "ubus" end -- with locative if data.loc then forms["loc_sg"] = forms["abl_sg"] forms["loc_pl"] = forms["abl_pl"] end end noun_decl["5"] = function(data, args) local forms, types = data.forms, data.types local stem = args[1] insert_if_not(data.title, "quinta declinación") insert_if_not(data.categories, "LA:Sustantivos de la quinta declinación") -- ies if types.i then stem = stem .. "i" end forms["nom_sg"] = stem .. "ēs" forms["gen_sg"] = stem .. "eī" forms["dat_sg"] = stem .. "eī" forms["acc_sg"] = stem .. "em" forms["abl_sg"] = stem .. "ē" forms["voc_sg"] = stem .. "ēs" forms["nom_pl"] = stem .. "ēs" forms["gen_pl"] = stem .. "ērum" forms["dat_pl"] = stem .. "ēbus" forms["acc_pl"] = stem .. "ēs" forms["abl_pl"] = stem .. "ēbus" forms["voc_pl"] = stem .. "ēs" -- ies if types.i then forms["gen_sg"] = stem .. "ēī" forms["dat_sg"] = stem .. "ēī" end --with locative if data.loc then forms["loc_sg"] = stem .. "ē" forms["loc_pl"] = stem .. "ēbus" end end noun_decl["sgpl"] = function(data, args) local forms = data.forms local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem1 forms["gen_sg"] = stem1 forms["dat_sg"] = stem1 forms["acc_sg"] = stem1 forms["abl_sg"] = stem1 forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 forms["gen_pl"] = stem2 forms["dat_pl"] = stem2 forms["acc_pl"] = stem2 forms["abl_pl"] = stem2 forms["voc_pl"] = stem2 -- with locative if data.loc then forms["loc_sg"] = stem1 forms["loc_pl"] = stem2 end end noun_decl["indecl"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = stem forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} -- with locative (for multiword terms) if data.loc then forms["loc_sg"] = {} forms["loc_pl"] = {} end data.num = "sg" end noun_decl["irreg"] = function(data, args) local forms, subtitles, notes = data.forms, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "irregular") insert_if_not(data.categories, "LA:Sustantivos irregulares") forms["nom_sg"] = {} forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = {} forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} if stem == "bōs" then data.decl = "3" local stem1, stem2 = "bōs", "bov" noun_decl["3"](data, {stem1, stem2}) add_form(forms, "abl_sg", stem2, "īd{†}") add_form(forms, "gen_pl", "bo", "um") add_form(forms, "gen_pl", stem2, "erum") add_form(forms, "dat_pl", "", "bōbus") add_form(forms, "dat_pl", "", "būbus") add_form(forms, "abl_pl", "", "bōbus") add_form(forms, "abl_pl", "", "būbus") elseif stem:match("^[dD]eus$") then data.decl = "2" local dD = stem:sub(1, 1) forms["nom_sg"] = dD .. "eus" forms["gen_sg"] = dD .. "eī" forms["dat_sg"] = dD .. "eō" forms["acc_sg"] = dD .. "eum" forms["abl_sg"] = dD .. "eō" forms["voc_sg"] = {dD .. "eus", dD .. "ee"} if stem == "deus" then forms["nom_pl"] = {"dī", "diī", "deī"} forms["gen_pl"] = {"deōrum", "deum"} forms["dat_pl"] = {"dīs", "diīs", "deīs"} forms["acc_pl"] = "deōs" forms["abl_pl"] = {"dīs", "diīs", "deīs"} forms["voc_pl"] = {"dī", "diī", "deī"} end elseif stem == "domus" then data.decl = "4,2" insert_if_not(data.title, "cuarta/segunda declinación") forms["nom_sg"] = "domus" forms["gen_sg"] = {"domūs", "domī"} forms["dat_sg"] = {"domuī", "domō", "domū"} forms["acc_sg"] = "domum" forms["abl_sg"] = {"domū", "domō"} forms["voc_sg"] = "domus" forms["loc_sg"] = "domī" forms["nom_pl"] = "domūs" forms["gen_pl"] = {"domuum", "domōrum"} forms["dat_pl"] = "domibus" forms["acc_pl"] = {"domūs", "domōs"} forms["abl_pl"] = "domibus" forms["voc_pl"] = "domūs" forms["loc_pl"] = {} data.loc = true elseif match(stem, "^[IÏJ]ēs[uū]" .. BREVE .. "?s$") then local ij = sub(stem, 1, 1) local uu = match(stem, "[uū]" .. BREVE .. "?") forms["nom_sg"] = stem forms["gen_sg"] = ij .. "ēsū" forms["dat_sg"] = ij .. "ēsū" forms["acc_sg"] = ij .. "ēs" .. uu .. "m" forms["abl_sg"] = ij .. "ēsū" forms["voc_sg"] = ij .. "ēsū" data.num = "sg" elseif stem == "Mōsēs" or stem == "Moesēs" or match(stem, "^M[oō]" .. BREVE .. "?[īȳ]sēs$") then local mos = sub(stem, 1, -3) forms["nom_sg"] = stem forms["gen_sg"] = {mos .. "ī", mos .. "ēī", mos .. "is", mos .. "ēn", mos .. "eōs"} forms["dat_sg"] = mos .. "ī" forms["acc_sg"] = {mos .. "ēn", mos .. "em"} forms["abl_sg"] = {mos .. "e", mos .. "ēn", mos .. "ī"} forms["voc_sg"] = {mos .. "ēs", mos .. "ē"} data.num = "sg" elseif stem:match("^[ij]ūgerum$") then data.decl = "2,3" local ij = stem:sub(1, 1) insert_if_not(data.title, "segunda/tercera declinación híbrido") forms["nom_sg"] = ij .. "ūgerum" forms["gen_sg"] = ij .. "ūgerī" forms["dat_sg"] = ij .. "ūgerō" forms["acc_sg"] = ij .. "ūgerum" forms["abl_sg"] = ij .. "ūgerō" forms["voc_sg"] = ij .. "ūgerum" forms["nom_pl"] = ij .. "ūgera" forms["gen_pl"] = ij .. "ūgerum" forms["dat_pl"] = ij .. "ūgeribus" forms["acc_pl"] = ij .. "ūgera" forms["abl_pl"] = {ij .. "ūgeribus", ij .. "ūgerīs{†}"} forms["voc_pl"] = ij .. "ūgera" elseif stem == "sūs" then data.decl = "3" forms["nom_sg"] = "sūs" forms["gen_sg"] = "suis" forms["dat_sg"] = "suī" forms["acc_sg"] = "suem" forms["abl_sg"] = "sue" forms["voc_sg"] = "sūs" forms["nom_pl"] = "suēs" forms["gen_pl"] = "suum" forms["dat_pl"] = {"suibus", "sūbus", "subus"} forms["acc_pl"] = "suēs" forms["abl_pl"] = {"suibus", "sūbus", "subus"} forms["voc_pl"] = "suēs" elseif stem == "ēthos" then data.decl = "3" insert_if_not(data.title, "tercera declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "ēthos" forms["gen_sg"] = "ētheos" forms["acc_sg"] = "ēthos" forms["voc_sg"] = "ēthos" forms["nom_pl"] = {"ēthea", "ēthē"} forms["dat_pl"] = {"ēthesi", "ēthesin"} forms["acc_pl"] = {"ēthea", "ēthē"} forms["abl_pl"] = {"ēthesi", "ēthesin"} forms["voc_pl"] = {"ēthea", "ēthē"} elseif stem == "Athōs" then data.decl = "2" insert_if_not(data.title, "segunda declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "Athōs" forms["gen_sg"] = "Athō" forms["dat_sg"] = "Athō" forms["acc_sg"] = {"Athō", "Athōn"} forms["abl_sg"] = "Athō" forms["voc_sg"] = "Athōs" data.num = "sg" elseif stem:match("^[uv]ēnum$") then data.decl = "4,2" local uv = stem:sub(1, 1) insert_if_not(data.title, "cuarta/segunda declinación, defectivo") forms["dat_sg"] = {uv .. "ēnuī", uv .. "ēnō"} forms["acc_sg"] = uv .. "ēnum" data.num = "sg" elseif stem:match("^[uv]īs$") then data.decl = "3" local uv = stem:sub(1, 1) insert_if_not(data.title, "defectivo") forms["nom_sg"] = uv .. "īs" forms["gen_sg"] = uv .. "īs" forms["dat_sg"] = uv .. "ī" forms["acc_sg"] = uv .. "im" forms["abl_sg"] = uv .. "ī" forms["voc_sg"] = uv .. "īs" forms["nom_pl"] = uv .. "īrēs" forms["gen_pl"] = uv .. "īrium" forms["dat_pl"] = uv .. "īribus" forms["acc_pl"] = {uv .. "īrēs", uv .. "īrīs"} forms["abl_pl"] = uv .. "īribus" forms["voc_pl"] = uv .. "īrēs" else error("Stem " .. stem .. " not recognized.") end end local adj_decl = {} adj_decl["0+"] = function(data, args) local forms, categories = data.forms, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = stem forms["gen_sg_m"] = stem forms["gen_pl_m"] = stem forms["dat_sg_m"] = stem forms["dat_pl_m"] = stem forms["acc_sg_m"] = stem forms["acc_pl_m"] = stem forms["abl_sg_m"] = stem forms["abl_pl_m"] = stem forms["voc_sg_m"] = stem forms["voc_pl_m"] = stem forms["loc_sg_m"] = stem forms["loc_pl_m"] = stem end adj_decl["1&2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera y segunda declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local original if types.er then local final2 = stem:sub(-2) if final2 == "er" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") elseif final2 == "ur" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") else error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem) end stem, original = args[2], stem end local us = "us" local a_sf = "a" local um = "um" local ae_gsf = "ae" local am = "am" local a_macron = "ā" local i_pl = stem .. "ī" if types.greekA or types.greekE then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") if types.greekA then us = "os" um = "on" am = "ān" else us = "os" a_sf = "ē" um = "on" ae_gsf = "ēs" am = "ēn" a_macron = "ē" end i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = original or (stem .. us) forms["nom_sg_f"] = stem .. a_sf forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_f"] = stem .. ae_gsf forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_f"] = stem .. "ae" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_f"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_f"] = stem .. am forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_f"] = stem .. a_macron forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_f"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = original or (stem .. "e") forms["voc_sg_f"] = stem .. a_sf forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" if types.ius then insert_if_not(data.title, "pronominal") --insert_if_not(subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''") forms["gen_sg_m"] = stem .. "ī̆us" forms["gen_sg_f"] = stem .. "ī̆us" forms["gen_sg_n"] = stem .. "ī̆us" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_f"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" elseif types.not_ius then insert_if_not(data.title, "no pronominal") --insert_if_not(subtitles, "with normal genitive and dative singular") end if stem == "me" then forms["voc_sg_m"] = "mī" end if types.ic then --insert_if_not(subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''") local oc = "oc" local oc_macron = "ōc" if stem == "ill" then oc = "uc" oc_macron = "ūc" end forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = stem .. oc forms["nom_pl_n"] = stem .. "aec" forms["gen_sg_m"] = stem .. "uius" forms["gen_sg_f"] = stem .. "uius" forms["gen_sg_n"] = stem .. "uius" forms["dat_sg_m"] = stem .. "uic" forms["dat_sg_f"] = stem .. "uic" forms["dat_sg_n"] = stem .. "uic" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = stem .. oc forms["acc_pl_n"] = stem .. "aec" forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. oc_macron forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} end if types.distr then if stem:sub(-1) == "n" then forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum{R}"} forms["gen_pl_f"] = {stem .. "um", stem .. "ārum{R}"} forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum{R}"} else error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem) end original = stem stem = args[2] end forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["1-1+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") forms["nom_sg_m"] = stem .. "a" forms["nom_pl_m"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ae" forms["gen_pl_m"] = stem .. "ārum" forms["dat_sg_m"] = stem .. "ae" forms["dat_pl_m"] = stem .. "īs" forms["acc_sg_m"] = stem .. "am" forms["acc_sg_n"] = stem .. "a" forms["acc_pl_m"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ā" forms["abl_pl_m"] = stem .. "īs" forms["voc_sg_m"] = stem .. "a" forms["voc_pl_m"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["2-2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "segunda declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local us = "us" local um = "um" local i_pl = stem .. "ī" if types.greek then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") us = "os" um = "on" i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = stem .. us forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = stem .. "e" forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end local function abl_i_e(...) local function update_slot(forms, slot, f, do_copy) if not forms[slot] then return do_copy elseif do_copy then f = deep_copy(f) end forms[slot] = f return true end function abl_i_e(stem, forms, types) local f, do_copy if types["abl_e_i"] then f = {stem .. "e", stem .. "ī"} elseif types["abl_i_e"] then f = {stem .. "ī", stem .. "e"} else return end do_copy = update_slot(forms, "abl_sg_m", f, do_copy) do_copy = update_slot(forms, "abl_sg_f", f, do_copy) -- Neuter doesn't take -e with i-stems. if not types.I then update_slot(forms, "abl_sg_n", f, do_copy) end end return abl_i_e(...) end adj_decl["3-1+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) if types.par then forms["nom_pl_n"] = stem2 .. "a" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["abl_sg_m"] = stem2 .. "e" forms["abl_sg_n"] = stem2 .. "e" forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"} -- Really? forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"} -- Why does this happen? forms["acc_pl_n"] = stem2 .. "a" forms["voc_pl_n"] = stem2 .. "a" end local es_base = stem1:match("^(.-)ēs$") if es_base and es_base == stem2 then if types.greek then forms["nom_sg_n"] = {stem2 .. "ē̆s{?}"} forms["acc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_m"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["nom_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["acc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["voc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["abl_sg_m"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["abl_sg_n"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["gen_pl_m"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} forms["gen_pl_n"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Adjetivos griegos") elseif types.not_greek then insert_if_not(data.title, "no griego") end end end adj_decl["3-def+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, defectivo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = stem2 .. "ēs" forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" if types.tor then insert_if_not(data.title, "tercera declinación, solo en masculino") insert_if_not(categories, "LA:Adjetivos solo en masculino") remove_forms(forms, {"_f$", "_n$"}) forms["nom_sg_m"] = stem1 forms["gen_sg_m"] = stem2 .. "is" forms["dat_sg_m"] = stem2 .. "ī" forms["acc_sg_m"] = stem2 .. "em" forms["abl_sg_m"] = stem2 .. "e" forms["voc_sg_m"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["gen_pl_m"] = stem2 .. "um" forms["dat_pl_m"] = stem2 .. "ibus" forms["acc_pl_m"] = stem2 .. "ēs" forms["abl_pl_m"] = stem2 .. "ibus" forms["voc_pl_m"] = stem2 .. "ēs" end if types.trix then insert_if_not(data.title, "tercera declinación, solo en femenino o en neutro plural") insert_if_not(categories, "LA:Adjetivos solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en neutro") remove_forms(forms, {"_m$", "sg_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.trixf then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.idis then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = {stem2 .. "is", stem2 .. "os"} forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = {stem2 .. "em", stem2 .. "a"} forms["abl_sg_f"] = stem2 .. "e" forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} forms["gen_pl_f"] = stem2 .. "um" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = {stem2 .. "ēs", stem2 .. "as"} forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} end forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-C+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1 = args[1] local stem2 = stem1 .. "ōr" insert_if_not(data.title, "tercera declinación, comparativo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos comparativos") forms["nom_sg_m"] = stem1 .. "or" forms["nom_sg_n"] = stem1 .. "us" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "a" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 .. "us" forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} forms["acc_pl_n"] = stem2 .. "a" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 .. "or" forms["voc_sg_n"] = stem1 .. "us" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "a" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-P+"] = function(data, args) local forms, notes = data.forms, data.notes local stem2 = args[2] adj_decl["3-1+"](data, args) insert_if_not(data.title, "tercera declinación, participio") insert_if_not(data.categories, "LA:Adjetivos de la tercera declinación") forms["abl_sg_m"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["abl_sg_n"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} end adj_decl["3-2+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem = args[1] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem .. "is" forms["nom_sg_n"] = stem .. "e" forms["nom_pl_m"] = stem .. "ēs" forms["nom_pl_n"] = stem .. "ia" forms["gen_sg_m"] = stem .. "is" forms["gen_sg_n"] = stem .. "is" forms["gen_pl_m"] = stem .. "ium" forms["gen_pl_n"] = stem .. "ium" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" forms["dat_pl_m"] = stem .. "ibus" forms["dat_pl_n"] = stem .. "ibus" forms["acc_sg_m"] = stem .. "em" forms["acc_sg_n"] = stem .. "e" forms["acc_pl_m"] = {stem .. "īs", stem .. "ēs"} forms["acc_pl_n"] = stem .. "ia" forms["abl_sg_m"] = stem .. "ī" forms["abl_sg_n"] = stem .. "ī" forms["abl_pl_m"] = stem .. "ibus" forms["abl_pl_n"] = stem .. "ibus" -- abl_i_e(stem, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem .. "is" forms["voc_sg_n"] = stem .. "e" forms["voc_pl_m"] = stem .. "ēs" forms["voc_pl_n"] = stem .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-3+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con tres terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_f"] = stem2 .. "is" forms["nom_sg_n"] = stem2 .. "e" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_f"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_f"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_f"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_f"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_f"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_f"] = stem2 .. "em" forms["acc_sg_n"] = stem2 .. "e" forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_f"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_f"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_f"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" -- abl_i_e(stem2, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem1 forms["voc_sg_f"] = stem2 .. "is" forms["voc_sg_n"] = stem2 .. "e" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_f"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["indecl+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = {} forms["gen_sg_m"] = {} forms["gen_pl_m"] = {} forms["dat_sg_m"] = {} forms["dat_pl_m"] = {} forms["acc_sg_m"] = stem forms["acc_pl_m"] = {} forms["abl_sg_m"] = {} forms["abl_pl_m"] = {} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["irreg+"] = function(data,args) local forms, types, pos, notes, categories = data.forms, data.types, data.pos, data.notes, data.categories local arg1 = args[1] insert_if_not(data.title, "irregular") insert_if_not(categories, "LA:Adjetivos irregulares") if arg1 == "duo" or arg1 == "ambō" then local stem = sub(arg1, 1, -2) -- data.title = stem == "amb" and "irregular adjective" or "numeral" data.num = "pl" local stem_with_o = stem .. (stem == "amb" and "ō" or "o") forms["nom_pl_m"] = stem_with_o forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem_with_o forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_pl_m"] = stem .. "ōbus" forms["dat_pl_f"] = stem .. "ābus" forms["dat_pl_n"] = stem .. "ōbus" forms["acc_pl_m"] = {stem .. "ōs", stem_with_o} forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem_with_o forms["abl_pl_m"] = stem .. "ōbus" forms["abl_pl_f"] = stem .. "ābus" forms["abl_pl_n"] = stem .. "ōbus" forms["voc_pl_m"] = stem_with_o forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem_with_o if stem == "du" then forms["gen_pl_m"] = {forms["gen_pl_m"], "duum", "duom{†}"} forms["gen_pl_n"] = {forms["gen_pl_n"], "duum", "duom{†}"} end elseif arg1:sub(-6) == "mīlle" then insert_if_not(data.title, "numeral semiindeclinable") local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "le" forms["nom_pl_m"] = {stem .. "ia", stem .. "lia"} forms["gen_sg_m"] = stem .. "le" forms["gen_pl_m"] = {stem .. "ium", stem .. "lium"} forms["dat_sg_m"] = stem .. "le" forms["dat_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["acc_sg_m"] = stem .. "le" forms["acc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["abl_sg_m"] = stem .. "le" forms["abl_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["voc_sg_m"] = stem .. "le" forms["voc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) elseif arg1 == "ille" or arg1 == "iste" or arg1 == "ipse" or arg1 == "olle" then local stem = arg1:sub(1, -2) types.ius = true adj_decl["1&2+"](data, {stem}) insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) forms["nom_sg_m"] = arg1 if arg1 == "ipse" then add_form(forms, "nom_sg_n", stem, "ud{MED}") add_form(forms, "acc_sg_n", stem, "ud{MED}") else forms["nom_sg_n"] = stem .. "ud" forms["acc_sg_n"] = stem .. "ud" end forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} elseif arg1 == "illic" or arg1 == "istic" or arg1 == "isthic" then insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["gen_sg_m"] = stem .. "ī̆usce" forms["gen_sg_f"] = stem .. "ī̆usce" forms["gen_sg_n"] = stem .. "ī̆usce" forms["dat_sg_m"] = stem .. "īc" forms["dat_sg_f"] = stem .. "īc" forms["dat_sg_n"] = stem .. "īc" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. "ōc" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["nom_pl_m"] = stem .. "īsce" forms["nom_pl_f"] = stem .. "aec" forms["nom_pl_n"] = stem .. "aec" forms["gen_pl_m"] = stem .. "ōrunc{?}" forms["gen_pl_f"] = stem .. "ārunc{?}" forms["gen_ok_n"] = stem .. "ōrunc{?}" forms["dat_pl_m"] = stem .. "īsce" forms["dat_pl_f"] = stem .. "īsce" forms["dat_pl_n"] = stem .. "īsce" forms["acc_pl_m"] = stem .. "ōsce" forms["acc_pl_f"] = stem .. "āsce" forms["acc_pl_n"] = stem .. "aec" forms["abl_pl_m"] = stem .. "īsce" forms["abl_pl_f"] = stem .. "īsce" forms["abl_pl_n"] = stem .. "īsce" forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "hice" then insert_if_not(data.title, "demostrativo") -- .. " pronoun" forms["nom_sg_m"] = "hice" forms["nom_sg_f"] = "haece" forms["nom_sg_n"] = "hoce" forms["nom_pl_m"] = "hīce" forms["nom_pl_f"] = "haece" forms["nom_pl_n"] = "haece" forms["gen_sg_m"] = "huiusce" forms["gen_sg_f"] = "huiusce" forms["gen_sg_n"] = "huiusce" forms["gen_pl_m"] = {"hōrunce", "hōrumce"} forms["gen_pl_f"] = {"hārunce", "hārumce"} forms["gen_pl_n"] = {"hōrunce", "hōrumce"} forms["dat_sg_m"] = "huīce" forms["dat_sg_f"] = "huīce" forms["dat_sg_n"] = "huīce" forms["dat_pl_m"] = "hīsce" forms["dat_pl_f"] = "hīsce" forms["dat_pl_n"] = "hīsce" forms["acc_sg_m"] = "hunce" forms["acc_sg_f"] = "hance" forms["acc_sg_n"] = "hoce" forms["acc_pl_m"] = "hōsce" forms["acc_pl_f"] = "hāsce" forms["acc_pl_n"] = "haece" forms["abl_sg_m"] = "hōce" forms["abl_sg_f"] = "hāce" forms["abl_sg_n"] = "hōce" forms["abl_pl_m"] = "hīsce" forms["abl_pl_f"] = "hīsce" forms["abl_pl_n"] = "hīsce" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "plūs" then insert_if_not(data.title, "comparativo") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación con una terminación") data.note = "Ninguna de las formas en singular se usaron en latín clásico" forms["nom_sg_n"] = "plūs" forms["nom_pl_m"] = "plūrēs" forms["nom_pl_n"] = "plūra" forms["gen_sg_m"] = "plūris" forms["gen_sg_n"] = "plūris" forms["gen_pl_m"] = "plūrium" forms["gen_pl_n"] = "plūrium" forms["dat_sg_m"] = "plūrī" forms["dat_sg_n"] = "plūrī" forms["dat_pl_m"] = "plūribus" forms["dat_pl_n"] = "plūribus" forms["acc_sg_m"] = "plūrem" forms["acc_sg_f"] = "plūrem" forms["acc_sg_n"] = "plūs" forms["acc_pl_m"] = {"plūrēs", "plūrīs"} forms["acc_pl_n"] = "plūra" forms["abl_sg_m"] = {"plūrī", "plūre"} forms["abl_sg_f"] = {"plūrī", "plūre"} forms["abl_sg_n"] = {"plūrī", "plūre"} forms["abl_pl_m"] = "plūribus" forms["abl_pl_n"] = "plūribus" forms["voc_sg_n"] = "plūs" forms["voc_pl_m"] = "plūrēs" forms["voc_pl_n"] = "plūra" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif match(arg1, "^egō̆?$") or arg1 == "nōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "nōs" forms["gen_sg_m"] = "meī" forms["gen_pl_m"] = {"nostrī", "nostrum"} forms["dat_sg_m"] = "mihī̆" forms["dat_pl_m"] = "nōbīs" forms["acc_sg_m"] = {"mē", "mēmē"} forms["acc_pl_m"] = "nōs" forms["abl_sg_m"] = {"mē", "mēmē"} forms["abl_pl_m"] = "nōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "nōs" elseif arg1 == "tū" or arg1 == "vōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "vōs" forms["gen_sg_m"] = "tuī" forms["gen_pl_m"] = {"vestrī", "vestrum"} forms["dat_sg_m"] = "tibī̆" forms["dat_pl_m"] = "vōbīs" forms["acc_sg_m"] = {"tē", "tētē"} forms["acc_pl_m"] = "vōs" forms["abl_sg_m"] = {"tē", "tētē"} forms["abl_pl_m"] = "vōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "vōs" elseif arg1 == "suī" then insert_if_not(data.title, "pronombre reflexivo") forms["nom_sg_m"] = {} forms["nom_pl_m"] = {} forms["gen_sg_m"] = arg1 forms["gen_pl_m"] = forms["gen_sg_m"] forms["dat_sg_m"] = "sibī̆" forms["dat_pl_m"] = forms["dat_sg_m"] forms["acc_sg_m"] = {"sē", "sēsē"} forms["acc_pl_m"] = {"sē", "sēsē"} forms["abl_sg_m"] = {"sē", "sēsē"} forms["abl_pl_m"] = {"sē", "sēsē"} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} elseif arg1 == "is" or arg1 == "īdem" then insert_if_not(data.title, "pronombre demostrativo") forms["nom_sg_m"] = "is" forms["nom_sg_f"] = "ea" forms["nom_sg_n"] = "id" forms["nom_pl_m"] = {"iī", "eī", "ī"} forms["nom_pl_f"] = "eae" forms["nom_pl_n"] = "ea" forms["gen_sg_m"] = {"eius", "ejus"} forms["gen_sg_f"] = {"eius", "ejus"} forms["gen_sg_n"] = {"eius", "ejus"} forms["gen_pl_m"] = {"eōrum", "eum"} forms["gen_pl_f"] = "eārum" forms["gen_pl_n"] = {"eōrum", "eum"} forms["dat_sg_m"] = {"eī", "e͡i", "ēī"} forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"} forms["dat_sg_n"] = {"eī", "e͡i", "ēī"} forms["dat_pl_m"] = {"iīs", "eīs", "īs"} forms["dat_pl_f"] = {"iīs", "eīs", "īs", "eābus"} forms["dat_pl_n"] = {"iīs", "eīs", "īs"} forms["acc_sg_m"] = "eum" forms["acc_sg_f"] = "eam" forms["acc_sg_n"] = "id" forms["acc_pl_m"] = "eōs" forms["acc_pl_f"] = "eās" forms["acc_pl_n"] = "ea" forms["abl_sg_m"] = "eō" forms["abl_sg_f"] = "eā" forms["abl_sg_n"] = "eō" forms["abl_pl_m"] = {"iīs", "eīs", "īs"} forms["abl_pl_f"] = {"iīs", "eīs", "īs"} forms["abl_pl_n"] = {"iīs", "eīs", "īs"} if arg1 == "īdem" then forms["nom_sg_m"] = "ī" forms["nom_sg_n"] = "i" forms["acc_sg_n"] = "i" end elseif arg1 == "quis" or arg1 == "quī" then data.note = "La forma ''qua'' es preferida frente a ''quae'' cuando se usa como indefinido" local id = "id" if arg1 == "quī" then insert_if_not(data.title, "determinante relativo/interrogativo") id = "od" forms["nom_sg_m"] = {"quī", "quis", "quei{†}"} forms["nom_sg_f"] = {"quae", "qua"} forms["acc_sg_f"] = "quam" forms["abl_sg_m"] = "quō" forms["abl_sg_f"] = "quā" forms["abl_sg_n"] = "quō" else insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = {"quis", "quī"} forms["nom_sg_f"] = {"quae", "qua", "quis{†}"} forms["acc_sg_f"] = {"quam", "quem{†}"} forms["abl_sg_m"] = {"quō", "quī"} forms["abl_sg_f"] = {"quā", "quī"} forms["abl_sg_n"] = {"quō", "quī"} end forms["nom_sg_n"] = "qu"..id forms["nom_pl_m"] = {"quī", "quei{†}"} forms["nom_pl_f"] = "quae" forms["nom_pl_n"] = {"quae", "qua"} forms["gen_sg_m"] = {"cuius", "quoius{†}"} forms["gen_sg_f"] = {"cuius", "quoius{†}"} forms["gen_sg_n"] = {"cuius", "quoius{†}"} forms["gen_pl_m"] = "quōrum" forms["gen_pl_f"] = "quārum" forms["gen_pl_n"] = "quōrum" forms["dat_sg_m"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_f"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_n"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_n"] = {"quibus", "quīs", "queis{†}"} forms["acc_sg_m"] = "quem" forms["acc_sg_n"] = "qu"..id forms["acc_pl_m"] = "quōs" forms["acc_pl_f"] = "quās" forms["acc_pl_n"] = {"quae", "qua"} forms["abl_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_n"] = {"quibus", "quīs", "queis{†}"} elseif arg1 == "aliquī" then insert_if_not(data.title, "determinante indefinido") forms["nom_sg_m"] = {"aliquī{DET/ADJ}", "aliquis{PRON/SUST}"} forms["nom_sg_f"] = {"aliqua", "aliquae{R}"} forms["nom_sg_n"] = "aliquod" forms["nom_pl_m"] = "aliquī" forms["nom_pl_f"] = "aliquae" forms["nom_pl_n"] = "aliqua" forms["gen_sg_m"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_f"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_n"] = {"alicuius", "aliquoius{†}"} forms["gen_pl_m"] = "aliquōrum" forms["gen_pl_f"] = "aliquārum" forms["gen_pl_n"] = "aliquōrum" forms["dat_sg_m"] = {"alicui", "aliquoi{†}"} forms["dat_sg_f"] = {"alicui", "aliquoi{†}"} forms["dat_sg_n"] = {"alicui", "aliquoi{†}"} forms["dat_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["acc_sg_m"] = "aliquem" forms["acc_sg_f"] = "aliquam" forms["acc_sg_n"] = "aliquod" forms["acc_pl_m"] = "aliquōs" forms["acc_pl_f"] = "aliquās" forms["acc_pl_n"] = "aliqua" forms["abl_sg_m"] = "aliquō" forms["abl_sg_f"] = "aliquā" forms["abl_sg_n"] = "aliquō" forms["abl_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} elseif arg1 == "quisquam" then insert_if_not(data.title, "determinante indefinido, concordancia en negativo") data.note = "En latín clásico, era preferidas las formas de ''ūllus'' en lugar de las esta voz para el femenino y el neutro." forms["nom_sg_m"] = "quisquam" forms["nom_sg_f"] = {"quaequam", "quisquam{†}"} forms["nom_sg_n"] = "quodquam" forms["nom_pl_m"] = "quīquam" forms["nom_pl_f"] = "quaequam" forms["nom_pl_n"] = "quaequam" forms["gen_sg_m"] = "cuiusquam" forms["gen_sg_f"] = "cuiusquam" forms["gen_sg_n"] = "cuiusquam" forms["gen_pl_m"] = "quōrumquam" forms["gen_pl_f"] = "quārumquam" forms["gen_pl_n"] = "quōrumquam" forms["dat_sg_m"] = "cuiquam" forms["dat_sg_f"] = "cuiquam" forms["dat_sg_n"] = "cuiquam" forms["dat_pl_m"] = "quibusquam" forms["dat_pl_f"] = "quibusquam" forms["dat_pl_n"] = "quibusquam" forms["acc_sg_m"] = "quemquam" forms["acc_sg_f"] = {"quamquam", "quemquam{†}"} forms["acc_sg_n"] = "quodquam" forms["acc_pl_m"] = "quōsquam" forms["acc_pl_f"] = "quāsquam" forms["acc_pl_n"] = "quaequam" forms["abl_sg_m"] = {"quōquam", "quīquam{†}"} forms["abl_sg_f"] = "quāquam" forms["abl_sg_n"] = "quōquam" forms["abl_pl_m"] = "quibusquam" forms["abl_pl_f"] = "quibusquam" forms["abl_pl_n"] = "quibusquam" forms["voc_sg_m"] = "quisquam" forms["voc_sg_f"] = "quaequam" forms["voc_sg_n"] = "quodquam" forms["voc_pl_m"] = "quīquam" forms["voc_pl_f"] = "quaequam" forms["voc_pl_n"] = "quaequam" elseif arg1 == "quisquis" then insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = "quisquis" forms["nom_sg_f"] = "quisquis" forms["nom_sg_n"] = {"quidquid", "quicquid"} forms["nom_pl_m"] = "quīquī" forms["nom_pl_f"] = "quaequae" forms["nom_pl_n"] = "quaequae" forms["gen_sg_m"] = "cuiuscuius" forms["gen_sg_f"] = "cuiuscuius" forms["gen_sg_n"] = "cuiuscuius" forms["gen_pl_m"] = "quōrumquōrum" forms["gen_pl_f"] = "quārumquārum" forms["gen_pl_n"] = "quōrumquōrum" forms["dat_sg_m"] = "cuicui" forms["dat_sg_f"] = "cuicui" forms["dat_sg_n"] = "cuicui" forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"} forms["acc_sg_m"] = "quemquem" forms["acc_sg_f"] = "quamquam" forms["acc_sg_n"] = {"quidquid", "quicquid"} forms["acc_pl_m"] = "quōsquōs" forms["acc_pl_f"] = "quāsquās" forms["acc_pl_n"] = "quaequae" forms["abl_sg_m"] = "quōquō" forms["abl_sg_f"] = "quāquā" forms["abl_sg_n"] = "quōquō" forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"} forms["voc_sg_m"] = "quisquis" forms["voc_sg_f"] = "quisquis" forms["voc_sg_n"] = {"quidquid", "quicquid"} forms["voc_pl_m"] = "quīquī" forms["voc_pl_f"] = "quaequae" forms["voc_pl_n"] = "quaequae" elseif arg1 == "ecquis" then insert_if_not(data.title, "pronombre interrogativo") forms["nom_sg_m"] = {"ecquis", "ecquī"} forms["nom_sg_f"] = {"ecqua", "ecquae"} forms["nom_sg_n"] = "ecquid" forms["nom_pl_m"] = "ecquī" forms["nom_pl_f"] = "ecquae" forms["nom_pl_n"] = {"ecqua", "ecquae"} forms["gen_sg_m"] = "eccuius" forms["gen_sg_f"] = "eccuius" forms["gen_sg_n"] = "eccuius" forms["dat_sg_m"] = "eccui" forms["dat_sg_f"] = "eccui" forms["dat_sg_n"] = "eccui" forms["acc_sg_m"] = "ecquem" forms["acc_sg_f"] = "ecquam" forms["acc_sg_n"] = "ecquod" forms["acc_pl_m"] = "ecquōs" forms["acc_pl_f"] = "ecquās" forms["acc_pl_n"] = {"ecqua", "ecquae"} forms["abl_sg_m"] = {"ecquō", "ecquī"} forms["abl_sg_f"] = {"ecquā", "ecquī"} forms["abl_sg_n"] = {"ecquō", "ecquī"} elseif arg1 == "quīdam" then insert_if_not(data.title, "pronombre indefinido") forms["nom_sg_m"] = "quīdam" forms["nom_sg_f"] = "quaedam" forms["nom_sg_n"] = "quiddam" forms["nom_pl_m"] = {"quīdam", "quēsdam{†}"} forms["nom_pl_f"] = "quaedam" forms["nom_pl_n"] = "quaedam" forms["gen_sg_m"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_f"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_n"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_pl_m"] = {"quōrundam", "quōrumdam"} forms["gen_pl_f"] = {"quārundam", "quārumdam"} forms["gen_pl_n"] = {"quōrundam", "quōrumdam"} forms["dat_sg_m"] = {"cuidam", "quoidam{†}"} forms["dat_sg_f"] = {"cuidam", "quoidam{†}"} forms["dat_sg_n"] = {"cuidam", "quoidam{†}"} forms["dat_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_n"] = {"quibusdam", "quīsdam{†}"} forms["acc_sg_m"] = {"quendam", "quemdam"} forms["acc_sg_f"] = {"quandam", "quamdam"} forms["acc_sg_n"] = "quiddam" forms["acc_pl_m"] = {"quōsdam", "quēsdam{†}"} forms["acc_pl_f"] = "quāsdam" forms["acc_pl_n"] = "quaedam" forms["abl_sg_m"] = "quōdam" forms["abl_sg_f"] = "quādam" forms["abl_sg_n"] = "quōdam" forms["abl_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_n"] = {"quibusdam", "quīsdam{†}"} elseif arg1 == "nēmō" then insert_if_not(data.title, "Determinante y pronombre, concordancia en negativo") forms["nom_sg_m"] = "nēmō" forms["nom_sg_f"] = "nēmō" forms["gen_sg_m"] = {"nūllī̆us", "nēminis{R}"} forms["gen_sg_f"] = {"nūllī̆us", "nēminis{R}"} forms["dat_sg_m"] = "nēminī" forms["dat_sg_f"] = "nēminī" forms["acc_sg_m"] = "nēminem" forms["acc_sg_f"] = "nēminem" forms["abl_sg_m"] = {"nūllō", "nēmine{R}"} forms["abl_sg_f"] = {"nūllā", "nēmine{R}"} else error('adjective ' .. arg1 .. ' not recognized') end end local function extract_base(lemma, ending) if ending:find("(", nil, true) then return match(lemma, ending) end return match(lemma, "^(.*)" .. ending .. "$") end local function get_noun_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local subtypes = ending_and_subtypes[2] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. -- In addition, M or F as a subtype is canceled by N, and -- vice-versa, but M doesn't cancel F or vice-versa; instead, -- we simply ignore the conflicting gender specification when -- constructing the combination of specified and inferred subtypes. -- The reason for this is that neuters have distinct declensions -- from masculines and feminines, but masculines and feminines have -- the same declension, and various nouns in Latin that are -- normally masculine are exceptionally feminine and vice-versa -- (nauta, agricola, fraxinus, malus "apple tree", manus, rēs, -- etc.). -- -- In addition, sg as a subtype is canceled by pl and vice-versa. -- It's also possible to specify both, which will override sg but -- not cancel it (in the sense that it won't prevent the relevant -- rule from matching). For example, there's a rule specifying that -- lemmas beginning with a capital letter and ending in -ius take -- the ius.voci.sg subtypes. Specifying such a lemma with the -- subtype both will result in the ius.voci.both subtypes, whereas -- specifying such a lemma with the subtype pl will cause this rule -- not to match, and it will fall through to a less specific rule -- that returns just the ius subtype, which will be combined with -- the explicitly specified pl subtype to produce ius.pl. if specified_subtypes["-" .. subtype] or subtype == "N" and (specified_subtypes.M or specified_subtypes.F) or (subtype == "M" or subtype == "F") and specified_subtypes.N or subtype == "sg" and specified_subtypes.pl or subtype == "pl" and specified_subtypes.sg then not_this_subtype = true break end end end if not not_this_subtype then if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] local base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending == stem2 then return base, stem2, subtypes end else local base = extract_base(lemma, ending) if base then return base, stem2, subtypes end end end end if decltype then error("Unrecognized ending for declension-" .. decltype .. " noun: " .. lemma) end return lemma, stem2, keys_to_list(specified_subtypes) end local patterns = { {"[mM]a", "%0t"}, {"e", ""}, {"([aoAO])([lr])", "%1" .. MACRON .. "%2"}, {"[eE]l", "%0l"}, {"([mM])en", "%1in"}, {"([tT]ūd)ō", "%1in"}, {"([gG])ō", "%1in"}, {"[ōŌ]", "%1n"}, {"er", "r"}, {"[ēi]s", ""}, {"([āēīōūȳĀĒĪŌŪȲ]n)s", function(v) return (gsub(toNFD(v), MACRON, "") .. "t") end}, {"([cC])eps", "%1ipit"}, {"([bp])s", "%1"}, {"us", "or"}, {"s", "t"}, {"ex", "ic"}, {"x", "c"}, } local function make_stem2(stem) local n for _, pattern in ipairs(patterns) do local key = pattern[1] stem, n = gsub(stem, key .. "$", pattern[2]) if n > 0 then -- debug_track("la-utilities/" .. key) REVISAR return toNFC(stem) end end -- debug_track("la-utilities") REVISAR return stem end local function detect_noun_subtype(lemma, stem2, typ, subtypes) local base, _ if typ == "1" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ām", {"F", "am"}}, {"ās", {"M", "Greek", "Ma"}}, {"ēs", {"M", "Greek", "Me"}}, {"ē", {"F", "Greek"}}, {"ae", {"F", "pl"}}, {"a", {"F"}}, }) elseif typ == "2" then local detected_subtypes lemma, stem2, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(.*r)$", {"M", "er"}}, {"^(.*v)os$", {"M", "vos"}}, {"^(.*v)om$", {"N", "vom"}}, -- If the lemma ends in -os and the user said N or -M, then the -- following won't apply, and the second (neuter) -os will applly. {"os", {"M", "Greek"}}, {"os", {"N", "Greek", "us"}}, {"on", {"N", "Greek"}}, -- -ius beginning with a capital letter is assumed a proper name, -- and takes the voci subtype (vocative in -ī) along with the ius -- subtype and sg-only. Other nouns in -ius just take the ius -- subtype. Explicitly specify "sg" so that if .pl is given, -- this rule won't apply. {"^(%u.*)ius$", {"M", "ius", "voci", "sg"}}, {"ius", {"M", "ius"}}, {"ium", {"N", "ium"}}, -- If the lemma ends in -us and the user said N or -M, then the -- following won't apply, and the second (neuter) -us will applly. {"us", {"M"}}, {"us", {"N", "us"}}, {"um", {"N"}}, {"iī", {"M", "ius", "pl"}}, {"ia", {"N", "ium", "pl"}}, -- If the lemma ends in -ī and the user said N or -M, then the -- following won't apply, and the second (neuter) -ī will applly. {"ī", {"M", "pl"}}, {"ī", {"N", "us", "pl"}}, {"oe", {"M", "Greek", "pl"}}, {"a", {"N", "pl"}}, }) stem2 = stem2 or lemma return lemma, stem2, detected_subtypes elseif typ == "3" then if subtypes.pl then if subtypes.Greek then base = lemma:match("^(.*)erēs$") if base then return base .. "ēr", base .. "er", {"er"} end base = lemma:match("^(.*)ontēs$") if base then return base .. "ōn", base .. "ont", {"on"} end base = lemma:match("^(.*)es$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural Greek noun: " .. lemma) end base = lemma:match("^(.*)ia$") if base then return base, stem2 or base, {"N", "I", "pure"} end base = lemma:match("^(.*)a$") if base then return base, stem2 or base, {"N"} end base = lemma:match("^(.*)ēs$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural noun: " .. lemma) end stem2 = stem2 or make_stem2(lemma) local detected_subtypes if subtypes.Greek then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"is", ""}, {"I"}}, {"ēr", {"er"}}, {"ōn", {"on"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} end if not subtypes.N then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"^(%u.*pol)is$", ""}, {"F", "polis", "sg", "loc"}}, {{"tūdō", "tūdin"}, {"F"}}, {{"tās", "tāt"}, {"F"}}, {{"tūs", "tūt"}, {"F"}}, {{"tiō", "tiōn"}, {"F"}}, {{"siō", "siōn"}, {"F"}}, {{"xiō", "xiōn"}, {"F"}}, {{"gō", "gin"}, {"F"}}, {{"or", "ōr"}, {"M"}}, {{"tr[iī]x", "trīc"}, {"F"}}, {{"is", ""}, {"I"}}, {{"^(%l.*)ēs$", ""}, {"I"}}, }) if base then return lemma, stem2, detected_subtypes end end base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"us", "or"}, {"N"}}, {{"us", "er"}, {"N"}}, {{"ma", "mat"}, {"N"}}, {{"men", "min"}, {"N"}}, {{"^(%u.*)e$", ""}, {"N", "sg"}}, {{"e", ""}, {"N", "I", "pure"}}, {{"al", "āl"}, {"N", "I", "pure"}}, {{"ar", "ār"}, {"N", "I", "pure"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} elseif typ == "4" then if subtypes.echo or subtypes.Callisto then base = lemma:match("^(.*)ō$") if not base then error("Declension-4 noun of subtype .echo or .Callisto should end in -ō: " .. lemma) end if subtypes.Callisto then return base, nil, {"F", "sg"} else return base, nil, {"F"} end end return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", {"M"}}, {"ū̆", {"N"}}, {"ūs", {"M", "pl"}}, {"ua", {"N", "pl"}}, }) elseif typ == "5" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"iēs", {"F", "i"}}, {"iēs", {"F", "i", "pl"}}, {"ēs", {"F"}}, {"ēs", {"F", "pl"}}, }) elseif typ == "sgpl" then return lemma, stem2, {} elseif typ == "irreg" and lemma == "domus" then -- [[domus]] auto-sets data.loc = true, but we need to know this -- before declining the noun so we can propagate it to other segments. return lemma, nil, {"loc"} elseif typ == "indecl" or typ == "irreg" and ( lemma == "Deus" or match(lemma, "^[IJ]ēs[uū]s$") or lemma == "Athōs" or lemma == "vēnum" ) then -- Indeclinable nouns, and certain irregular nouns, set data.num = "sg", -- but we need to know this before declining the noun so we can -- propagate it to other segments. return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", {"both"}}, {"", {"sg"}}, {"", {"pl"}}, }) elseif typ == "indecl" or typ == "irreg" then return lemma, nil, {} else return nil, nil, {} end end -- Given ENDINGS_AND_SUBTYPES (a list of four-tuples of ENDING, RETTYPE, -- SUBTYPES, PROCESS_RETVAL), check each ENDING in turn against LEMMA and -- STEM2. If it matches, return a four-tuple BASE, STEM2, RETTYPE, NEW_SUBTYPES -- where BASE is normally the remainder of LEMMA minus the ending, STEM2 is -- as passed in, RETTYPE is as passed in, and NEW_SUBTYPES is the same as -- SUBTYPES minus any subtypes beginning with a hyphen. If no endings match, -- throw an error if DECLTYPPE is non-nil, mentioning the DECLTYPE -- (user-specified declension); but if DECLTYPE is nil, just return the tuple -- nil, nil, nil, nil. -- -- In order for a given entry to match, ENDING must match and also the subtypes -- in SUBTYPES (a list) must not be incompatible with the passed-in -- user-specified subtypes SPECIFIED_SUBTYPES (a set, i.e. a table where the -- keys are strings and the value is always true). "Incompatible" means that -- a given SUBTYPE is specified in either one and -SUBTYPE in the other, or -- that "pl" is found in SPECIFIED_SUBTYPES and not in SUBTYPES. -- -- The ending spec in ENDINGS_AND_SUBTYPES is one of the following: -- -- 1. A simple string, e.g. "tūdō", specifying an ending. -- 2. A regex that should match the entire lemma (it should be anchored at -- the beginning with ^ and at the end with $), and contains a single -- capturing group to match the base. -- 3. A pair {SIMPLE_STRING_OR_REGEX, STEM2_ENDING} where -- SIMPLE_STRING_OR_REGEX is one of the previous two possibilities and -- STEM2_ENDING is a string specifying the corresponding ending that must -- be present in STEM2. If this form is used, the combination of -- base + STEM2_ENDING must exactly match STEM2 in order for this entry -- to be considered a match. An example is {"is", ""}, which will match -- lemma == "follis", stem2 == "foll", but not lemma == "lapis", -- stem2 == "lapid". -- -- If PROCESS_STEM2 is given and the returned STEM2 would be nil, call -- process_stem2(BASE) to get the STEM2 to return. local function get_adj_type_and_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes, process_stem2) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local rettype = ending_and_subtypes[2] local subtypes = ending_and_subtypes[3] local process_retval = ending_and_subtypes[4] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. if specified_subtypes["-" .. subtype] then not_this_subtype = true break end -- A subtype is canceled if the user specified SUBTYPE and -- -SUBTYPE is given in the to-be-returned subtypes. local must_not_be_present = subtype:match("^%-(.*)$") if must_not_be_present and specified_subtypes[must_not_be_present] then not_this_subtype = true break end end end if not not_this_subtype then local base if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending ~= stem2 then base = nil end else base = extract_base(lemma, ending) end if base then -- Remove subtypes of the form -SUBTYPE from the subtypes -- to be returned. local new_subtypes = {} for _, subtype in ipairs(subtypes) do if subtype:sub(1, 1) ~= "-" then insert(new_subtypes, subtype) end end if process_retval then base, stem2 = process_retval(base, stem2) end if process_stem2 then stem2 = stem2 or process_stem2(base) end return base, stem2, rettype, new_subtypes end end end if not decltype then return lemma, stem2, nil, keys_to_list(specified_subtypes) elseif decltype == "" then error("Unrecognized ending for adjective: " .. lemma) else error("Unrecognized ending for declension-" .. decltype .. " adjective: " .. lemma) end end -- Autodetect the type and subtype of an adjective given all the information -- specified by the user: lemma, stem2, declension type and specified subtypes. -- Four values are returned: the lemma base (i.e. the stem of the lemma, as -- required by the declension functions), the value of stem2 to pass to the -- declension function, the declension type and the autodetected subtypes. -- Note that this will not detect a given subtype if -SUBTYPE is specified for -- any subtype that would be returned, or if SUBTYPE is specified and -SUBTYPE -- is among the subtypes that would be returned (such subtypes are filtered out -- of the returned subtypes). local function detect_adj_type_and_subtype(lemma, stem2, typ, subtypes) local function base_as_stem2(base, stem2) return base, base end local function constant_base(baseval) return function(base, stem2) return baseval, nil end end local function decl12_stem2(base) return base end local function decl3_stem2(base) return make_stem2(base) end local decl12_entries = { {"us", "1&2+", {}}, {"a", "1&2+", {}}, {"um", "1&2+", {}}, {"ī", "1&2+", {"pl"}}, {"ae", "1&2+", {"pl"}}, {"a", "1&2+", {"pl"}}, -- Nearly all -os adjectives are greekA {"os", "1&2+", {"greekA", "-greekE"}}, {"os", "1&2+", {"greekE", "-greekA"}}, {"ē", "1&2+", {"greekE", "-greekA"}}, {"on", "1&2+", {"greekA", "-greekE"}}, {"on", "1&2+", {"greekE", "-greekA"}}, {"^(.*er)$", "1&2+", {"er"}}, {"^(.*ur)$", "1&2+", {"er"}}, {"^(h)ic$", "1&2+", {"ic"}}, } local decl3_entries = { {"^(.*er)$", "3-3+", {"I"}}, {"^(.*er)$", "3-3+", {}}, {"is", "3-2+", {"I"}}, {"is", "3-2+", {}}, {"e", "3-2+", {"I"}}, {"e", "3-2+", {}}, {"^(.*[ij])or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(.*[ij])or$", "3-C+", {}}, {"^(min)or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(min)or$", "3-C+", {}}, {"^(.*trīx)$", "3-def+", {"trix", "abl_i_e", "-abl_e_i"}}, {"^(.*trīx)$", "3-def+", {"trix"}}, {"^(.*tor)$", "3-def+", {"tor", "abl_i_e", "-abl_e_i"}}, {"^(.*tor)$", "3-def+", {"tor"}}, -- Detect -ēs as 3-1 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like quadripēs, volucripēs). -- Essentially, for declension-3 adjectives, we require that -- .pl is given if the lemma is plural. -- -- Most 3-1 adjectives are i-stem (e.g. audāx) so we require -I -- to be given with non-i-stem adjectives. The first entry below -- will apply when -I isn't given, the second when it is given. {"^(.*ēs)$", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"I"}}, {"^(.*ēs)$", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"par"}}, {"^(.*[ij])ōrēs$", "3-C+", {"pl"}}, {"^(min)ōrēs$", "3-C+", {"pl"}}, -- If .pl with -ēs, we don't know if the adjective is 3-1, 3-2 -- or 3-3. Since 3-2 is probably the most common, we infer it -- (as well as the fact that these adjectives *are* in a sense -- 3-2 since they have a distinct neuter in -(i)a. Note that -- we have two entries here; the first one will apply unless -- -I is given, and will infer an i-stem adjective; the second -- one will apply otherwise (and infer a non-i-stem 3-1 adjective). {"ēs", "3-2+", {"pl", "I"}, base_as_stem2}, {"ēs", "3-1+", {"pl", "par"}, base_as_stem2}, -- Same for neuters. {"ia", "3-2+", {"pl", "I"}, base_as_stem2}, {"a", "3-1+", {"pl", "par"}, base_as_stem2}, -- As above for -ēs but for miscellaneous singulars. {"", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"I"}}, {"", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"par"}}, } local function get_subtypes_and_endings(typ, f) local subtypes_and_endings = {} for _, v in ipairs(decl3_entries) do if f(v) then v = deep_copy(v) v[2] = typ insert(subtypes_and_endings, v) end end return subtypes_and_endings end local function compare(spec) return spec[2] == typ end if typ == "+" then local base, new_stem2, rettype, new_subtypes = get_adj_type_and_subtype_by_ending(lemma, stem2, nil, subtypes, decl12_entries, decl12_stem2) if rettype then return base, new_stem2, rettype, new_subtypes else return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) end elseif typ == "3+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) elseif typ == "1&2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl12_entries, decl12_stem2) elseif typ == "1-1+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"a", typ, {}}, {"ae", typ, {"pl"}}, }) elseif typ == "2-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", typ, {}}, {"um", typ, {}}, {"ī", typ, {"pl"}}, {"a", typ, {"pl"}}, {"os", typ, {"greek"}}, {"on", typ, {"greek"}}, {"oe", typ, {"greek", "pl"}}, }) elseif typ == "3-1+" then -- Use the specs from `decl3_entries`, but add the two i-stem 3-2+ specs when plural-only, as they're the same when 3-1+. local subtypes_and_endings = get_subtypes_and_endings(typ, function(spec) local spec1, spec2 = spec[1], spec[2] return spec2 == typ or (spec2 == "3-2+" and spec1 == "ēs" or spec1 == "ia") end) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-def+" then -- Like 3-1+ but defective in gender local subtypes_and_endings = get_subtypes_and_endings(typ, compare) insert(subtypes_and_endings, {"", typ, {"I"}}) insert(subtypes_and_endings, {"", typ, {"par"}}) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"is", typ, {}}, {"e", typ, {}}, -- Detect -ēs as 3-2 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like isoscelēs). Essentially, -- for declension-3 adjectives, we require that .pl is given -- if the lemma is plural. {"ēs", typ, {}}, {"ēs", typ, {"pl"}}, {"ia", typ, {"pl"}}, }, decl3_stem2) elseif typ == "3-3+" or typ == "3-P+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ēs", typ, {"pl"}, base_as_stem2}, {"ia", typ, {"pl"}, base_as_stem2}, {"", typ, {}}, }, decl3_stem2) elseif typ == "3-C+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, get_subtypes_and_endings(typ, compare), decl3_stem2) elseif typ == "irreg+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(duo)$", typ, {"pl"}}, {"^(ambō)$", typ, {"pl"}}, {"^(mīll?ia)$", typ, {"N", "pl"}, constant_base("mīlle")}, -- match ea {"^(ea)$", typ, {}, constant_base("is")}, -- match id {"^(id)$", typ, {}, constant_base("is")}, -- match plural eī, iī {"^([ei]ī)$", typ, {"pl"}, constant_base("is")}, -- match plural ea, eae {"^(eae?)$", typ, {"pl"}, constant_base("is")}, -- match eadem {"^(eadem)$", typ, {}, constant_base("īdem")}, -- match īdem, idem {"^([īi]dem)$", typ, {}, constant_base("īdem")}, -- match plural īdem {"^(īdem)$", typ, {"pl"}}, -- match plural eadem, eaedem {"^(eae?dem)$", typ, {"pl"}, constant_base("īdem")}, -- match illa, ipsa, ista; it doesn't matter if we overmatch because -- we'll get an error as we use the stem itself in the returned base {"^(i[lps][lst])a$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match illud, istud; as above, it doesn't matter if we overmatch {"^(i[ls][lt])ud$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match ipsum {"^(ipsum)$", typ, {}, constant_base("ipse")}, -- match plural illī, ipsī, istī; as above, it doesn't matter if we -- overmatch {"^(i[lps][lst])ī$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- match plural illa, illae, ipsa, ipsae, ista, istae; as above, it -- doesn't matter if we overmatch {"^(i[lps][lst])ae?$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- Detect quī as non-plural unless .pl specified. {"^(quī)$", typ, {}}, -- Otherwise detect quī as plural. {"^(quī)$", typ, {"pl"}}, -- Same for quae. {"^(quae)$", typ, {}, constant_base("quī")}, {"^(quae)$", typ, {"pl"}, constant_base("quī")}, {"^(quid)$", typ, {}, constant_base("quis")}, {"^(quod)$", typ, {}, constant_base("quī")}, {"^(qui[cd]quid)$", typ, {}, constant_base("quisquis")}, {"^(quīquī)$", typ, {"pl"}, constant_base("quisquis")}, {"^(quaequae)$", typ, {"pl"}, constant_base("quisquis")}, -- match all remaining lemmas in lemma form {"", typ, {}}, }) elseif typ == "indecl+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", typ, {"both"}}, {"", typ, {"sg"}}, {"", typ, {"pl"}}, }) else -- 0+ return lemma, nil, typ, {} end end local noun_lb = { nom_sg = "sg.", gen_sg = "sg.", dat_sg = "sg.", acc_sg = "sg.", abl_sg = "sg.", voc_sg = "sg.", loc_sg = "sg.", nom_pl = "pl.", gen_pl = "pl.", dat_pl = "pl.", acc_pl = "pl.", abl_pl = "pl.", voc_pl = "pl.", loc_pl = "pl." } function export.sust(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de = "num"}, ["nota"] = {}, } for form,_ in pairs(noun_lb) do params[form] = {lista=true} end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local L = #palabras local M = 1 local declinfo local titles = {} local cats = {} local genero local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, detected_subtypes = detect_noun_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end if not genero then if types.M then genero = "m" end if types.N then genero = "n" end if types.F then genero = "f" end end local es_adj if not r1 and genero then local typ r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) if r1 then c = typ es_adj = true end end assert(r1, "forma no reconocida: "..r[1]) local cb = es_adj and adj_decl[c] or noun_decl[c] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) if es_adj then local forms_ = {} for form,arr in pairs(data.forms) do local f1, f2 = form:match("^(.*)(_"..genero..")$") if f1 then forms_[f1] = arr end end data.forms = forms_ end if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, noun_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if declinfo["loc_sg"] and #declinfo["loc_sg"] == 0 then declinfo["loc_sg"] = nil end if declinfo["loc_pl"] and #declinfo["loc_pl"] == 0 then declinfo["loc_pl"] = nil end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local forms = sobreescribir_formas(declinfo, args, false, {}) comprobar_defectivo(forms, {}) forms = desactivar_formas(forms, function (form) return (form:find("pl$") and nopl) or (form:find("sg$") and nosg) end ) local raiz_nom = f(forms["nom_sg"][1] or forms["nom_pl"][1] or "?") local raiz_gen = f(forms["gen_sg"][1] or forms["gen_pl"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, noun_lb) local t = {} insert(t, {{""}, {"Singular"}, {"Plural"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg"], forms["nom_pl"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg"], forms["gen_pl"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg"], forms["dat_pl"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg"], forms["acc_pl"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg"], forms["abl_pl"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg"], forms["voc_pl"]}) if (forms["loc_sg"] and forms["loc_sg"][1]) or (forms["loc_pl"] and forms["loc_pl"][1]) then insert(t, {{"Locativo", header=true, color=COLOR_H}, forms["loc_sg"], forms["loc_pl"]}) end insert(t, {{args["nota"] or "", colspan=3}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_nom..", "..raiz_gen.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local adj_lb = { nom_sg_m = "m.", nom_sg_n = "n.", nom_sg_f = "f.", nom_pl_m = "m.", nom_pl_n = "n.", nom_pl_f = "f.", gen_sg_m = "m.", gen_sg_n = "n.", gen_sg_f = "f.", gen_pl_m = "m.", gen_pl_n = "n.", gen_pl_f = "f.", dat_sg_m = "m.", dat_sg_n = "n.", dat_sg_f = "f.", dat_pl_m = "m.", dat_pl_n = "n.", dat_pl_f = "f.", acc_sg_m = "m.", acc_sg_n = "n.", acc_sg_f = "f.", acc_pl_m = "m.", acc_pl_n = "n.", acc_pl_f = "f.", abl_sg_m = "m.", abl_sg_n = "n.", abl_sg_f = "f.", abl_pl_m = "m.", abl_pl_n = "n.", abl_pl_f = "f.", voc_sg_m = "m.", voc_sg_n = "n.", voc_sg_f = "f.", voc_pl_m = "m.", voc_pl_n = "n.", voc_pl_f = "f.", } function export.adj(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de="num"}, ["gen"] = {por_defecto="mfn"}, ["nota"] = {}, } for form,_ in pairs(adj_lb) do params[form] = {lista=true} end params["dat_pl"] = {lista=true} params["abl_pl"] = {lista=true} params["loc_pl"] = {lista=true} local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) if args["dat_pl"][1] then args["dat_pl_m"] = deep_copy(args["dat_pl"]) args["dat_pl_n"] = deep_copy(args["dat_pl"]) args["dat_pl_f"] = deep_copy(args["dat_pl"]) end if args["abl_pl"][1] then args["abl_pl_m"] = deep_copy(args["abl_pl"]) args["abl_pl_n"] = deep_copy(args["abl_pl"]) args["abl_pl_f"] = deep_copy(args["abl_pl"]) end if args["loc_pl"][1] then args["loc_pl_m"] = deep_copy(args["loc_pl"]) args["loc_pl_n"] = deep_copy(args["loc_pl"]) args["loc_pl_f"] = deep_copy(args["loc_pl"]) end args["dat_pl"] = nil args["abl_pl"] = nil args["loc_pl"] = nil assert(not find(title, " "), "locuciones no soportadas aún") -- REVISAR local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local L = #palabras local M = 1 local declinfo local titles = {} local cats = {} local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") a = a or subarg b = b or "+" local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end local cb = adj_decl[typ] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) local formas_ = {} -- necesario crear otro arreglo para no modificar las claves durante la iteración for form,arr in pairs(data.forms) do local pref = match(form, "^(.*)_m$") if pref and not data.forms[pref.."_f"] then formas_[pref.."_f"] = deep_copy(arr) end if pref and not data.forms[pref.."_n"] then formas_[pref.."_n"] = deep_copy(arr) end formas_[form] = arr end data.forms = formas_ if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, adj_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local m = find(args["gen"], "m") local fem = find(args["gen"], "f") local n = find(args["gen"], "n") local forms = sobreescribir_formas(declinfo, args, false, {}, adj_lb) comprobar_defectivo(forms) forms = desactivar_formas(forms, function (form) return (form:find("pl") and nopl) or (form:find("sg") and nosg) or (form:find("m$") and not m) or (form:find("f$") and not fem) or (form:find("n$") and not n) end ) local raiz_m = f(forms["nom_sg_m"][1] or forms["nom_pl_m"][1] or "?") local raiz_f = f(forms["nom_sg_f"][1] or forms["nom_pl_f"][1] or "?") local raiz_n = f(forms["nom_sg_n"][1] or forms["nom_pl_n"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, adj_lb) local t = {} insert(t, {{"Singular", colspan=4}, header=true, color=COLOR_H}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg_m"], forms["nom_sg_f"], forms["nom_sg_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg_m"], forms["gen_sg_f"], forms["gen_sg_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg_m"], forms["dat_sg_f"], forms["dat_sg_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg_m"], forms["acc_sg_f"], forms["acc_sg_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg_m"], forms["abl_sg_f"], forms["abl_sg_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg_m"], forms["voc_sg_f"], forms["voc_sg_n"]}) insert(t, {{"Plural", colspan=4, header=true, color=COLOR_H}}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_pl_m"], forms["nom_pl_f"], forms["nom_pl_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_pl_m"], forms["gen_pl_f"], forms["gen_pl_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_pl_m"], forms["dat_pl_f"], forms["dat_pl_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_pl_m"], forms["acc_pl_f"], forms["acc_pl_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_pl_m"], forms["abl_pl_f"], forms["abl_pl_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_pl_m"], forms["voc_pl_f"], forms["voc_pl_n"]}) insert(t, {{args["nota"] or "", colspan=4}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_m..", "..raiz_f..", "..raiz_n.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local EGO, TU, IS, NOS, VOS, EI = 1, 2, 3, 4, 5, 6 local tostr = {"1", "2", "3", "4", "5", "6"} local PRONOMBRES = {"ego", "tū", "is, ea, id", "nōs", "vōs", "eī, eae, ea"} local PRONOMBRES_SUBJ = {"ut ego", "ut tū", "ut is, ut ea, ut id", "ut nōs", "ut vōs", "ut eī, ut eae, ut ea"} local PRONOMBRES_IMP = {"―", "(tū)", "(is, ea, id)", "―", "(vōs)", "(eī, eae, ea)"} local IMPERSONALES = {"", "", "(id)", "", "", ""} local function obtener_pronombre(forma, impers) local conj, p = match(forma, "^(.*)(%d)$") if not p then return nil end p = tonumber(p) if impers then return IMPERSONALES[p] else if find(conj, "^subj") then return PRONOMBRES_SUBJ[p] end if find(conj, "^imper") then return PRONOMBRES_IMP[p] end return PRONOMBRES[p] end end local sufijos = { ["1"] = { inf_act = {"āre","isse"}, inf_pas = {"ārī"}, part_act = {"āns","ūrus"}, part_pas = {"andus","us"}, ger = {"andī","andō","andum"}, sup = {"um","ū"}, ind_pres = {"ō","ās","at","āmus","ātis","ant"}, ind_imp = {"ābam","ābās","ābat","ābāmus","ābātis","ābant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ābō","ābis","ābit","ābimus","ābitis","ābunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","āris","ātur","āmur","āminī","antur", nil,"āre"}, ind_imp_pas = {"ābar","ābāris","ābātur","ābāmur","ābāminī","ābantur", nil,"ābāre"}, ind_fut_pas = {"ābor","āberis","ābitur","ābimur","ābiminī","ābuntur", nil,"ābere"}, subj_pres = {"em","ēs","et","ēmus","ētis","ent"}, subj_imp = {"ārem","ārēs","āret","ārēmus","ārētis","ārent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"er","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_imp_pas = {"ārer","ārēris","ārētur","ārēmur","ārēminī","ārentur", nil,"ārēre"}, imper_pres = {nil,"ā",nil,nil,"āte",nil}, imper_fut = {nil,"ātō","ātō",nil,"ātōte","antō"}, imper_pres_pas = {nil,"āre",nil,nil,"āminī",nil}, imper_fut_pas = {nil,"ātor","ātor",nil,nil,"antor"}, }, ["2"] = { inf_act = {"ēre","isse"}, inf_pas = {"ērī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"eō","ēs","et","ēmus","ētis","ent"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ēbō","ēbis","ēbit","ēbimus","ēbitis","ēbunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"eor","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ēbor","ēberis","ēbitur","ēbimur","ēbiminī","ēbuntur", nil,"ēbere"}, subj_pres = {"eam","eās","eat","eāmus","eātis","eant"}, subj_imp = {"ērem","ērēs","ēret","ērēmus","ērētis","ērent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ear","eāris","eātur","eāmur","eāminī","eantur", nil,"eāre"}, subj_imp_pas = {"ērer","ērēris","ērētur","ērēmur","ērēminī","ērentur", nil,"ērēre"}, imper_pres = {nil,"ē",nil,nil,"ēte",nil}, imper_fut = {nil,"ētō","ētō",nil,"ētōte","entō"}, imper_pres_pas = {nil,"ēre",nil,nil,"ēminī",nil}, imper_fut_pas = {nil,"ētor","ētor",nil,nil,"entor"}, }, ["3"] = { -- 3 (comparar [[capio]] con [[lego]], las raíces con capi- y leg- pero hay que eliminar la doble ii) inf_act = {"ere","isse"}, inf_pas = {"ī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", nil,"ere"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_pres = {"am","ās","at","āmus","ātis","ant"}, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", nil,"āre"}, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", nil,"erēre"}, imper_pres = {nil,"e",nil,nil,"ite",nil}, imper_fut = {nil,"itō","itō",nil,"itōte","untō"}, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil}, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor"}, }, ["3/4"] = { inf_act = {"ere","isse","īre","isse"}, inf_pas = {"ī","īrī"}, part_act = {"ēns","iēns","ūrus"}, part_pas = {"endus","iendus","us"}, ger = {"endī","endō","endum","iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt", "iō","īs",nil,"īmus","ītis","iunt" }, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant", "iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant" }, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent", "iam","iēs","iet","iēmus","iētis","ient" }, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", "ior","ere","ītur","īmur","īminī","iuntur", nil,"īris",nil,nil,nil,nil, nil,"īre" }, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", "iēbar","ēbāre","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāris",nil,nil,nil,nil, nil,"iēbāre" }, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", "iar","ēre","iētur","iēmur","iēminī","ientur", nil,"iēris",nil,nil,nil,nil, nil,"iēre" }, subj_pres = {"am","ās","at","āmus","ātis","ant", "iam","iās","iat","iāmus","iātis","iant", }, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent", "īrem","īrēs","īret","īrēmus","īrētis","īrent" }, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", "iar","āre","iātur","iāmur","iāminī","iantur", nil,"iāris",nil,nil,nil,nil, nil,"iāre" }, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", "īrer","erēre","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēris",nil,nil,nil,nil, nil,"īrēre" }, imper_pres = {nil,"e",nil,nil,"ite",nil, nil,"ī",nil,nil,"īte",nil }, imper_fut = {nil,"itō","itō",nil,"itōte","untō", nil,"ītō","ītō",nil,"ītōte","iuntō" }, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil, nil,"īre",nil,nil,"īminī",nil }, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor", nil,"ītor","ītor",nil,nil,"iuntor" }, }, ["4"] = { inf_act = {"īre","isse"}, inf_pas = {"īrī"}, part_act = {"iēns","ūrus"}, part_pas = {"iendus","us"}, ger = {"iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"iō","īs","it","īmus","ītis","iunt"}, ind_imp = {"iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"iam","iēs","iet","iēmus","iētis","ient"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"ior","īris","ītur","īmur","īminī","iuntur", nil,"īre"}, ind_imp_pas = {"iēbar","iēbāris","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāre"}, ind_fut_pas = {"iar","iēris","iētur","iēmur","iēminī","ientur", nil,"iēre"}, subj_pres = {"iam","iās","iat","iāmus","iātis","iant"}, subj_imp = {"īrem","īrēs","īret","īrēmus","īrētis","īrent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"iar","iāris","iātur","iāmur","iāminī","iantur", nil,"iāre"}, subj_imp_pas = {"īrer","īrēris","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēre"}, imper_pres = {nil,"ī",nil,nil,"īte",nil}, imper_fut = {nil,"ītō","ītō",nil,"ītōte","iuntō"}, imper_pres_pas = {nil,"īre",nil,nil,"īminī",nil}, imper_fut_pas = {nil,"ītor","ītor",nil,nil,"iuntor"}, } } local formas_no_personales = { inf_act = true, inf_pas = true, part_act = true, part_pas = true, ger = true, sup = true, } local formas_personales = { ind_pres = true, ind_imp = true, ind_perf = true, ind_pluperf = true, ind_fut = true, ind_fut_perf = true, ind_fut_sig = true, ind_pres_pas = true, ind_imp_pas = true, ind_fut_pas = true, subj_pres = true, subj_imp = true, subj_perf = true, subj_pluperf = true, subj_aor_sig = true, subj_pres_pas = true, subj_imp_pas = true, imper_pres = true, imper_fut = true, imper_pres_pas = true, imper_fut_pas = true, } local formas = merge(formas_no_personales, formas_personales) local verbos_irregulares = { {"aiō", {"aiō", "aiiō", "aijō", "ajō"}, { desactivar = {"inf_pas","part_pas","ger","sup","ind_pluperf","ind_fut","ind_fut_perf", "ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_perf","subj_pluperf","subj_pres_pas", "subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {"ai"}, nucleoperf = {"a"}, nucleosup = {}, nucleosigm = {}, inf_act = {"aiere"}, ind_pres = {nil,nil,nil,{}}, ind_perf = {{},nil,nil,{},{}}, subj_pres = {nil,nil,nil,{},{}}, subj_imp = {{},{},nil,{},{},{}}, imper_pres = {{},{"ai"},{},{},{},{}}, }}, {"cedo", {"cedo"}, { desactivar = {"inf_act","inf_pas","part_act","part_pas","ger","sup","ind_pluperf","ind_pres","ind_imp","ind_perf", "ind_fut","ind_fut_perf","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres","subj_imp","subj_perf", "subj_pluperf","subj_pres_pas","subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, imper_pres = {nil,{"cedo"},nil,nil,{"cette","cedile"},nil}, }}, {"dīcō", {"dīcō"}, { conj = "3", nucleopres = {"dīc"}, nucleoperf = {"dīx"}, nucleosup = {"dict"}, nucleosigm = {"dīx"}, desactivar = {}, imper_pres = {nil, {"dīc", "dīce"}}, inf_pas = {"dīcī", "dīcier{L}"}, }}, {"dō", {"dō"}, { conj = "1", nucleopres = {"d"}, nucleoperf = {"ded"}, nucleosup = {"dat"}, nucleosigm = {}, desactivar = {}, inf_act = {"dare","dedisse"}, inf_pas = {"darī"}, ind_pres = {nil,nil,nil,{"damus"},{"datis"},nil}, ind_imp = {{"dabam"},{"dabās"},{"dabat"},{"dabāmus"},{"dabātis"},{"dabant"}}, ind_fut = {{"dabō"},{"dabis"},{"dabit"},{"dabimus"},{"dabitis"},{"dabunt"}}, ind_imp_pas = {{"dabar"},{"dabāris","dabāre"},{"dabātur"},{"dabāmur"},{"dabāminī"},{"dabantur"}}, ind_fut_pas = {{"dabor"},{"daberis","dabere"},{"dabitur"},{"dabimur"},{"dabiminī"},{"dabuntur"}}, subj_imp = {{"darem"},{"darēs"},{"daret"},{"darēmus"},{"darētis"},{"darent"}}, subj_imp_pas = {{"darer"},{"darēris","darēre"},{"darētur"},{"darēmur"},{"darēminī"},{"darentur"}}, imper_pres = {nil,nil,nil,nil,{"date"},nil}, imper_fut = {nil,{"datō"},{"datō"},nil,{"datōte"},{"dantō"}}, imper_pres_pas = {nil,{"dare"},nil,nil,{"daminī"},nil}, imper_fut_pas = {nil,{"dator"},{"dator"},nil,nil,{"dator"}}, }}, {"dūcō", {"dūcō"}, { conj = "3", nucleopres = {"dūc"}, nucleoperf = {"dūx"}, nucleosup = {"duct"}, nucleosigm = {}, desactivar = {}, imper_pres = {nil, {"dūc", "dūce"}}, }}, {"edō", {"edō", "ëdō"}, { conj = "3", nucleopres = {"ed"}, nucleoperf = {"ed"}, nucleosup = {""}, nucleosigm = {}, desactivar = {}, inf_act = {"edere","ēsse"}, part_act = {"edēns","ēsūrus","ēssūrus","ēstūrus"}, part_pas = {"edendus","edundus","ēsus","ēssus","ēstus"}, sup = {"ēsum","ēssum","ēstum","ēsū","ēssū","ēstū"}, ind_pres = {nil,{"edis","ēs"},{"edit","ēst"},nil,{"editis","ēstis"},nil}, ind_pres_pas = {nil,{"ederis","edere","ēssis","ēsse"},{"editur","ēstur"}}, subj_pres = {{"edam","edim"},{"edās","edīs"},{"edat","edit","ēst"},{"edāmus","edīmus"},{"edātis","edītis"},{"edant","edint"}}, subj_imp = {{"ederem","ēssem"},{"ederēs","ēssēs"},{"ederet","ēsset"},{"ederēmus","ēssēmus"},{"ederētis","ēssētis"},{"ederent","ēssent"}}, subj_imp_pas = {{"ederer","ēsser"},{"ederēris","ederēre","ēssēris","ēssēre"},{"ederetur","ēssetur"},{"ederēmur","ēssēmur"},{"ederēminī","ēssēminī"},{"ederentur","ēssentur"}}, imper_pres = {nil,{"ede","ēs"},nil,nil,{"edite","ēste"},nil}, imper_fut = {nil,{"editō","ēstō"},{"editō","ēstō"},nil,{"editōte","ēstōte"},{"eduntō"}}, imper_pres_pas = {nil,{"edere","ēsse"},nil,nil,{"ediminī"},nil}, imper_fut_pas = {nil,{"editor","ēstor"},{"editor","ēstor"},nil,nil,{"eduntor"}}, }}, {"eō", {"eō", "ëō"}, { conj = "4", nucleopres = {""}, nucleoperf = {""}, nucleosup = {""}, nucleosigm = {}, desactivar = {"imper_pres_pas"}, inf_act = {"īre","īsse","iisse","īvisse"}, inf_pas = {"īrī","īrier"}, part_act = {"iēns","itūrus"}, part_pas = {"eundum","itum"}, ger = {"eundī","eundō","eundum"}, sup = {"itum","itū"}, ind_pres = {{"eō"},{"īs"},{"it"},{"īmus"},{"ītis"},{"eunt"}}, ind_imp = {{"ībam"},{"ībās"},{"ībat"},{"ībāmus"},{"ībātis"},{"ībant"}}, ind_perf = {{"iī","īvī"},{"īstī","iistī","īvistī"},{"iit","īvit"},{"iimus","īvimus"},{"īstis","iistis","īvistis"},{"iērunt","iēre","īvērunt","īvēre"}}, ind_pluperf = {{"ieram","īveram"},{"ierās","īverās"},{"ierat","īverat"},{"ierāmus","īverāmus"},{"ierātis","īverātis"},{"ierant","īverant"}}, ind_fut = {{"ībō"},{"ībis"},{"ībit"},{"ībimus"},{"ībitis"},{"ībunt"}}, ind_fut_perf = {{"ierō","īverō"},{"ieris","īveris"},{"ierit","īverit"},{"ierimus","īverimus"},{"ieritis","īveritis"},{"ierint","īverint"}}, ind_fut_sig = {nil,nil,nil,nil,nil,nil}, ind_pres_pas = {{},{},{"ītur"},{},{},{}}, ind_imp_pas = {{},{},{"ībātur"},{},{},{}}, ind_fut_pas = {{},{},{"ībitur"},{},{},{}}, subj_pres = {{"eam"},{"eās"},{"eat"},{"eāmus"},{"eātis"},{"eant"}}, subj_imp = {{"īrem"},{"īrēs"},{"īret"},{"īrēmus"},{"īrētis"},{"īrent"}}, subj_perf = {{"ierim","īverim"},{"ierīs","īverīs"},{"ierit","īverit"},{"ierīmus","īverīmus"},{"ierītis","īverītis"},{"ierint","īverint"}}, subj_pluperf = {{"īssem","iissem","īvissem"},{"īssēs","iissēs","īvissēs"},{"īsset","iisset","īvisset"},{"īssēmus","iissēmus","īvissēmus"},{"īssētis","iissētis","īvissētis"},{"īssent","iissent","īvissent"}}, subj_aor_sig = {nil,nil,nil,nil,nil,nil}, subj_pres_pas = {{},{},{"eātur"},{},{},{}}, subj_imp_pas = {{},{},{"īrētur"},{},{},{}}, imper_pres = {nil,nil,nil,nil,nil,nil}, imper_fut = {nil,nil,nil,nil,nil,{"euntō"}}, imper_fut_pas = {nil,{},nil,nil,nil,{}}, }}, {"faciō", {"faciō"}, { conj = "3", I = true, nucleopres = {"fac"}, nucleoperf = {"fax"}, nucleosup = {"fact"}, nucleosigm = {"fax","faxs","facs"}, desactivar = {}, ind_pres_pas = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, ind_imp_pas = {{"fīēbam"},{"fīēbās"},{"fīēbat"},{"fīēbāmus"},{"fīēbātis"},{"fīēbant"}}, ind_fut_pas = {{"fīam"},{"fīēs"},{"fīet"},{"fīēmus"},{"fīētis"},{"fīent"}}, subj_pres_pas = {{"fīam"},{"fīās"},{"fīat"},{"fīāmus"},{"fīātis"},{"fīant"}}, subj_imp_pas = {{"fierem"},{"fierēs"},{"fieret"},{"fierēmus"},{"fierētis"},{"fierent"}}, imper_pres = {nil,{"fac","face"},nil,nil,nil,nil}, imper_pres_pas = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut_pas = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"ferō", {"ferō"}, { conj = "3", nucleopres = {"fer"}, nucleoperf = {"tul", "tetul{†}"}, nucleosup = {"lāt"}, nucleosigm = {}, desactivar = {}, inf_act = {"ferre", "tulisse", "tetulisse{†}"}, inf_pas = {"ferrī"}, ind_pres = {nil,{"fers"},{"fert"},nil,{"fertis"}}, ind_pres_pas = {nil,{"ferris","ferre"}}, subj_imp = {{"ferrem"},{"ferrēs"},{"ferret"},{"ferrēmus"},{"ferrētis"},{"ferrent"}}, subj_imp_pas = {{"ferrer"},{"ferrēris","ferrēre"},{"ferrētur"},{"ferrēmur"},{"ferrēminī"},{"ferrentur"}}, imper_pres = {nil,{"fer"},nil,nil,{"ferte"},nil}, imper_pres_pas = {nil,{"ferre"},nil,nil,nil,nil}, imper_fut = {nil,{"fertō"},{"fertō"},nil,{"fertōte"},{"feruntō"}}, imper_fut_pas = {nil,{"fertor"},{"fertor"},nil,nil,nil}, }}, {"fīō", {"fīō"}, { conj = "3", nucleopres = {"fī"}, nucleoperf = {}, nucleosup = {"fact"}, nucleosigm = {}, semidep = true, desactivar = {}, ind_pres = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, imper_pres = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"feruntō"}}, }}, {"inquam", {"inquam"}, { conj = "3", nucleopres = {"inqui"}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, nopasivo = true, desactivar = {"inf_act","inf_pas","part_pas","ger"}, ind_pres = {{"inquam"}}, }}, {"possum", {"possum"}, { conj = "3", nucleopres = {"pot"}, nucleoperf = {"pot"}, nucleosup = {}, nucleosigm = {}, pres = "possō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"posse","potesse{†}"}, part_act = {"potēns"}, ind_pres = {{"possum"},{"potes"},{"potest"},{"possumus"},{"potestis"},{"possunt"}}, ind_imp = {{"poteram"},{"poterās"},{"poterat"},{"poterāmus"},{"poterātis"},{"poterant"}}, ind_fut = {{"poterō"},{"poteris","potere"},{"poterit"},{"poterimus"},{"poteritis"},{"poterunt"}}, ind_perf = {{"potuī"},{"potuistī"},{"potuit"},{"potuimus"},{"potuistis"},{"potuērunt","potuēre"}}, ind_pluperf = {{"potueram"},{"potuerās"},{"potuerat"},{"potuerāmus"},{"potuerātis"},{"potuerant"}}, ind_fut_perf = {{"potuerō"},{"potueris"},{"potuerit"},{"potuerimus"},{"potueritis"},{"potuerunt"}}, subj_pres = {{"possem"},{"possēs"},{"possēt"},{"possēmus"},{"possētis"},{"possent"}}, subj_imp = {{"possim"},{"possīs"},{"possit"},{"possīmus"},{"possītis"},{"possint"}}, subj_perf = {{"potuerim"},{"potuerīs"},{"potuerit"},{"potuerīmus"},{"potuerītis"},{"potuerint"}}, subj_pluperf = {{"potuissem"},{"potuissēs"},{"potuisset"},{"potuissēmus"},{"potuissētis"},{"potuissent"}}, }}, {"sum", {"sum"}, { conj = "3", nucleopres = {"s"}, nucleoperf = {"fu"}, nucleosup = {}, nucleosigm = {}, pres = "sō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres_pas","imper_fut_pas"}, inf_act = {"esse"}, part_act = {"futūrus"}, ind_pres = {{"sum"},{"es"},{"est"},{"sumus"},{"estis"},{"sunt"}}, ind_imp = {{"eram"},{"erās"},{"erat"},{"erāmus"},{"erātis"},{"erant"}}, ind_fut = {{"erō"},{"eris","ere"},{"erit"},{"erimus"},{"eritis"},{"erunt"}}, subj_pres = {{"sim","siem","fuam{†}"},{"sīs","siēs","fuās{†}"},{"sit","siet","fuat{†}"},{"sīmus","siēmus","fuāmus{†}"},{"sītis","siētis","fuātis{†}"},{"sint","sient","fuant{†}"}}, subj_imp = {{"essem","forem"},{"essēs","forēs"},{"esset","foret"},{"essēmus","forēmus"},{"essētis","forētis"},{"essent","forent"}}, imper_pres = {nil,{"es"},nil,nil,{"este"},nil}, imper_fut = {nil,{"estō"},{"estō"},nil,{"estōte"},nil}, }}, {"mālō", {"mālō"}, { conj = "3", nucleopres = {"māl"}, nucleoperf = {"mālu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"mālle","māluisse"}, ind_pres = {{"mālō"},{"māvīs"},{"māvult"},{"mālumus"},{"māvultis"},{"mālunt"}}, subj_pres = {{"mālim"},{"mālīs"},{"mālit"},{"mālīmus"},{"mālītis"},{"mālint"}}, subj_imp = {{"māllem"},{"māllēs"},{"māllet"},{"māllēmus"},{"māllētis"},{"māllent"}}, }}, {"nōlō", {"nōlō"}, { conj = "3", nucleopres = {"nōl"}, nucleoperf = {"nōlu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"nōlle","nōluisse"}, ind_pres = {{"nōlō"},{"nōn vīs","nevīs{†}"},{"nōn vult","nōn volt","nevolt{†}"},{"nōlumus"},{"nōn vultis","nōn voltis","nōltis{†}"},{"nōlunt"}}, subj_pres = {{"nōlim"},{"nōlīs"},{"nōlit"},{"nōlīmus"},{"nōlītis"},{"nōlint"}}, subj_imp = {{"nōllem"},{"nōllēs"},{"nōllet"},{"nōllēmus"},{"nōllētis"},{"nōllent"}}, }}, {"volō", {"volō"}, { conj = "3", nucleopres = {"vol"}, nucleoperf = {"volu"}, nucleosup = {"volit"}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"velle","voluisse"}, ind_pres = {{"volō"},{"vīs"},{"vult","volt{†}"},{"volumus"},{"vultis","voltis{†}"},{"volunt"}}, subj_pres = {{"velim","volim{†}"},{"velīs","volīs{†}"},{"velit","volit{†}"},{"velīmus","volīmus{†}"},{"velītis","volītis{†}"},{"velint","volint{†}"}}, subj_imp = {{"vellem"},{"vellēs"},{"vellet"},{"vellēmus"},{"vellētis"},{"vellent"}}, }}, } local function combinar_prefijo_nucleosufijo(prefijo, nucleosufijo) return prefijo..nucleosufijo end local function combinar_nucleo_sufijo(nucleo, sufijo, agregar_i) if agregar_i and (not find(sufijo, "^[iī]")) and (sufijo ~= "e") and (not find(sufijo, "^er")) then return nucleo.."~i~"..sufijo end return nucleo..sufijo end local function agregar_forma(conjugado, conjinfo, forma) conjinfo[forma] = conjinfo[forma] or {} local sufijos_ = sufijos[conjinfo.conj][forma] local nucleos local prefijo if forma == "sup" then nucleos = conjinfo.nucleosup prefijo = conjinfo.prefijosup or conjinfo.prefijo elseif find(forma, "sig") then nucleos = conjinfo.nucleosigm prefijo = conjinfo.prefijosigm or conjinfo.prefijo elseif find(forma, "perf") then nucleos = conjinfo.nucleoperf prefijo = conjinfo.prefijoperf or conjinfo.prefijo else nucleos = conjinfo.nucleopres prefijo = conjinfo.prefijo end if formas_no_personales[forma] then if conjinfo[forma][1] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma]) do insert_if_not(conjugado[forma], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else for _, sufijo in ipairs(sufijos_) do local nucleos_ = nucleos if forma == "inf_act" and sufijo == "isse" then nucleos_ = conjinfo.nucleoperf elseif forma == "part_act" and sufijo == "ūrus" then nucleos_ = conjinfo.nucleosup elseif forma == "part_pas" and sufijo == "us" then nucleos_ = conjinfo.nucleosup end local agregar_i = conjinfo.I and nucleos_ == conjinfo.nucleopres for _,nucleo in ipairs(nucleos_) do insert_if_not(conjugado[forma], combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(nucleo, sufijo, agregar_i))) end end end return end for i = EGO, EI do local p = tostr[i] if conjinfo[forma][i] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma][i]) do insert_if_not(conjugado[forma..p], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else local k = i while sufijos_[k] do local agregar_i = conjinfo.I and nucleos == conjinfo.nucleopres for j, n in ipairs(nucleos) do local x = combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(n, sufijos_[k], agregar_i)) if conjinfo.always_sync_perf and (forma == "ind_perf" or forma == "ind_pluperf" or forma == "ind_fut_perf" or forma == "subj_perf" or forma == "subj_pluperf") then x = x:gsub("īvī", "iī") x = x:gsub("īvi", "ī") x = x:gsub("īve", "ī") x = x:gsub("īvē", "ē") end insert_if_not(conjugado[forma..p], x) end k = k + 6 end end end end local function get_subtype_by_ending(pres, conjinfo, specs) for _, spec in ipairs(specs) do local base = extract_base(pres, spec[1]) if base then for _,s in ipairs(spec[2]) do if conjinfo[s] == nil then conjinfo[s] = true end end return base end end error("Unrecognized ending for conjugation " .. conjinfo["conj"]) end local function detect_v_type_and_subtypes(conjinfo) local pres = conjinfo["v"] local conj_arg = conjinfo["conj"] pres = toNFC(pres) local base_conj_arg, auto_perf_supine = conj_arg:match("^([124]/?4?)(%+%+?)$") if base_conj_arg then if auto_perf_supine == "++" and base_conj_arg ~= "4" then error("Conjugation types 1++ and 2++ not allowed") end conj_arg = base_conj_arg end conjinfo.conj = conj_arg if conj_arg == "1" then local base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"at", {"impers"}}, {"ātur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "āv" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "āt" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "āss" end end elseif conj_arg == "2" then local base = get_subtype_by_ending(pres, conjinfo, { {"eō", {}}, {"eor", {"dep"}}, {"et", {"impers"}}, {"ētur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "u" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "it" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3" then local base if conjinfo.I == false then -- si explícitamente se indicó que no es del tipo -io, hay que excluir sufijos base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) else base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) end if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end assert(conjinfo["nucleoperf"][1], "especifique todos los núcleos para verbos de la tercera conjugación") assert(conjinfo["nucleosup"][1], "especifique todos los núcleos para verbos de la tercera conjugación") if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3/4" then local base base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "4" then local base = get_subtype_by_ending(pres, conjinfo, { {"iō", {}}, {"ior", {"dep"}}, {"it", {"impers"}}, {"ītur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "irreg" then for _,p in ipairs(verbos_irregulares) do for _,rx in ipairs(p[2]) do local pref, verb = match(conjinfo.v, "^(.*)("..rx..")$") if verb then conjinfo.v = verb conjinfo.prefijo = pref if conjinfo.nucleoperf[1] and conjinfo.nucleoperf[1] ~= "-" then -- [[ecfero]] conjinfo.prefijoperf = conjinfo.nucleoperf[1] conjinfo.nucleoperf = {} end if conjinfo.nucleosup[1] and conjinfo.nucleosup[1] ~= "-" then conjinfo.prefijosup = conjinfo.nucleosup[1] conjinfo.nucleosup = {} end if conjinfo.nucleosigm[1] and conjinfo.nucleosigm[1] ~= "-" then conjinfo.prefijosigm = conjinfo.nucleosigm[1] conjinfo.nucleosigm = {} end conjinfo.irreg = true conjinfo.conj = p[3].conj for k,val in pairs(p[3]) do if not conjinfo[k] or (type(conjinfo[k]) == "table" and not conjinfo[k][1]) then conjinfo[k] = deep_copy(val) end end return conjinfo end end end error("Unrecognized conjugation '" .. conj_arg .. "'") else error("Unrecognized conjugation '" .. conj_arg .. "'") end return conjinfo end function export.v(frame) local title_ = mw.title.getCurrentTitle() local tit = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {alias_de = "conj"}, [2] = {alias_de = "pres"}, [3] = {alias_de = "nucleoperf"}, [4] = {alias_de = "nucleosup"}, [5] = {alias_de = "nucleosigm"}, ["impers"] = {}, -- pas para formas pasivas solamente ["impersonal"] = {alias_de = "impers"}, ["dep"] = {tipo="bool"}, ["depon"] = {alias_de="dep"}, ["deponente"] = {alias_de="dep"}, ["semidep"] = {tipo="bool"}, ["semidepon"] = {alias_de="semidep"}, ["semideponente"] = {alias_de="semidep"}, ["sigm"] = {tipo="bool"}, ["nopasivo"] = {tipo="bool"}, ["soloperf"] = {tipo="bool"}, ["I"] = {tipo="bool"}, ["p3inf"] = {tipo="bool"}, -- sin uso ["poet_sync_perf"] = {tipo="bool"}, -- sin uso ["always_sync_perf"] = {tipo="bool"}, -- solo en [[saevio]] ["conj"] = {requerido=true}, ["pres"] = {requerido=true}, ["nucleopres"] = {lista = true}, ["nucleoperf"] = {lista = true}, ["nucleosup"] = {lista = true}, ["nucleosigm"] = {lista = true}, ["núcleopres"] = {alias_de="nucleopres"}, ["núcleoperf"] = {alias_de="nucleoperf"}, ["núcleosup"] = {alias_de="nucleosup"}, ["paradigma"] = {lista = true}, ["desactivarnucleos"] = {tipo="bool", por_defecto=true}, -- para [[-o]] ["nota"] = {}, } local conjugado = {} for forma,_ in pairs(formas_no_personales) do params[forma] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma] = {} end for forma,_ in pairs(formas_personales) do for i,s in ipairs(tostr) do params[forma..s] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma..s] = {} if i == 1 then params[forma] = {alias_de=forma..s} end end end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) assert(not find(tit, " "), "locuciones no soportadas aún") assert(not (args["dep"] and args["semidep"]), "un verbo no puede ser deponente y semideponente a la vez") local conjinfo = { conj = args.conj, prefijo="", v=args.pres, desactivar = {}, dep=args.dep, semidep=args.semidep, sigm=args.sigm, impers=args.impers, nopasivo=args.nopasivo, soloperf=args.soloperf, I=args.I, p3inf=args.p3inf, poet_sync_perf=args.poet_sync_perf, -- sin uso always_sync_perf=args.always_sync_perf, nucleopres = deep_copy(args.nucleopres), nucleoperf = deep_copy(args.nucleoperf), nucleosup = deep_copy(args.nucleosup), nucleosigm = deep_copy(args.nucleosigm) } conjinfo = detect_v_type_and_subtypes(conjinfo) conjinfo.conj = conjinfo.conj if conjinfo.impers == true then conjinfo.impers = "3" end -- no puede ir conjinfo acá abajo porque si es un sufijo va a quedar "-" en la raíz, lo que anularía todas las formas conjugadas, tiene que venir directo de args if args.desactivarnucleos then if args.nucleopres[1] == "-" then conjinfo.nucleopres = {} end if args.nucleoperf[1] == "-" then conjinfo.nucleoperf = {} end if args.nucleosup[1] == "-" then conjinfo.nucleosup = {} end if args.nucleosigm[1] == "-" then conjinfo.nucleosigm = {} end end local es_irregular = conjinfo.irreg for _,d in ipairs(conjinfo.desactivar) do if formas_no_personales[d] then args[d] = {"no"} else args[d.."2"] = {"no"} end end for forma,_ in pairs(formas) do agregar_forma(conjugado, conjinfo, forma) end local resultante = sobreescribir_formas(conjugado, args) local mostrar_fut_sig = #resultante["ind_fut_sig1"] > 0 local mostrar_aor_sig = #resultante["subj_aor_sig1"] > 0 local defectivo = comprobar_defectivo(resultante, {"^imper", "_sig"}, tostr) local defect2 resultante, defect2 = desactivar_formas(resultante, function (form) return (conjinfo.nopasivo and form:find("_pas")) or (conjinfo.soloperf and not form:find("perf")) or (conjinfo.impers == "pas" and form:find("_pas[^3]")) or (conjinfo.impers == "pas3" and form:find("_pas[^3]")) or (conjinfo.impers == "pas36" and form:find("_pas[^36]")) end ) if defect2 then defectivo = true end -- por ahora innecesario -- local part_no_adj = {} -- for _,e in ipairs(resultante.part) do -- if (find(e, 'PART') or not find(e, 'ADJ')) and not find(e, "†") then -- insert(part_no_adj, gsub1(e, '%b{}', '')) -- end -- end local tit_pres = f(resultante["ind_pres1"][1] or "―") local tit_inf = f(resultante["inf_act"][1] or "―") local tit_perf = f(resultante["ind_perf1"][1] or "―") local tit_sup = f(resultante["sup"][1] or "―") resultante = agregar_enlaces(resultante, tit, normalizar_enlace) local es_impersonal = conjinfo.impers resultante = formatear_formas(resultante, function (x) return obtener_pronombre(x, es_impersonal) end) local impers = conjinfo.impers local cs, cs1, cs2, fila_pronombres_ind, fila_pronombres_subj, fila_pronombres_imper, mostrar_imper if impers == "3" then fila_pronombres_ind = {"", "(id)", color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", "(quod id)", color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", "(id)", color=COLOR_IMPER, header=true, class="pc"} cs = 2 elseif impers == "36" then error("no soportado actualmente") cs = 3 else fila_pronombres_ind = {"", PRONOMBRES[1], PRONOMBRES[2], PRONOMBRES[3], PRONOMBRES[4], PRONOMBRES[5], PRONOMBRES[6], color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", PRONOMBRES_SUBJ[1], PRONOMBRES_SUBJ[2], PRONOMBRES_SUBJ[3], PRONOMBRES_SUBJ[4], PRONOMBRES_SUBJ[5], PRONOMBRES_SUBJ[6], color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", PRONOMBRES_IMP[1], PRONOMBRES_IMP[2], PRONOMBRES_IMP[3], PRONOMBRES_IMP[4], PRONOMBRES_IMP[5], PRONOMBRES_IMP[6], color=COLOR_IMPER, header=true, class="pc"} cs = 7 mostrar_imper = true end cs1 = cs -- math.floor(cs / 2) -- cs2 = cs - cs1 local t = {} insert(t, {{"Formas no personales (verboides)", colspan=cs}, color=COLOR_H, header=true}) if impers == "3" then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else resultante.inf_act.colspan = cs1-1 resultante.inf_pas.colspan = cs1-1 resultante.part_act.colspan = cs1-1 resultante.part_pas.colspan = cs1-1 resultante.ger.colspan = cs1-1 resultante.sup.colspan = cs1-1 if not conjinfo.dep then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) end if not conjinfo.semidep then insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) end if not conjinfo.dep then insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) end if not conjinfo.semidep then insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) end insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) end local function ic(tiempo) if impers == "3" then return resultante[tiempo.."3"] elseif impers == "36" then return resultante[tiempo.."3"], resultante[tiempo.."6"] end return resultante[tiempo.."1"], resultante[tiempo.."2"], resultante[tiempo.."3"], resultante[tiempo.."4"], resultante[tiempo.."5"], resultante[tiempo.."6"] end insert(t, {{"Formas personales", colspan=cs}, color=COLOR_H, header=true}) insert(t, {{"Modo indicativo", colspan=cs}, color=COLOR_IND, header=true}) insert(t, fila_pronombres_ind) if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) end if not conjinfo.dep and not conjinfo.semidep then insert(t, {{"Pretérito perfecto", color=COLOR_IND, header=true}, ic("ind_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_IND, header=true}, ic("ind_pluperf")}) insert(t, {{"Futuro perfecto", color=COLOR_IND, header=true}, ic("ind_fut_perf")}) end if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) end insert(t, {{"Modo subjuntivo", colspan=cs}, color=COLOR_SUBJ, header=true}) insert(t, fila_pronombres_subj) if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) end if not conjinfo.dep and not conjinfo.semidep then insert(t, {{"Pretérito perfecto", color=COLOR_SUBJ, header=true}, ic("subj_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_SUBJ, header=true}, ic("subj_pluperf")}) end if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) end insert(t, {{"Modo imperativo", colspan=cs}, color=COLOR_IMPER, header=true}) insert(t, fila_pronombres_imper) if mostrar_imper then if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) end else insert(t, {{"Como verbo "..(impers == "3" and "impersonal" or "terciopersonal")..", ''"..tit.."'' CARECE de imperativo", color=COLOR_IMPER, header=true, colspan=cs}}) end insert(t, {{f("Leyenda: † arcaico, x no normativo, ~■~ cambio ortográfico, #■# irregularidad"), colspan=cs}}) args["nota"] = args["nota"] or "" if conjinfo.impers == "utc3" then args["nota"] = args["nota"].." NOTA: se usa también como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "umc3" then args["nota"] = args["nota"].." NOTA: se usa más como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "utc36" then args["nota"] = args["nota"].." NOTA: se usa también como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "umc36" then args["nota"] = args["nota"].." NOTA: se usa más como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "pas" or conjinfo.imeprs == "pas3" then args["nota"] = args["nota"].." NOTA: impersonal para las formas pasivas" end if conjinfo.impers == "pas36" then args["nota"] = args["nota"].." NOTA: formas pasivas terciopersonales (solamente tercera persona singular y plural)" end if conjinfo.soloperf then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas del perfecto y pluscuamperfecto con valor de presente, imperfecto o futuro" end if conjinfo.nopasivo then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas activas" end insert(t, {{args["nota"] and args["nota"] or "", colspan=cs}}) local cats = {} local subtits = {} local conj_str if conjinfo.conj == "1" then conj_str = "primera conjugación" elseif conjinfo.conj == "2" then conj_str = "segunda conjugación" elseif conjinfo.conj == "3" then conj_str = "tercera conjugación" elseif conjinfo.conj == "3/4" then conj_str = "tercera/cuarta conjugación" else conj_str = "cuarta conjugación" end insert(cats, "LA:Verbos de la "..conj_str) insert(subtits, conj_str) impers = impers or "" if impers == "3" or find(impers, "^u[tm]c3$") then insert(subtits, "impersonal") insert(cats, "LA:Verbos impersonales") end if defectivo then insert(subtits, "defectivo") insert(cats, "LA:Verbos defectivos") end if conjinfo.dep then insert(subtits, "deponente") insert(cats, "LA:Verbos deponentes") end if conjinfo.semidep then insert(subtits, "semideponente") insert(cats, "LA:Verbos semideponentes") end if es_irregular then insert(subtits, "irregular") insert(cats, "LA:Verbos irregulares") else insert(subtits, "regular") insert(cats, "LA:Verbos regulares") end return renderizar_tabla( frame, "'''Conjugación de ''"..tit_pres..", "..tit_inf..", "..tit_perf..", "..tit_sup.."'''''&emsp;&emsp;("..concat(subtits, ", ")..")", t, ns == 0 and cats or {}) end function export.adv(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { ["n"] = {}, ["nota"] = {alias_de = "n"}, ["comp"] = {lista = true}, ["comparativo"] = {alias_de = "comp"}, ["compnota"] = {lista = true}, ["sup"] = {lista = true}, ["superlativo"] = {alias_de = "sup"}, ["supnota"] = {lista = true}, } local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local head = args[1] local modo = args[2] local enc local cats = {} local cat_pref = "LA:Adverbios" if modo == "-" then enc = "sin comparativo ni superlativo" insert(cats, cat_pref.." incomparables") return renderizar_encabezado( frame, head, enc, args["n"], {}, ns == 0 and cats or {}, normalizar_enlace ) end local flex = {comp={},sup={}} local stem for _, suff in ipairs{"iter", "nter", "ter", "er", "iē", "ē", "rā", "im", "ō"} do stem = match(head, "^(.*)" .. suff .. "$") if stem ~= nil then local comp_suff, sup_suff = "ius", "issimē" if suff == "nter" then stem = stem .. "nt" end if suff == "rā" then comp_suff = "er" .. comp_suff sup_suff = "imē" end insert(flex.comp, stem .. comp_suff) insert(flex.sup, stem .. sup_suff) break end end if not stem and not args.comp[1] and not args.sup[1] then error("Unrecognized adverb type, recognized types are “-ē”, “-er”, “-ter”, “-iter”, “-im”, or “-ō”, “-ra” or specify irregular forms or “-” if incomparable.") end local formas, irr = sobreescribir_formas(flex, args) if args["comp"][1] == "no" then enc = "sin comparativo" insert(cats, cat_pref.." sin comparativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) elseif args["sup"][1] == "no" then enc = "sin superlativo" insert(cats, cat_pref.." sin superlativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end if irr then enc = f("#irregular#") insert(cats, cat_pref.." irregulares") end return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}, {"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end return export emx1xlu6sus7xlgkat691w961yt3hof 6123480 6123479 2026-07-24T22:29:47Z Tmagc 158167 6123480 Scribunto text/plain -- FLEXIÓN DEL LATÍN -- Adaptado desde en.wikt por Tmagc local export = {} local unpack = unpack or table.unpack local insert = table.insert local concat = table.concat local m_table = require("Módulo:tabla") local keys_to_list = m_table.keysToList local insert_if_not = m_table.insertIfNot local deep_copy = m_table.deepCopy local contains = m_table.contains local merge = m_table.merge local m_str = require("Módulo:string") local u = m_str.char local match = m_str.match local sub = m_str.sub local gsub = m_str.gsub local split = m_str.split local gsplit = m_str.gsplit local find = m_str.find local m_str_avanzado = require("Módulo:string/avanzado") local toNFD = m_str_avanzado.toNFD local toNFC = m_str_avanzado.toNFC local m_flex = require("Módulo:flex") local f = m_flex.f local f_links = m_flex.f_links local parsear_arreglo = m_flex.parsear_arreglo local separar_palabras = m_flex.separar_palabras local combinar_copulativa = m_flex.combinar_copulativa local sobreescribir_formas = m_flex.sobreescribir_formas local desactivar_formas = m_flex.desactivar_formas local agregar_enlaces = m_flex.agregar_enlaces local formatear_formas = m_flex.formatear_formas local comprobar_defectivo = m_flex.comprobar_defectivo local renderizar_tabla = m_flex.renderizar_tabla local renderizar_encabezado = m_flex.renderizar_encabezado local COLOR_H = m_flex.COLOR_H local COLOR_NP = m_flex.COLOR_NP local COLOR_IND = m_flex.COLOR_IND local COLOR_SUBJ = m_flex.COLOR_SUBJ local COLOR_IMPER = m_flex.COLOR_IMPER local MACRON = u(0x304) local BREVE = u(0x306) local DIAER = u(0x308) local DBREVE = u(0x361) local ACCENT = "[" .. MACRON .. BREVE .. DIAER .. DBREVE .. "]" local VOWEL = "[aæeioœuyAÆEIOŒUY]" local cons_to_vowel = { ["j"] = "i", ["J"] = "I", ["v"] = "u", ["V"] = "U", } local function normalizar_enlace(x) x = toNFD(x) x = gsub(x, ACCENT, "") return toNFC(x) end local function join(a, b) a, b = toNFD(a), toNFD(b) -- If the first part ends in "j" or "v", convert it to "i" or "u" unless -- the second part begins with a vowel. if not match(b, "^" .. VOWEL) then a = gsub(a, "[jvJV]$", cons_to_vowel) end return toNFC(a..b) end local function add_form(decl, slot, stem, suf) if type(slot) == "string" then slot = {slot} end for _,slt in ipairs(slot) do if type(decl[slt]) == "nil" or decl[slt] == "" then decl[slt] = {} elseif type(decl[slt]) == "string" then decl[slt] = {decl[slt]} end insert_if_not(decl[slt], join(stem, suf)) end end local function remove_forms(decl, forms) for form,_ in pairs(decl) do for _,rx in ipairs(forms) do if form:find(rx) then forms[form] = {} break end end end end local function merge_forms(forms, forms2, keys) keys = keys or forms2 for key,arr in pairs(keys) do if not forms[key] then forms[key] = {} end if type(forms2[key]) == "string" then insert_if_not(forms[key], forms2[key]) elseif type(forms2[key]) == "table" then for _,a in ipairs(forms2[key]) do insert_if_not(forms[key], a) end end end end local noun_decl = {} noun_decl["0"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = stem forms["dat_sg"] = stem forms["acc_sg"] = stem forms["abl_sg"] = stem forms["voc_sg"] = stem forms["nom_pl"] = stem forms["gen_pl"] = stem forms["dat_pl"] = stem forms["acc_pl"] = stem forms["abl_pl"] = stem forms["voc_pl"] = stem -- with locative if data.loc then forms["loc_sg"] = stem forms["loc_pl"] = stem end end local function alt_gen_pl_in_um(stem, forms, types, subtitles, i_stem) if types.genplum then add_form(forms, "gen_pl", stem, (i_stem and "i" or "") .. "um") elseif types.not_genplum then -- FIXME: not a contraction. -- insert_if_not(subtitles, "uncontracted genitive plural") end end noun_decl["1"] = function(data, args) local forms, types, loc, subtitles = data.forms, data.types, data.loc, data.subtitles local stem = args[1] -- normal 1st local nom_sg = "a" local gen_loc_sg = "ae" local dat_sg = "ae" local acc_sg = "am" local abl_sg = "ā" local voc_sg = "a" local nom_voc_pl = "ae" local gen_pl = "ārum" local dat_abl_loc_pl = "īs" local acc_pl = "ās" insert_if_not(data.title, "primera declinación") insert_if_not(data.categories, "LA:Sustantivos de la primera declinación") -- ām if types.am then nom_sg = "ām" acc_sg = "ām" abl_sg = {"ām", "ā"} voc_sg = "ām" -- all Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") --Greek Ma if types.Ma then nom_sg = "ās" acc_sg = "ān" voc_sg = "ā" -- Greek Me elseif types.Me then nom_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" -- Greek else nom_sg = "ē" gen_loc_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" end end -- ābus if types.abus then dat_abl_loc_pl = "ābus" end add_form(forms, "nom_sg", stem, nom_sg) add_form(forms, "gen_sg", stem, gen_loc_sg) add_form(forms, "dat_sg", stem, dat_sg) add_form(forms, "acc_sg", stem, acc_sg) add_form(forms, "abl_sg", stem, abl_sg) add_form(forms, "voc_sg", stem, voc_sg) add_form(forms, {"nom_pl", "voc_pl"}, stem, nom_voc_pl) add_form(forms, "gen_pl", stem, gen_pl) add_form(forms, {"dat_pl", "abl_pl"}, stem, dat_abl_loc_pl) add_form(forms, "acc_pl", stem, acc_pl) -- with locative if loc then add_form(forms, "loc_sg", stem, gen_loc_sg) add_form(forms, "loc_pl", stem, dat_abl_loc_pl) end end noun_decl["2"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "segunda declinación") insert_if_not(data.categories, "LA:Sustantivos de la segunda declinación") -- normal 2nd forms["nom_sg"] = stem1 .. "us" forms["gen_sg"] = stem1 .. "ī" forms["dat_sg"] = stem1 .. "ō" forms["acc_sg"] = stem1 .. "um" forms["abl_sg"] = stem1 .. "ō" forms["voc_sg"] = stem1 .. "e" forms["nom_pl"] = stem1 .. "ī" forms["gen_pl"] = stem1 .. "ōrum" forms["dat_pl"] = stem1 .. "īs" forms["acc_pl"] = stem1 .. "ōs" forms["abl_pl"] = stem1 .. "īs" forms["voc_pl"] = stem1 .. "ī" -- all neuter if types.N then forms["nom_sg"] = stem1 .. "um" forms["voc_sg"] = stem1 .. "um" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- neuter ium if types.ium then forms["nom_sg"] = stem1 .. "ium" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" forms["voc_sg"] = stem1 .. "ium" forms["nom_pl"] = stem1 .. "ia" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "ia" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "ia" -- neuter us, plural a elseif types.a then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- -vom (aevom, etc.) elseif types.vom then forms["nom_sg"] = stem1 .. "om" forms["acc_sg"] = stem1 .. "om" forms["voc_sg"] = stem1 .. "om" -- neuter Greek in -os (cētos) elseif types.Greek and types.us then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "os" forms["voc_sg"] = stem1 .. "os" forms["nom_pl"] = stem1 .. "ē" forms["gen_pl"] = stem1 .. "ōn" forms["acc_pl"] = stem1 .. "ē" forms["voc_pl"] = stem1 .. "ē" -- neuter Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "on" forms["acc_sg"] = stem1 .. "on" forms["voc_sg"] = stem1 .. "on" -- neuter us elseif types.us then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "ī" forms["acc_pl"] = stem1 .. "ōs" forms["voc_pl"] = stem1 .. "ī" end -- er elseif types.er then forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "ī" forms["dat_sg"] = stem2 .. "ō" forms["acc_sg"] = stem2 .. "um" forms["abl_sg"] = stem2 .. "ō" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ī" forms["gen_pl"] = stem2 .. "ōrum" forms["dat_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "ōs" forms["abl_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "ī" -- ius elseif types.ius then forms["nom_sg"] = stem1 .. "ius" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" if types.voci then -- Only for proper names and fīlius, genius forms["voc_sg"] = stem1 .. "ī" else forms["voc_sg"] = stem1 .. "ie" end forms["nom_pl"] = stem1 .. "iī" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "iōs" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "iī" -- -vos (servos, etc.) elseif types.vos then forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "om" -- Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "on" if data.num == "pl" then forms["nom_pl"] = stem1 .. "oe" forms["voc_pl"] = stem1 .. "oe" else forms["nom_pl"] = {stem1 .. "ī", stem1 .. "oe"} forms["voc_pl"] = {stem1 .. "ī", stem1 .. "oe"} end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- with -um genitive plural alt_gen_pl_in_um(stem2, forms, types, subtitles, types.ius or types.ium) -- with locative if data.loc then if types.ius or types.ium then forms["loc_sg"] = stem2 .. "iī" forms["loc_pl"] = stem2 .. "iīs" else forms["loc_sg"] = stem2 .. "ī" forms["loc_pl"] = stem2 .. "īs" end end end local acc_sg_i_stem_subtypes = { acc_im = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [abl -ī]; -- cannabis, senapis, sinapis [abl -e, -ī] acc_sg = {"im"}, title = {"accusative singular in ''-im''"}, }, acc_im_in = { -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [abl -ī]; -- Baetis, Tigris [acc -e, -ī] acc_sg = {"im", "in"}, title = {"accusative singular in ''-im'' or ''-in''"}, }, acc_im_in_em = { -- e.g. tigris, river Līris acc_sg = {"im", "in", "em"}, title = {"accusative singular in ''-im'', ''-in'' or ''-em''"}, }, acc_im_em = { acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or ''-em''"}, }, acc_im_occ_em = { -- febris, pelvis, puppis, restis, securis, turris [abl -ī, -e] acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or occasionally ''-em''"}, }, acc_em_im = { -- aqualis, clavis, lens, navis [abl -e, -ī]; -- cutis, restis [abl -e] acc_sg = {"em", "im"}, title = {"accusative singular in ''-em'' or ''-im''"}, }, } local abl_sg_i_stem_subtypes = { abl_i = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [acc -im]; -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [acc -im or -in]; -- canalis "water pipe", months in -is or -er, nouns originally i-stem adjectives such as aedilis, affinis, bipennis, familiaris, sodalis, volucris, etc. [acc -em] abl_sg = {"ī"}, title = {"ablative singular in ''-ī''"}, }, abl_i_e = { -- febris, pelvis, puppis, restis, securis, turris [acc -im, -em] abl_sg = {"ī", "e"}, title = {"ablative singular in ''-ī'' or ''-e''"}, }, abl_e_i = { -- cannabis, senapis, sinapis [acc -im]; -- Baetis, Tigris [acc -im, -in]; -- aqualis, clavis, lens, navis [acc -em, -im]; -- finis, mugilis, occiput, pugil, rus, supellex, vectis [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or ''-ī''"}, }, abl_e_occ_i = { -- amnis, anguis, avis, civis, classis, fustis, ignis, imber, orbis, pars, postis, sors, unguis, vesper [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or occasionally ''-ī''"}, }, } local function extract_stem(form, ending) local base = match(form, "^(.*)" .. ending .. "$") if not base then error("Form " .. form .. " should end in -" .. ending) end return base end local function count_vowels(stem) return select(2, toNFD(stem):gsub("[aeiouyAEIOUY]", "")) end noun_decl["3"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] -- local function non_i_stem_type() -- return (count_vowels(stem1) > count_vowels(stem2) and "parisyllabic" or "imparisyllabic") .. " non-i-stem" -- end insert_if_not(data.title, "tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") --normal 3rd forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "is" forms["dat_sg"] = stem2 .. "ī" forms["acc_sg"] = stem2 .. "em" forms["abl_sg"] = stem2 .. "e" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ēs" forms["gen_pl"] = stem2 .. "um" forms["dat_pl"] = stem2 .. "ibus" forms["acc_pl"] = stem2 .. "ēs" forms["abl_pl"] = stem2 .. "ibus" forms["voc_pl"] = stem2 .. "ēs" local acc_sg_i_stem_subtype = false local not_acc_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if acc_sg_i_stem_subtypes[subtype] then acc_sg_i_stem_subtype = true break end end for acc_sg_subtype, _ in pairs(acc_sg_i_stem_subtypes) do if types["not_" .. acc_sg_subtype] then not_acc_sg_i_stem_subtype = true break end end local abl_sg_i_stem_subtype = false local not_abl_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if abl_sg_i_stem_subtypes[subtype] then abl_sg_i_stem_subtype = true break end end for abl_sg_subtype, _ in pairs(abl_sg_i_stem_subtypes) do if types["not_" .. abl_sg_subtype] then not_abl_sg_i_stem_subtype = true break end end -- all Greek if types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") -- Greek er if types.er then stem1 = extract_stem(stem1, "ēr") forms["nom_sg"] = stem1 .. "ēr" forms["gen_sg"] = stem1 .. "eris" forms["dat_sg"] = stem1 .. "erī" forms["acc_sg"] = {stem1 .. "era", stem1 .. "erem"} forms["abl_sg"] = stem1 .. "ere" forms["voc_sg"] = stem1 .. "ēr" forms["nom_pl"] = stem1 .. "erēs" forms["gen_pl"] = stem1 .. "erum" forms["dat_pl"] = stem1 .. "eribus" forms["acc_pl"] = stem1 .. "erēs" forms["abl_pl"] = stem1 .. "eribus" forms["voc_pl"] = stem1 .. "erēs" -- Greek on elseif types.on then stem1 = extract_stem(stem1, "ōn") forms["nom_sg"] = stem1 .. "ōn" forms["gen_sg"] = {stem1 .. "ontis", stem1 .. "ontos"} forms["dat_sg"] = stem1 .. "ontī" forms["acc_sg"] = stem1 .. "onta" forms["abl_sg"] = stem1 .. "onte" forms["voc_sg"] = stem1 .. "ōn" forms["nom_pl"] = stem1 .. "ontēs" forms["gen_pl"] = {stem1 .. "ontum", stem1 .. "ontium"} forms["dat_pl"] = stem1 .. "ontibus" forms["acc_pl"] = {stem1 .. "ontēs", stem1 .. "ontās"} forms["abl_pl"] = stem1 .. "ontibus" forms["voc_pl"] = stem1 .. "ontēs" -- Greek i-stem elseif types.I then forms["gen_sg"] = {stem2 .. "is", stem2 .. "eōs", stem2 .. "ios"} forms["acc_sg"] = {stem2 .. "im", stem2 .. "in", stem2 .. "em{MED}"} forms["abl_sg"] = {stem2 .. "ī", stem2 .. "e{MED}"} forms["voc_sg"] = {stem2 .. "is", stem2 .. "i"} forms["nom_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["gen_pl"] = {stem2 .. "ium", stem2 .. "eōn"} forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["voc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} if types.poetic_esi then forms["dat_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} forms["abl_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} end -- normal Greek else forms["gen_sg"] = stem2 .. "os" if match(toNFD(stem2), "[yY]" .. ACCENT .. "*$") then forms["acc_sg"] = stem2 .. "n" else forms["acc_sg"] = stem2 .. "a" end forms["nom_pl"] = stem2 .. "es" forms["acc_pl"] = stem2 .. "as" forms["voc_pl"] = stem2 .. "es" if match(toNFD(stem1), "[iyIY]" .. ACCENT .. "*s$") then -- Per Hiley, words in -is and -ys have a poetic vocative -- without the -s, but otherwise the vocative is the same -- as the nominative. forms["voc_sg"] = {stem1, (stem1:gsub("s$", "")).."{L}"} end end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- polis if types.polis then stem1 = extract_stem(stem1, "polis") insert_if_not(data.title, "parcialmente griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "polis" forms["gen_sg"] = stem1 .. "polis" forms["dat_sg"] = stem1 .. "polī" forms["acc_sg"] = {stem1 .. "polim", stem1 .. "polin"} forms["abl_sg"] = stem1 .. "polī" forms["voc_sg"] = {stem1 .. "polis", stem1 .. "polī"} end -- all neuter if types.N then forms["acc_sg"] = stem1 -- neuter I stem if types.I then -- pure variety if types.pure then forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "ia" forms["gen_pl"] = stem2 .. "ium" forms["acc_pl"] = stem2 .. "ia" forms["voc_pl"] = stem2 .. "ia" -- non-pure variety (rare) else forms["nom_pl"] = stem2 .. "a" forms["gen_pl"] = {stem2 .. "ium", stem2 .. "um"} forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- normal neuter else forms["nom_pl"] = stem2 .. "a" forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- I stem elseif types.I or acc_sg_i_stem_subtype or abl_sg_i_stem_subtype then forms["gen_pl"] = stem2 .. "ium" -- Per Allen and Greenough, Hiley and others, the acc_pl in -īs -- applied originally to all i-stem nouns, and was current as an -- alternative form up through Caesar. forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "īs"} -- pure variety if types.pure then forms["acc_sg"] = stem2 .. "im" forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "īs" end local num = data.num for subtype, _ in pairs(types) do local acc_sg_i_stem_props = acc_sg_i_stem_subtypes[subtype] if acc_sg_i_stem_props then forms["acc_sg"] = {} for _, ending in ipairs(acc_sg_i_stem_props.acc_sg) do insert_if_not(forms["acc_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(acc_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end -- FIXME: needs to be done for neuter nouns as well. for subtype, _ in pairs(types) do local abl_sg_i_stem_props = abl_sg_i_stem_subtypes[subtype] if abl_sg_i_stem_props then forms["abl_sg"] = {} for _, ending in ipairs(abl_sg_i_stem_props.abl_sg) do insert_if_not(forms["abl_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(abl_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end end -- with locative if data.loc then -- As far as I can tell, in general both dative singular and -- ablative singular could be used for the third-declension locative, -- with different time periods preferring different forms. -- http://dcc.dickinson.edu/grammar/latin/3rd-declension-locative-case -- mentions rūrī along with either Carthāginī or Carthāgine. -- Wikipedia in https://en.wikipedia.org/wiki/Locative_case#Latin -- says this: -- -- In archaic times, the locative singular of third declension nouns -- was still interchangeable between ablative and dative forms, but in -- the Augustan Period the use of the ablative form became fixed. -- Therefore, both forms "rūrī" and "rūre" may be encountered. -- -- Lewis and Short confirm this. local loc_sg = forms["dat_sg"] if type(loc_sg) == "table" then loc_sg = deep_copy(loc_sg) else loc_sg = {loc_sg} end local abl_sg = forms["abl_sg"] if type(abl_sg) == "table" then for _, form in ipairs(abl_sg) do insert_if_not(loc_sg, deep_copy(form)) end else insert_if_not(loc_sg, abl_sg) end forms["loc_sg"] = loc_sg forms["loc_pl"] = deep_copy(forms["abl_pl"]) --The following is what we used to have, but I simply cannot believe it. --if types.Greek and not types.s then -- forms["loc_pl"] = stem2 .. "ēs" --end end end noun_decl["4"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "cuarta declinación") insert_if_not(data.categories, "LA:Sustantivos de la cuarta declinación") -- normal 4th forms["nom_sg"] = stem .. "us" forms["gen_sg"] = stem .. "ūs" forms["dat_sg"] = stem .. "uī" forms["acc_sg"] = stem .. "um" forms["abl_sg"] = stem .. "ū" forms["voc_sg"] = stem .. "us" forms["nom_pl"] = stem .. "ūs" forms["gen_pl"] = stem .. "uum" forms["dat_pl"] = stem .. "ibus" forms["acc_pl"] = stem .. "ūs" forms["abl_pl"] = stem .. "ibus" forms["voc_pl"] = stem .. "ūs" if types.echo then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end add_form(forms, "acc_sg", stem, "ōn") elseif types.Callisto then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end end -- neuter if types.N then forms["nom_sg"] = stem .. "ū̆{?}" forms["gen_sg"] = {stem .. "ūs{C}", stem .. "ū{S}"} forms["dat_sg"] = {stem .. "uī{C}", stem .. "ū{S}"} forms["acc_sg"] = stem .. "ū̆{?}" forms["voc_sg"] = stem .. "ū̆{?}" forms["nom_pl"] = stem .. "ua" forms["acc_pl"] = stem .. "ua" forms["voc_pl"] = stem .. "ua" end -- ubus if types.ubus then forms["dat_pl"] = stem .. "ubus" forms["abl_pl"] = stem .. "ubus" end -- with locative if data.loc then forms["loc_sg"] = forms["abl_sg"] forms["loc_pl"] = forms["abl_pl"] end end noun_decl["5"] = function(data, args) local forms, types = data.forms, data.types local stem = args[1] insert_if_not(data.title, "quinta declinación") insert_if_not(data.categories, "LA:Sustantivos de la quinta declinación") -- ies if types.i then stem = stem .. "i" end forms["nom_sg"] = stem .. "ēs" forms["gen_sg"] = stem .. "eī" forms["dat_sg"] = stem .. "eī" forms["acc_sg"] = stem .. "em" forms["abl_sg"] = stem .. "ē" forms["voc_sg"] = stem .. "ēs" forms["nom_pl"] = stem .. "ēs" forms["gen_pl"] = stem .. "ērum" forms["dat_pl"] = stem .. "ēbus" forms["acc_pl"] = stem .. "ēs" forms["abl_pl"] = stem .. "ēbus" forms["voc_pl"] = stem .. "ēs" -- ies if types.i then forms["gen_sg"] = stem .. "ēī" forms["dat_sg"] = stem .. "ēī" end --with locative if data.loc then forms["loc_sg"] = stem .. "ē" forms["loc_pl"] = stem .. "ēbus" end end noun_decl["sgpl"] = function(data, args) local forms = data.forms local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem1 forms["gen_sg"] = stem1 forms["dat_sg"] = stem1 forms["acc_sg"] = stem1 forms["abl_sg"] = stem1 forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 forms["gen_pl"] = stem2 forms["dat_pl"] = stem2 forms["acc_pl"] = stem2 forms["abl_pl"] = stem2 forms["voc_pl"] = stem2 -- with locative if data.loc then forms["loc_sg"] = stem1 forms["loc_pl"] = stem2 end end noun_decl["indecl"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = stem forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} -- with locative (for multiword terms) if data.loc then forms["loc_sg"] = {} forms["loc_pl"] = {} end data.num = "sg" end noun_decl["irreg"] = function(data, args) local forms, subtitles, notes = data.forms, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "irregular") insert_if_not(data.categories, "LA:Sustantivos irregulares") forms["nom_sg"] = {} forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = {} forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} if stem == "bōs" then data.decl = "3" local stem1, stem2 = "bōs", "bov" noun_decl["3"](data, {stem1, stem2}) add_form(forms, "abl_sg", stem2, "īd{†}") add_form(forms, "gen_pl", "bo", "um") add_form(forms, "gen_pl", stem2, "erum") add_form(forms, "dat_pl", "", "bōbus") add_form(forms, "dat_pl", "", "būbus") add_form(forms, "abl_pl", "", "bōbus") add_form(forms, "abl_pl", "", "būbus") elseif stem:match("^[dD]eus$") then data.decl = "2" local dD = stem:sub(1, 1) forms["nom_sg"] = dD .. "eus" forms["gen_sg"] = dD .. "eī" forms["dat_sg"] = dD .. "eō" forms["acc_sg"] = dD .. "eum" forms["abl_sg"] = dD .. "eō" forms["voc_sg"] = {dD .. "eus", dD .. "ee"} if stem == "deus" then forms["nom_pl"] = {"dī", "diī", "deī"} forms["gen_pl"] = {"deōrum", "deum"} forms["dat_pl"] = {"dīs", "diīs", "deīs"} forms["acc_pl"] = "deōs" forms["abl_pl"] = {"dīs", "diīs", "deīs"} forms["voc_pl"] = {"dī", "diī", "deī"} end elseif stem == "domus" then data.decl = "4,2" insert_if_not(data.title, "cuarta/segunda declinación") forms["nom_sg"] = "domus" forms["gen_sg"] = {"domūs", "domī"} forms["dat_sg"] = {"domuī", "domō", "domū"} forms["acc_sg"] = "domum" forms["abl_sg"] = {"domū", "domō"} forms["voc_sg"] = "domus" forms["loc_sg"] = "domī" forms["nom_pl"] = "domūs" forms["gen_pl"] = {"domuum", "domōrum"} forms["dat_pl"] = "domibus" forms["acc_pl"] = {"domūs", "domōs"} forms["abl_pl"] = "domibus" forms["voc_pl"] = "domūs" forms["loc_pl"] = {} data.loc = true elseif match(stem, "^[IÏJ]ēs[uū]" .. BREVE .. "?s$") then local ij = sub(stem, 1, 1) local uu = match(stem, "[uū]" .. BREVE .. "?") forms["nom_sg"] = stem forms["gen_sg"] = ij .. "ēsū" forms["dat_sg"] = ij .. "ēsū" forms["acc_sg"] = ij .. "ēs" .. uu .. "m" forms["abl_sg"] = ij .. "ēsū" forms["voc_sg"] = ij .. "ēsū" data.num = "sg" elseif stem == "Mōsēs" or stem == "Moesēs" or match(stem, "^M[oō]" .. BREVE .. "?[īȳ]sēs$") then local mos = sub(stem, 1, -3) forms["nom_sg"] = stem forms["gen_sg"] = {mos .. "ī", mos .. "ēī", mos .. "is", mos .. "ēn", mos .. "eōs"} forms["dat_sg"] = mos .. "ī" forms["acc_sg"] = {mos .. "ēn", mos .. "em"} forms["abl_sg"] = {mos .. "e", mos .. "ēn", mos .. "ī"} forms["voc_sg"] = {mos .. "ēs", mos .. "ē"} data.num = "sg" elseif stem:match("^[ij]ūgerum$") then data.decl = "2,3" local ij = stem:sub(1, 1) insert_if_not(data.title, "segunda/tercera declinación híbrido") forms["nom_sg"] = ij .. "ūgerum" forms["gen_sg"] = ij .. "ūgerī" forms["dat_sg"] = ij .. "ūgerō" forms["acc_sg"] = ij .. "ūgerum" forms["abl_sg"] = ij .. "ūgerō" forms["voc_sg"] = ij .. "ūgerum" forms["nom_pl"] = ij .. "ūgera" forms["gen_pl"] = ij .. "ūgerum" forms["dat_pl"] = ij .. "ūgeribus" forms["acc_pl"] = ij .. "ūgera" forms["abl_pl"] = {ij .. "ūgeribus", ij .. "ūgerīs{†}"} forms["voc_pl"] = ij .. "ūgera" elseif stem == "sūs" then data.decl = "3" forms["nom_sg"] = "sūs" forms["gen_sg"] = "suis" forms["dat_sg"] = "suī" forms["acc_sg"] = "suem" forms["abl_sg"] = "sue" forms["voc_sg"] = "sūs" forms["nom_pl"] = "suēs" forms["gen_pl"] = "suum" forms["dat_pl"] = {"suibus", "sūbus", "subus"} forms["acc_pl"] = "suēs" forms["abl_pl"] = {"suibus", "sūbus", "subus"} forms["voc_pl"] = "suēs" elseif stem == "ēthos" then data.decl = "3" insert_if_not(data.title, "tercera declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "ēthos" forms["gen_sg"] = "ētheos" forms["acc_sg"] = "ēthos" forms["voc_sg"] = "ēthos" forms["nom_pl"] = {"ēthea", "ēthē"} forms["dat_pl"] = {"ēthesi", "ēthesin"} forms["acc_pl"] = {"ēthea", "ēthē"} forms["abl_pl"] = {"ēthesi", "ēthesin"} forms["voc_pl"] = {"ēthea", "ēthē"} elseif stem == "Athōs" then data.decl = "2" insert_if_not(data.title, "segunda declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "Athōs" forms["gen_sg"] = "Athō" forms["dat_sg"] = "Athō" forms["acc_sg"] = {"Athō", "Athōn"} forms["abl_sg"] = "Athō" forms["voc_sg"] = "Athōs" data.num = "sg" elseif stem:match("^[uv]ēnum$") then data.decl = "4,2" local uv = stem:sub(1, 1) insert_if_not(data.title, "cuarta/segunda declinación, defectivo") forms["dat_sg"] = {uv .. "ēnuī", uv .. "ēnō"} forms["acc_sg"] = uv .. "ēnum" data.num = "sg" elseif stem:match("^[uv]īs$") then data.decl = "3" local uv = stem:sub(1, 1) insert_if_not(data.title, "defectivo") forms["nom_sg"] = uv .. "īs" forms["gen_sg"] = uv .. "īs" forms["dat_sg"] = uv .. "ī" forms["acc_sg"] = uv .. "im" forms["abl_sg"] = uv .. "ī" forms["voc_sg"] = uv .. "īs" forms["nom_pl"] = uv .. "īrēs" forms["gen_pl"] = uv .. "īrium" forms["dat_pl"] = uv .. "īribus" forms["acc_pl"] = {uv .. "īrēs", uv .. "īrīs"} forms["abl_pl"] = uv .. "īribus" forms["voc_pl"] = uv .. "īrēs" else error("Stem " .. stem .. " not recognized.") end end local adj_decl = {} adj_decl["0+"] = function(data, args) local forms, categories = data.forms, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = stem forms["gen_sg_m"] = stem forms["gen_pl_m"] = stem forms["dat_sg_m"] = stem forms["dat_pl_m"] = stem forms["acc_sg_m"] = stem forms["acc_pl_m"] = stem forms["abl_sg_m"] = stem forms["abl_pl_m"] = stem forms["voc_sg_m"] = stem forms["voc_pl_m"] = stem forms["loc_sg_m"] = stem forms["loc_pl_m"] = stem end adj_decl["1&2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera y segunda declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local original if types.er then local final2 = stem:sub(-2) if final2 == "er" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") elseif final2 == "ur" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") else error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem) end stem, original = args[2], stem end local us = "us" local a_sf = "a" local um = "um" local ae_gsf = "ae" local am = "am" local a_macron = "ā" local i_pl = stem .. "ī" if types.greekA or types.greekE then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") if types.greekA then us = "os" um = "on" am = "ān" else us = "os" a_sf = "ē" um = "on" ae_gsf = "ēs" am = "ēn" a_macron = "ē" end i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = original or (stem .. us) forms["nom_sg_f"] = stem .. a_sf forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_f"] = stem .. ae_gsf forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_f"] = stem .. "ae" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_f"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_f"] = stem .. am forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_f"] = stem .. a_macron forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_f"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = original or (stem .. "e") forms["voc_sg_f"] = stem .. a_sf forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" if types.ius then insert_if_not(data.title, "pronominal") --insert_if_not(subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''") forms["gen_sg_m"] = stem .. "ī̆us" forms["gen_sg_f"] = stem .. "ī̆us" forms["gen_sg_n"] = stem .. "ī̆us" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_f"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" elseif types.not_ius then insert_if_not(data.title, "no pronominal") --insert_if_not(subtitles, "with normal genitive and dative singular") end if stem == "me" then forms["voc_sg_m"] = "mī" end if types.ic then --insert_if_not(subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''") local oc = "oc" local oc_macron = "ōc" if stem == "ill" then oc = "uc" oc_macron = "ūc" end forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = stem .. oc forms["nom_pl_n"] = stem .. "aec" forms["gen_sg_m"] = stem .. "uius" forms["gen_sg_f"] = stem .. "uius" forms["gen_sg_n"] = stem .. "uius" forms["dat_sg_m"] = stem .. "uic" forms["dat_sg_f"] = stem .. "uic" forms["dat_sg_n"] = stem .. "uic" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = stem .. oc forms["acc_pl_n"] = stem .. "aec" forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. oc_macron forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} end if types.distr then if stem:sub(-1) == "n" then forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum{R}"} forms["gen_pl_f"] = {stem .. "um", stem .. "ārum{R}"} forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum{R}"} else error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem) end end forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["1-1+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") forms["nom_sg_m"] = stem .. "a" forms["nom_pl_m"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ae" forms["gen_pl_m"] = stem .. "ārum" forms["dat_sg_m"] = stem .. "ae" forms["dat_pl_m"] = stem .. "īs" forms["acc_sg_m"] = stem .. "am" forms["acc_sg_n"] = stem .. "a" forms["acc_pl_m"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ā" forms["abl_pl_m"] = stem .. "īs" forms["voc_sg_m"] = stem .. "a" forms["voc_pl_m"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["2-2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "segunda declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local us = "us" local um = "um" local i_pl = stem .. "ī" if types.greek then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") us = "os" um = "on" i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = stem .. us forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = stem .. "e" forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end local function abl_i_e(...) local function update_slot(forms, slot, f, do_copy) if not forms[slot] then return do_copy elseif do_copy then f = deep_copy(f) end forms[slot] = f return true end function abl_i_e(stem, forms, types) local f, do_copy if types["abl_e_i"] then f = {stem .. "e", stem .. "ī"} elseif types["abl_i_e"] then f = {stem .. "ī", stem .. "e"} else return end do_copy = update_slot(forms, "abl_sg_m", f, do_copy) do_copy = update_slot(forms, "abl_sg_f", f, do_copy) -- Neuter doesn't take -e with i-stems. if not types.I then update_slot(forms, "abl_sg_n", f, do_copy) end end return abl_i_e(...) end adj_decl["3-1+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) if types.par then forms["nom_pl_n"] = stem2 .. "a" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["abl_sg_m"] = stem2 .. "e" forms["abl_sg_n"] = stem2 .. "e" forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"} -- Really? forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"} -- Why does this happen? forms["acc_pl_n"] = stem2 .. "a" forms["voc_pl_n"] = stem2 .. "a" end local es_base = stem1:match("^(.-)ēs$") if es_base and es_base == stem2 then if types.greek then forms["nom_sg_n"] = {stem2 .. "ē̆s{?}"} forms["acc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_m"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["nom_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["acc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["voc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["abl_sg_m"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["abl_sg_n"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["gen_pl_m"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} forms["gen_pl_n"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Adjetivos griegos") elseif types.not_greek then insert_if_not(data.title, "no griego") end end end adj_decl["3-def+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, defectivo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = stem2 .. "ēs" forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" if types.tor then insert_if_not(data.title, "tercera declinación, solo en masculino") insert_if_not(categories, "LA:Adjetivos solo en masculino") remove_forms(forms, {"_f$", "_n$"}) forms["nom_sg_m"] = stem1 forms["gen_sg_m"] = stem2 .. "is" forms["dat_sg_m"] = stem2 .. "ī" forms["acc_sg_m"] = stem2 .. "em" forms["abl_sg_m"] = stem2 .. "e" forms["voc_sg_m"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["gen_pl_m"] = stem2 .. "um" forms["dat_pl_m"] = stem2 .. "ibus" forms["acc_pl_m"] = stem2 .. "ēs" forms["abl_pl_m"] = stem2 .. "ibus" forms["voc_pl_m"] = stem2 .. "ēs" end if types.trix then insert_if_not(data.title, "tercera declinación, solo en femenino o en neutro plural") insert_if_not(categories, "LA:Adjetivos solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en neutro") remove_forms(forms, {"_m$", "sg_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.trixf then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.idis then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = {stem2 .. "is", stem2 .. "os"} forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = {stem2 .. "em", stem2 .. "a"} forms["abl_sg_f"] = stem2 .. "e" forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} forms["gen_pl_f"] = stem2 .. "um" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = {stem2 .. "ēs", stem2 .. "as"} forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} end forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-C+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1 = args[1] local stem2 = stem1 .. "ōr" insert_if_not(data.title, "tercera declinación, comparativo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos comparativos") forms["nom_sg_m"] = stem1 .. "or" forms["nom_sg_n"] = stem1 .. "us" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "a" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 .. "us" forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} forms["acc_pl_n"] = stem2 .. "a" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 .. "or" forms["voc_sg_n"] = stem1 .. "us" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "a" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-P+"] = function(data, args) local forms, notes = data.forms, data.notes local stem2 = args[2] adj_decl["3-1+"](data, args) insert_if_not(data.title, "tercera declinación, participio") insert_if_not(data.categories, "LA:Adjetivos de la tercera declinación") forms["abl_sg_m"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["abl_sg_n"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} end adj_decl["3-2+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem = args[1] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem .. "is" forms["nom_sg_n"] = stem .. "e" forms["nom_pl_m"] = stem .. "ēs" forms["nom_pl_n"] = stem .. "ia" forms["gen_sg_m"] = stem .. "is" forms["gen_sg_n"] = stem .. "is" forms["gen_pl_m"] = stem .. "ium" forms["gen_pl_n"] = stem .. "ium" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" forms["dat_pl_m"] = stem .. "ibus" forms["dat_pl_n"] = stem .. "ibus" forms["acc_sg_m"] = stem .. "em" forms["acc_sg_n"] = stem .. "e" forms["acc_pl_m"] = {stem .. "īs", stem .. "ēs"} forms["acc_pl_n"] = stem .. "ia" forms["abl_sg_m"] = stem .. "ī" forms["abl_sg_n"] = stem .. "ī" forms["abl_pl_m"] = stem .. "ibus" forms["abl_pl_n"] = stem .. "ibus" -- abl_i_e(stem, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem .. "is" forms["voc_sg_n"] = stem .. "e" forms["voc_pl_m"] = stem .. "ēs" forms["voc_pl_n"] = stem .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-3+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con tres terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_f"] = stem2 .. "is" forms["nom_sg_n"] = stem2 .. "e" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_f"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_f"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_f"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_f"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_f"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_f"] = stem2 .. "em" forms["acc_sg_n"] = stem2 .. "e" forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_f"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_f"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_f"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" -- abl_i_e(stem2, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem1 forms["voc_sg_f"] = stem2 .. "is" forms["voc_sg_n"] = stem2 .. "e" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_f"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["indecl+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = {} forms["gen_sg_m"] = {} forms["gen_pl_m"] = {} forms["dat_sg_m"] = {} forms["dat_pl_m"] = {} forms["acc_sg_m"] = stem forms["acc_pl_m"] = {} forms["abl_sg_m"] = {} forms["abl_pl_m"] = {} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["irreg+"] = function(data,args) local forms, types, pos, notes, categories = data.forms, data.types, data.pos, data.notes, data.categories local arg1 = args[1] insert_if_not(data.title, "irregular") insert_if_not(categories, "LA:Adjetivos irregulares") if arg1 == "duo" or arg1 == "ambō" then local stem = sub(arg1, 1, -2) -- data.title = stem == "amb" and "irregular adjective" or "numeral" data.num = "pl" local stem_with_o = stem .. (stem == "amb" and "ō" or "o") forms["nom_pl_m"] = stem_with_o forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem_with_o forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_pl_m"] = stem .. "ōbus" forms["dat_pl_f"] = stem .. "ābus" forms["dat_pl_n"] = stem .. "ōbus" forms["acc_pl_m"] = {stem .. "ōs", stem_with_o} forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem_with_o forms["abl_pl_m"] = stem .. "ōbus" forms["abl_pl_f"] = stem .. "ābus" forms["abl_pl_n"] = stem .. "ōbus" forms["voc_pl_m"] = stem_with_o forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem_with_o if stem == "du" then forms["gen_pl_m"] = {forms["gen_pl_m"], "duum", "duom{†}"} forms["gen_pl_n"] = {forms["gen_pl_n"], "duum", "duom{†}"} end elseif arg1:sub(-6) == "mīlle" then insert_if_not(data.title, "numeral semiindeclinable") local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "le" forms["nom_pl_m"] = {stem .. "ia", stem .. "lia"} forms["gen_sg_m"] = stem .. "le" forms["gen_pl_m"] = {stem .. "ium", stem .. "lium"} forms["dat_sg_m"] = stem .. "le" forms["dat_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["acc_sg_m"] = stem .. "le" forms["acc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["abl_sg_m"] = stem .. "le" forms["abl_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["voc_sg_m"] = stem .. "le" forms["voc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) elseif arg1 == "ille" or arg1 == "iste" or arg1 == "ipse" or arg1 == "olle" then local stem = arg1:sub(1, -2) types.ius = true adj_decl["1&2+"](data, {stem}) insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) forms["nom_sg_m"] = arg1 if arg1 == "ipse" then add_form(forms, "nom_sg_n", stem, "ud{MED}") add_form(forms, "acc_sg_n", stem, "ud{MED}") else forms["nom_sg_n"] = stem .. "ud" forms["acc_sg_n"] = stem .. "ud" end forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} elseif arg1 == "illic" or arg1 == "istic" or arg1 == "isthic" then insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["gen_sg_m"] = stem .. "ī̆usce" forms["gen_sg_f"] = stem .. "ī̆usce" forms["gen_sg_n"] = stem .. "ī̆usce" forms["dat_sg_m"] = stem .. "īc" forms["dat_sg_f"] = stem .. "īc" forms["dat_sg_n"] = stem .. "īc" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. "ōc" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["nom_pl_m"] = stem .. "īsce" forms["nom_pl_f"] = stem .. "aec" forms["nom_pl_n"] = stem .. "aec" forms["gen_pl_m"] = stem .. "ōrunc{?}" forms["gen_pl_f"] = stem .. "ārunc{?}" forms["gen_ok_n"] = stem .. "ōrunc{?}" forms["dat_pl_m"] = stem .. "īsce" forms["dat_pl_f"] = stem .. "īsce" forms["dat_pl_n"] = stem .. "īsce" forms["acc_pl_m"] = stem .. "ōsce" forms["acc_pl_f"] = stem .. "āsce" forms["acc_pl_n"] = stem .. "aec" forms["abl_pl_m"] = stem .. "īsce" forms["abl_pl_f"] = stem .. "īsce" forms["abl_pl_n"] = stem .. "īsce" forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "hice" then insert_if_not(data.title, "demostrativo") -- .. " pronoun" forms["nom_sg_m"] = "hice" forms["nom_sg_f"] = "haece" forms["nom_sg_n"] = "hoce" forms["nom_pl_m"] = "hīce" forms["nom_pl_f"] = "haece" forms["nom_pl_n"] = "haece" forms["gen_sg_m"] = "huiusce" forms["gen_sg_f"] = "huiusce" forms["gen_sg_n"] = "huiusce" forms["gen_pl_m"] = {"hōrunce", "hōrumce"} forms["gen_pl_f"] = {"hārunce", "hārumce"} forms["gen_pl_n"] = {"hōrunce", "hōrumce"} forms["dat_sg_m"] = "huīce" forms["dat_sg_f"] = "huīce" forms["dat_sg_n"] = "huīce" forms["dat_pl_m"] = "hīsce" forms["dat_pl_f"] = "hīsce" forms["dat_pl_n"] = "hīsce" forms["acc_sg_m"] = "hunce" forms["acc_sg_f"] = "hance" forms["acc_sg_n"] = "hoce" forms["acc_pl_m"] = "hōsce" forms["acc_pl_f"] = "hāsce" forms["acc_pl_n"] = "haece" forms["abl_sg_m"] = "hōce" forms["abl_sg_f"] = "hāce" forms["abl_sg_n"] = "hōce" forms["abl_pl_m"] = "hīsce" forms["abl_pl_f"] = "hīsce" forms["abl_pl_n"] = "hīsce" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "plūs" then insert_if_not(data.title, "comparativo") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación con una terminación") data.note = "Ninguna de las formas en singular se usaron en latín clásico" forms["nom_sg_n"] = "plūs" forms["nom_pl_m"] = "plūrēs" forms["nom_pl_n"] = "plūra" forms["gen_sg_m"] = "plūris" forms["gen_sg_n"] = "plūris" forms["gen_pl_m"] = "plūrium" forms["gen_pl_n"] = "plūrium" forms["dat_sg_m"] = "plūrī" forms["dat_sg_n"] = "plūrī" forms["dat_pl_m"] = "plūribus" forms["dat_pl_n"] = "plūribus" forms["acc_sg_m"] = "plūrem" forms["acc_sg_f"] = "plūrem" forms["acc_sg_n"] = "plūs" forms["acc_pl_m"] = {"plūrēs", "plūrīs"} forms["acc_pl_n"] = "plūra" forms["abl_sg_m"] = {"plūrī", "plūre"} forms["abl_sg_f"] = {"plūrī", "plūre"} forms["abl_sg_n"] = {"plūrī", "plūre"} forms["abl_pl_m"] = "plūribus" forms["abl_pl_n"] = "plūribus" forms["voc_sg_n"] = "plūs" forms["voc_pl_m"] = "plūrēs" forms["voc_pl_n"] = "plūra" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif match(arg1, "^egō̆?$") or arg1 == "nōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "nōs" forms["gen_sg_m"] = "meī" forms["gen_pl_m"] = {"nostrī", "nostrum"} forms["dat_sg_m"] = "mihī̆" forms["dat_pl_m"] = "nōbīs" forms["acc_sg_m"] = {"mē", "mēmē"} forms["acc_pl_m"] = "nōs" forms["abl_sg_m"] = {"mē", "mēmē"} forms["abl_pl_m"] = "nōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "nōs" elseif arg1 == "tū" or arg1 == "vōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "vōs" forms["gen_sg_m"] = "tuī" forms["gen_pl_m"] = {"vestrī", "vestrum"} forms["dat_sg_m"] = "tibī̆" forms["dat_pl_m"] = "vōbīs" forms["acc_sg_m"] = {"tē", "tētē"} forms["acc_pl_m"] = "vōs" forms["abl_sg_m"] = {"tē", "tētē"} forms["abl_pl_m"] = "vōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "vōs" elseif arg1 == "suī" then insert_if_not(data.title, "pronombre reflexivo") forms["nom_sg_m"] = {} forms["nom_pl_m"] = {} forms["gen_sg_m"] = arg1 forms["gen_pl_m"] = forms["gen_sg_m"] forms["dat_sg_m"] = "sibī̆" forms["dat_pl_m"] = forms["dat_sg_m"] forms["acc_sg_m"] = {"sē", "sēsē"} forms["acc_pl_m"] = {"sē", "sēsē"} forms["abl_sg_m"] = {"sē", "sēsē"} forms["abl_pl_m"] = {"sē", "sēsē"} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} elseif arg1 == "is" or arg1 == "īdem" then insert_if_not(data.title, "pronombre demostrativo") forms["nom_sg_m"] = "is" forms["nom_sg_f"] = "ea" forms["nom_sg_n"] = "id" forms["nom_pl_m"] = {"iī", "eī", "ī"} forms["nom_pl_f"] = "eae" forms["nom_pl_n"] = "ea" forms["gen_sg_m"] = {"eius", "ejus"} forms["gen_sg_f"] = {"eius", "ejus"} forms["gen_sg_n"] = {"eius", "ejus"} forms["gen_pl_m"] = {"eōrum", "eum"} forms["gen_pl_f"] = "eārum" forms["gen_pl_n"] = {"eōrum", "eum"} forms["dat_sg_m"] = {"eī", "e͡i", "ēī"} forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"} forms["dat_sg_n"] = {"eī", "e͡i", "ēī"} forms["dat_pl_m"] = {"iīs", "eīs", "īs"} forms["dat_pl_f"] = {"iīs", "eīs", "īs", "eābus"} forms["dat_pl_n"] = {"iīs", "eīs", "īs"} forms["acc_sg_m"] = "eum" forms["acc_sg_f"] = "eam" forms["acc_sg_n"] = "id" forms["acc_pl_m"] = "eōs" forms["acc_pl_f"] = "eās" forms["acc_pl_n"] = "ea" forms["abl_sg_m"] = "eō" forms["abl_sg_f"] = "eā" forms["abl_sg_n"] = "eō" forms["abl_pl_m"] = {"iīs", "eīs", "īs"} forms["abl_pl_f"] = {"iīs", "eīs", "īs"} forms["abl_pl_n"] = {"iīs", "eīs", "īs"} if arg1 == "īdem" then forms["nom_sg_m"] = "ī" forms["nom_sg_n"] = "i" forms["acc_sg_n"] = "i" end elseif arg1 == "quis" or arg1 == "quī" then data.note = "La forma ''qua'' es preferida frente a ''quae'' cuando se usa como indefinido" local id = "id" if arg1 == "quī" then insert_if_not(data.title, "determinante relativo/interrogativo") id = "od" forms["nom_sg_m"] = {"quī", "quis", "quei{†}"} forms["nom_sg_f"] = {"quae", "qua"} forms["acc_sg_f"] = "quam" forms["abl_sg_m"] = "quō" forms["abl_sg_f"] = "quā" forms["abl_sg_n"] = "quō" else insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = {"quis", "quī"} forms["nom_sg_f"] = {"quae", "qua", "quis{†}"} forms["acc_sg_f"] = {"quam", "quem{†}"} forms["abl_sg_m"] = {"quō", "quī"} forms["abl_sg_f"] = {"quā", "quī"} forms["abl_sg_n"] = {"quō", "quī"} end forms["nom_sg_n"] = "qu"..id forms["nom_pl_m"] = {"quī", "quei{†}"} forms["nom_pl_f"] = "quae" forms["nom_pl_n"] = {"quae", "qua"} forms["gen_sg_m"] = {"cuius", "quoius{†}"} forms["gen_sg_f"] = {"cuius", "quoius{†}"} forms["gen_sg_n"] = {"cuius", "quoius{†}"} forms["gen_pl_m"] = "quōrum" forms["gen_pl_f"] = "quārum" forms["gen_pl_n"] = "quōrum" forms["dat_sg_m"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_f"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_n"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_n"] = {"quibus", "quīs", "queis{†}"} forms["acc_sg_m"] = "quem" forms["acc_sg_n"] = "qu"..id forms["acc_pl_m"] = "quōs" forms["acc_pl_f"] = "quās" forms["acc_pl_n"] = {"quae", "qua"} forms["abl_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_n"] = {"quibus", "quīs", "queis{†}"} elseif arg1 == "aliquī" then insert_if_not(data.title, "determinante indefinido") forms["nom_sg_m"] = {"aliquī{DET/ADJ}", "aliquis{PRON/SUST}"} forms["nom_sg_f"] = {"aliqua", "aliquae{R}"} forms["nom_sg_n"] = "aliquod" forms["nom_pl_m"] = "aliquī" forms["nom_pl_f"] = "aliquae" forms["nom_pl_n"] = "aliqua" forms["gen_sg_m"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_f"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_n"] = {"alicuius", "aliquoius{†}"} forms["gen_pl_m"] = "aliquōrum" forms["gen_pl_f"] = "aliquārum" forms["gen_pl_n"] = "aliquōrum" forms["dat_sg_m"] = {"alicui", "aliquoi{†}"} forms["dat_sg_f"] = {"alicui", "aliquoi{†}"} forms["dat_sg_n"] = {"alicui", "aliquoi{†}"} forms["dat_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["acc_sg_m"] = "aliquem" forms["acc_sg_f"] = "aliquam" forms["acc_sg_n"] = "aliquod" forms["acc_pl_m"] = "aliquōs" forms["acc_pl_f"] = "aliquās" forms["acc_pl_n"] = "aliqua" forms["abl_sg_m"] = "aliquō" forms["abl_sg_f"] = "aliquā" forms["abl_sg_n"] = "aliquō" forms["abl_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} elseif arg1 == "quisquam" then insert_if_not(data.title, "determinante indefinido, concordancia en negativo") data.note = "En latín clásico, era preferidas las formas de ''ūllus'' en lugar de las esta voz para el femenino y el neutro." forms["nom_sg_m"] = "quisquam" forms["nom_sg_f"] = {"quaequam", "quisquam{†}"} forms["nom_sg_n"] = "quodquam" forms["nom_pl_m"] = "quīquam" forms["nom_pl_f"] = "quaequam" forms["nom_pl_n"] = "quaequam" forms["gen_sg_m"] = "cuiusquam" forms["gen_sg_f"] = "cuiusquam" forms["gen_sg_n"] = "cuiusquam" forms["gen_pl_m"] = "quōrumquam" forms["gen_pl_f"] = "quārumquam" forms["gen_pl_n"] = "quōrumquam" forms["dat_sg_m"] = "cuiquam" forms["dat_sg_f"] = "cuiquam" forms["dat_sg_n"] = "cuiquam" forms["dat_pl_m"] = "quibusquam" forms["dat_pl_f"] = "quibusquam" forms["dat_pl_n"] = "quibusquam" forms["acc_sg_m"] = "quemquam" forms["acc_sg_f"] = {"quamquam", "quemquam{†}"} forms["acc_sg_n"] = "quodquam" forms["acc_pl_m"] = "quōsquam" forms["acc_pl_f"] = "quāsquam" forms["acc_pl_n"] = "quaequam" forms["abl_sg_m"] = {"quōquam", "quīquam{†}"} forms["abl_sg_f"] = "quāquam" forms["abl_sg_n"] = "quōquam" forms["abl_pl_m"] = "quibusquam" forms["abl_pl_f"] = "quibusquam" forms["abl_pl_n"] = "quibusquam" forms["voc_sg_m"] = "quisquam" forms["voc_sg_f"] = "quaequam" forms["voc_sg_n"] = "quodquam" forms["voc_pl_m"] = "quīquam" forms["voc_pl_f"] = "quaequam" forms["voc_pl_n"] = "quaequam" elseif arg1 == "quisquis" then insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = "quisquis" forms["nom_sg_f"] = "quisquis" forms["nom_sg_n"] = {"quidquid", "quicquid"} forms["nom_pl_m"] = "quīquī" forms["nom_pl_f"] = "quaequae" forms["nom_pl_n"] = "quaequae" forms["gen_sg_m"] = "cuiuscuius" forms["gen_sg_f"] = "cuiuscuius" forms["gen_sg_n"] = "cuiuscuius" forms["gen_pl_m"] = "quōrumquōrum" forms["gen_pl_f"] = "quārumquārum" forms["gen_pl_n"] = "quōrumquōrum" forms["dat_sg_m"] = "cuicui" forms["dat_sg_f"] = "cuicui" forms["dat_sg_n"] = "cuicui" forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"} forms["acc_sg_m"] = "quemquem" forms["acc_sg_f"] = "quamquam" forms["acc_sg_n"] = {"quidquid", "quicquid"} forms["acc_pl_m"] = "quōsquōs" forms["acc_pl_f"] = "quāsquās" forms["acc_pl_n"] = "quaequae" forms["abl_sg_m"] = "quōquō" forms["abl_sg_f"] = "quāquā" forms["abl_sg_n"] = "quōquō" forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"} forms["voc_sg_m"] = "quisquis" forms["voc_sg_f"] = "quisquis" forms["voc_sg_n"] = {"quidquid", "quicquid"} forms["voc_pl_m"] = "quīquī" forms["voc_pl_f"] = "quaequae" forms["voc_pl_n"] = "quaequae" elseif arg1 == "ecquis" then insert_if_not(data.title, "pronombre interrogativo") forms["nom_sg_m"] = {"ecquis", "ecquī"} forms["nom_sg_f"] = {"ecqua", "ecquae"} forms["nom_sg_n"] = "ecquid" forms["nom_pl_m"] = "ecquī" forms["nom_pl_f"] = "ecquae" forms["nom_pl_n"] = {"ecqua", "ecquae"} forms["gen_sg_m"] = "eccuius" forms["gen_sg_f"] = "eccuius" forms["gen_sg_n"] = "eccuius" forms["dat_sg_m"] = "eccui" forms["dat_sg_f"] = "eccui" forms["dat_sg_n"] = "eccui" forms["acc_sg_m"] = "ecquem" forms["acc_sg_f"] = "ecquam" forms["acc_sg_n"] = "ecquod" forms["acc_pl_m"] = "ecquōs" forms["acc_pl_f"] = "ecquās" forms["acc_pl_n"] = {"ecqua", "ecquae"} forms["abl_sg_m"] = {"ecquō", "ecquī"} forms["abl_sg_f"] = {"ecquā", "ecquī"} forms["abl_sg_n"] = {"ecquō", "ecquī"} elseif arg1 == "quīdam" then insert_if_not(data.title, "pronombre indefinido") forms["nom_sg_m"] = "quīdam" forms["nom_sg_f"] = "quaedam" forms["nom_sg_n"] = "quiddam" forms["nom_pl_m"] = {"quīdam", "quēsdam{†}"} forms["nom_pl_f"] = "quaedam" forms["nom_pl_n"] = "quaedam" forms["gen_sg_m"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_f"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_n"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_pl_m"] = {"quōrundam", "quōrumdam"} forms["gen_pl_f"] = {"quārundam", "quārumdam"} forms["gen_pl_n"] = {"quōrundam", "quōrumdam"} forms["dat_sg_m"] = {"cuidam", "quoidam{†}"} forms["dat_sg_f"] = {"cuidam", "quoidam{†}"} forms["dat_sg_n"] = {"cuidam", "quoidam{†}"} forms["dat_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_n"] = {"quibusdam", "quīsdam{†}"} forms["acc_sg_m"] = {"quendam", "quemdam"} forms["acc_sg_f"] = {"quandam", "quamdam"} forms["acc_sg_n"] = "quiddam" forms["acc_pl_m"] = {"quōsdam", "quēsdam{†}"} forms["acc_pl_f"] = "quāsdam" forms["acc_pl_n"] = "quaedam" forms["abl_sg_m"] = "quōdam" forms["abl_sg_f"] = "quādam" forms["abl_sg_n"] = "quōdam" forms["abl_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_n"] = {"quibusdam", "quīsdam{†}"} elseif arg1 == "nēmō" then insert_if_not(data.title, "Determinante y pronombre, concordancia en negativo") forms["nom_sg_m"] = "nēmō" forms["nom_sg_f"] = "nēmō" forms["gen_sg_m"] = {"nūllī̆us", "nēminis{R}"} forms["gen_sg_f"] = {"nūllī̆us", "nēminis{R}"} forms["dat_sg_m"] = "nēminī" forms["dat_sg_f"] = "nēminī" forms["acc_sg_m"] = "nēminem" forms["acc_sg_f"] = "nēminem" forms["abl_sg_m"] = {"nūllō", "nēmine{R}"} forms["abl_sg_f"] = {"nūllā", "nēmine{R}"} else error('adjective ' .. arg1 .. ' not recognized') end end local function extract_base(lemma, ending) if ending:find("(", nil, true) then return match(lemma, ending) end return match(lemma, "^(.*)" .. ending .. "$") end local function get_noun_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local subtypes = ending_and_subtypes[2] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. -- In addition, M or F as a subtype is canceled by N, and -- vice-versa, but M doesn't cancel F or vice-versa; instead, -- we simply ignore the conflicting gender specification when -- constructing the combination of specified and inferred subtypes. -- The reason for this is that neuters have distinct declensions -- from masculines and feminines, but masculines and feminines have -- the same declension, and various nouns in Latin that are -- normally masculine are exceptionally feminine and vice-versa -- (nauta, agricola, fraxinus, malus "apple tree", manus, rēs, -- etc.). -- -- In addition, sg as a subtype is canceled by pl and vice-versa. -- It's also possible to specify both, which will override sg but -- not cancel it (in the sense that it won't prevent the relevant -- rule from matching). For example, there's a rule specifying that -- lemmas beginning with a capital letter and ending in -ius take -- the ius.voci.sg subtypes. Specifying such a lemma with the -- subtype both will result in the ius.voci.both subtypes, whereas -- specifying such a lemma with the subtype pl will cause this rule -- not to match, and it will fall through to a less specific rule -- that returns just the ius subtype, which will be combined with -- the explicitly specified pl subtype to produce ius.pl. if specified_subtypes["-" .. subtype] or subtype == "N" and (specified_subtypes.M or specified_subtypes.F) or (subtype == "M" or subtype == "F") and specified_subtypes.N or subtype == "sg" and specified_subtypes.pl or subtype == "pl" and specified_subtypes.sg then not_this_subtype = true break end end end if not not_this_subtype then if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] local base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending == stem2 then return base, stem2, subtypes end else local base = extract_base(lemma, ending) if base then return base, stem2, subtypes end end end end if decltype then error("Unrecognized ending for declension-" .. decltype .. " noun: " .. lemma) end return lemma, stem2, keys_to_list(specified_subtypes) end local patterns = { {"[mM]a", "%0t"}, {"e", ""}, {"([aoAO])([lr])", "%1" .. MACRON .. "%2"}, {"[eE]l", "%0l"}, {"([mM])en", "%1in"}, {"([tT]ūd)ō", "%1in"}, {"([gG])ō", "%1in"}, {"[ōŌ]", "%1n"}, {"er", "r"}, {"[ēi]s", ""}, {"([āēīōūȳĀĒĪŌŪȲ]n)s", function(v) return (gsub(toNFD(v), MACRON, "") .. "t") end}, {"([cC])eps", "%1ipit"}, {"([bp])s", "%1"}, {"us", "or"}, {"s", "t"}, {"ex", "ic"}, {"x", "c"}, } local function make_stem2(stem) local n for _, pattern in ipairs(patterns) do local key = pattern[1] stem, n = gsub(stem, key .. "$", pattern[2]) if n > 0 then -- debug_track("la-utilities/" .. key) REVISAR return toNFC(stem) end end -- debug_track("la-utilities") REVISAR return stem end local function detect_noun_subtype(lemma, stem2, typ, subtypes) local base, _ if typ == "1" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ām", {"F", "am"}}, {"ās", {"M", "Greek", "Ma"}}, {"ēs", {"M", "Greek", "Me"}}, {"ē", {"F", "Greek"}}, {"ae", {"F", "pl"}}, {"a", {"F"}}, }) elseif typ == "2" then local detected_subtypes lemma, stem2, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(.*r)$", {"M", "er"}}, {"^(.*v)os$", {"M", "vos"}}, {"^(.*v)om$", {"N", "vom"}}, -- If the lemma ends in -os and the user said N or -M, then the -- following won't apply, and the second (neuter) -os will applly. {"os", {"M", "Greek"}}, {"os", {"N", "Greek", "us"}}, {"on", {"N", "Greek"}}, -- -ius beginning with a capital letter is assumed a proper name, -- and takes the voci subtype (vocative in -ī) along with the ius -- subtype and sg-only. Other nouns in -ius just take the ius -- subtype. Explicitly specify "sg" so that if .pl is given, -- this rule won't apply. {"^(%u.*)ius$", {"M", "ius", "voci", "sg"}}, {"ius", {"M", "ius"}}, {"ium", {"N", "ium"}}, -- If the lemma ends in -us and the user said N or -M, then the -- following won't apply, and the second (neuter) -us will applly. {"us", {"M"}}, {"us", {"N", "us"}}, {"um", {"N"}}, {"iī", {"M", "ius", "pl"}}, {"ia", {"N", "ium", "pl"}}, -- If the lemma ends in -ī and the user said N or -M, then the -- following won't apply, and the second (neuter) -ī will applly. {"ī", {"M", "pl"}}, {"ī", {"N", "us", "pl"}}, {"oe", {"M", "Greek", "pl"}}, {"a", {"N", "pl"}}, }) stem2 = stem2 or lemma return lemma, stem2, detected_subtypes elseif typ == "3" then if subtypes.pl then if subtypes.Greek then base = lemma:match("^(.*)erēs$") if base then return base .. "ēr", base .. "er", {"er"} end base = lemma:match("^(.*)ontēs$") if base then return base .. "ōn", base .. "ont", {"on"} end base = lemma:match("^(.*)es$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural Greek noun: " .. lemma) end base = lemma:match("^(.*)ia$") if base then return base, stem2 or base, {"N", "I", "pure"} end base = lemma:match("^(.*)a$") if base then return base, stem2 or base, {"N"} end base = lemma:match("^(.*)ēs$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural noun: " .. lemma) end stem2 = stem2 or make_stem2(lemma) local detected_subtypes if subtypes.Greek then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"is", ""}, {"I"}}, {"ēr", {"er"}}, {"ōn", {"on"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} end if not subtypes.N then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"^(%u.*pol)is$", ""}, {"F", "polis", "sg", "loc"}}, {{"tūdō", "tūdin"}, {"F"}}, {{"tās", "tāt"}, {"F"}}, {{"tūs", "tūt"}, {"F"}}, {{"tiō", "tiōn"}, {"F"}}, {{"siō", "siōn"}, {"F"}}, {{"xiō", "xiōn"}, {"F"}}, {{"gō", "gin"}, {"F"}}, {{"or", "ōr"}, {"M"}}, {{"tr[iī]x", "trīc"}, {"F"}}, {{"is", ""}, {"I"}}, {{"^(%l.*)ēs$", ""}, {"I"}}, }) if base then return lemma, stem2, detected_subtypes end end base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"us", "or"}, {"N"}}, {{"us", "er"}, {"N"}}, {{"ma", "mat"}, {"N"}}, {{"men", "min"}, {"N"}}, {{"^(%u.*)e$", ""}, {"N", "sg"}}, {{"e", ""}, {"N", "I", "pure"}}, {{"al", "āl"}, {"N", "I", "pure"}}, {{"ar", "ār"}, {"N", "I", "pure"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} elseif typ == "4" then if subtypes.echo or subtypes.Callisto then base = lemma:match("^(.*)ō$") if not base then error("Declension-4 noun of subtype .echo or .Callisto should end in -ō: " .. lemma) end if subtypes.Callisto then return base, nil, {"F", "sg"} else return base, nil, {"F"} end end return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", {"M"}}, {"ū̆", {"N"}}, {"ūs", {"M", "pl"}}, {"ua", {"N", "pl"}}, }) elseif typ == "5" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"iēs", {"F", "i"}}, {"iēs", {"F", "i", "pl"}}, {"ēs", {"F"}}, {"ēs", {"F", "pl"}}, }) elseif typ == "sgpl" then return lemma, stem2, {} elseif typ == "irreg" and lemma == "domus" then -- [[domus]] auto-sets data.loc = true, but we need to know this -- before declining the noun so we can propagate it to other segments. return lemma, nil, {"loc"} elseif typ == "indecl" or typ == "irreg" and ( lemma == "Deus" or match(lemma, "^[IJ]ēs[uū]s$") or lemma == "Athōs" or lemma == "vēnum" ) then -- Indeclinable nouns, and certain irregular nouns, set data.num = "sg", -- but we need to know this before declining the noun so we can -- propagate it to other segments. return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", {"both"}}, {"", {"sg"}}, {"", {"pl"}}, }) elseif typ == "indecl" or typ == "irreg" then return lemma, nil, {} else return nil, nil, {} end end -- Given ENDINGS_AND_SUBTYPES (a list of four-tuples of ENDING, RETTYPE, -- SUBTYPES, PROCESS_RETVAL), check each ENDING in turn against LEMMA and -- STEM2. If it matches, return a four-tuple BASE, STEM2, RETTYPE, NEW_SUBTYPES -- where BASE is normally the remainder of LEMMA minus the ending, STEM2 is -- as passed in, RETTYPE is as passed in, and NEW_SUBTYPES is the same as -- SUBTYPES minus any subtypes beginning with a hyphen. If no endings match, -- throw an error if DECLTYPPE is non-nil, mentioning the DECLTYPE -- (user-specified declension); but if DECLTYPE is nil, just return the tuple -- nil, nil, nil, nil. -- -- In order for a given entry to match, ENDING must match and also the subtypes -- in SUBTYPES (a list) must not be incompatible with the passed-in -- user-specified subtypes SPECIFIED_SUBTYPES (a set, i.e. a table where the -- keys are strings and the value is always true). "Incompatible" means that -- a given SUBTYPE is specified in either one and -SUBTYPE in the other, or -- that "pl" is found in SPECIFIED_SUBTYPES and not in SUBTYPES. -- -- The ending spec in ENDINGS_AND_SUBTYPES is one of the following: -- -- 1. A simple string, e.g. "tūdō", specifying an ending. -- 2. A regex that should match the entire lemma (it should be anchored at -- the beginning with ^ and at the end with $), and contains a single -- capturing group to match the base. -- 3. A pair {SIMPLE_STRING_OR_REGEX, STEM2_ENDING} where -- SIMPLE_STRING_OR_REGEX is one of the previous two possibilities and -- STEM2_ENDING is a string specifying the corresponding ending that must -- be present in STEM2. If this form is used, the combination of -- base + STEM2_ENDING must exactly match STEM2 in order for this entry -- to be considered a match. An example is {"is", ""}, which will match -- lemma == "follis", stem2 == "foll", but not lemma == "lapis", -- stem2 == "lapid". -- -- If PROCESS_STEM2 is given and the returned STEM2 would be nil, call -- process_stem2(BASE) to get the STEM2 to return. local function get_adj_type_and_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes, process_stem2) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local rettype = ending_and_subtypes[2] local subtypes = ending_and_subtypes[3] local process_retval = ending_and_subtypes[4] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. if specified_subtypes["-" .. subtype] then not_this_subtype = true break end -- A subtype is canceled if the user specified SUBTYPE and -- -SUBTYPE is given in the to-be-returned subtypes. local must_not_be_present = subtype:match("^%-(.*)$") if must_not_be_present and specified_subtypes[must_not_be_present] then not_this_subtype = true break end end end if not not_this_subtype then local base if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending ~= stem2 then base = nil end else base = extract_base(lemma, ending) end if base then -- Remove subtypes of the form -SUBTYPE from the subtypes -- to be returned. local new_subtypes = {} for _, subtype in ipairs(subtypes) do if subtype:sub(1, 1) ~= "-" then insert(new_subtypes, subtype) end end if process_retval then base, stem2 = process_retval(base, stem2) end if process_stem2 then stem2 = stem2 or process_stem2(base) end return base, stem2, rettype, new_subtypes end end end if not decltype then return lemma, stem2, nil, keys_to_list(specified_subtypes) elseif decltype == "" then error("Unrecognized ending for adjective: " .. lemma) else error("Unrecognized ending for declension-" .. decltype .. " adjective: " .. lemma) end end -- Autodetect the type and subtype of an adjective given all the information -- specified by the user: lemma, stem2, declension type and specified subtypes. -- Four values are returned: the lemma base (i.e. the stem of the lemma, as -- required by the declension functions), the value of stem2 to pass to the -- declension function, the declension type and the autodetected subtypes. -- Note that this will not detect a given subtype if -SUBTYPE is specified for -- any subtype that would be returned, or if SUBTYPE is specified and -SUBTYPE -- is among the subtypes that would be returned (such subtypes are filtered out -- of the returned subtypes). local function detect_adj_type_and_subtype(lemma, stem2, typ, subtypes) local function base_as_stem2(base, stem2) return base, base end local function constant_base(baseval) return function(base, stem2) return baseval, nil end end local function decl12_stem2(base) return base end local function decl3_stem2(base) return make_stem2(base) end local decl12_entries = { {"us", "1&2+", {}}, {"a", "1&2+", {}}, {"um", "1&2+", {}}, {"ī", "1&2+", {"pl"}}, {"ae", "1&2+", {"pl"}}, {"a", "1&2+", {"pl"}}, -- Nearly all -os adjectives are greekA {"os", "1&2+", {"greekA", "-greekE"}}, {"os", "1&2+", {"greekE", "-greekA"}}, {"ē", "1&2+", {"greekE", "-greekA"}}, {"on", "1&2+", {"greekA", "-greekE"}}, {"on", "1&2+", {"greekE", "-greekA"}}, {"^(.*er)$", "1&2+", {"er"}}, {"^(.*ur)$", "1&2+", {"er"}}, {"^(h)ic$", "1&2+", {"ic"}}, } local decl3_entries = { {"^(.*er)$", "3-3+", {"I"}}, {"^(.*er)$", "3-3+", {}}, {"is", "3-2+", {"I"}}, {"is", "3-2+", {}}, {"e", "3-2+", {"I"}}, {"e", "3-2+", {}}, {"^(.*[ij])or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(.*[ij])or$", "3-C+", {}}, {"^(min)or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(min)or$", "3-C+", {}}, {"^(.*trīx)$", "3-def+", {"trix", "abl_i_e", "-abl_e_i"}}, {"^(.*trīx)$", "3-def+", {"trix"}}, {"^(.*tor)$", "3-def+", {"tor", "abl_i_e", "-abl_e_i"}}, {"^(.*tor)$", "3-def+", {"tor"}}, -- Detect -ēs as 3-1 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like quadripēs, volucripēs). -- Essentially, for declension-3 adjectives, we require that -- .pl is given if the lemma is plural. -- -- Most 3-1 adjectives are i-stem (e.g. audāx) so we require -I -- to be given with non-i-stem adjectives. The first entry below -- will apply when -I isn't given, the second when it is given. {"^(.*ēs)$", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"I"}}, {"^(.*ēs)$", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"par"}}, {"^(.*[ij])ōrēs$", "3-C+", {"pl"}}, {"^(min)ōrēs$", "3-C+", {"pl"}}, -- If .pl with -ēs, we don't know if the adjective is 3-1, 3-2 -- or 3-3. Since 3-2 is probably the most common, we infer it -- (as well as the fact that these adjectives *are* in a sense -- 3-2 since they have a distinct neuter in -(i)a. Note that -- we have two entries here; the first one will apply unless -- -I is given, and will infer an i-stem adjective; the second -- one will apply otherwise (and infer a non-i-stem 3-1 adjective). {"ēs", "3-2+", {"pl", "I"}, base_as_stem2}, {"ēs", "3-1+", {"pl", "par"}, base_as_stem2}, -- Same for neuters. {"ia", "3-2+", {"pl", "I"}, base_as_stem2}, {"a", "3-1+", {"pl", "par"}, base_as_stem2}, -- As above for -ēs but for miscellaneous singulars. {"", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"I"}}, {"", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"par"}}, } local function get_subtypes_and_endings(typ, f) local subtypes_and_endings = {} for _, v in ipairs(decl3_entries) do if f(v) then v = deep_copy(v) v[2] = typ insert(subtypes_and_endings, v) end end return subtypes_and_endings end local function compare(spec) return spec[2] == typ end if typ == "+" then local base, new_stem2, rettype, new_subtypes = get_adj_type_and_subtype_by_ending(lemma, stem2, nil, subtypes, decl12_entries, decl12_stem2) if rettype then return base, new_stem2, rettype, new_subtypes else return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) end elseif typ == "3+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) elseif typ == "1&2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl12_entries, decl12_stem2) elseif typ == "1-1+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"a", typ, {}}, {"ae", typ, {"pl"}}, }) elseif typ == "2-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", typ, {}}, {"um", typ, {}}, {"ī", typ, {"pl"}}, {"a", typ, {"pl"}}, {"os", typ, {"greek"}}, {"on", typ, {"greek"}}, {"oe", typ, {"greek", "pl"}}, }) elseif typ == "3-1+" then -- Use the specs from `decl3_entries`, but add the two i-stem 3-2+ specs when plural-only, as they're the same when 3-1+. local subtypes_and_endings = get_subtypes_and_endings(typ, function(spec) local spec1, spec2 = spec[1], spec[2] return spec2 == typ or (spec2 == "3-2+" and spec1 == "ēs" or spec1 == "ia") end) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-def+" then -- Like 3-1+ but defective in gender local subtypes_and_endings = get_subtypes_and_endings(typ, compare) insert(subtypes_and_endings, {"", typ, {"I"}}) insert(subtypes_and_endings, {"", typ, {"par"}}) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"is", typ, {}}, {"e", typ, {}}, -- Detect -ēs as 3-2 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like isoscelēs). Essentially, -- for declension-3 adjectives, we require that .pl is given -- if the lemma is plural. {"ēs", typ, {}}, {"ēs", typ, {"pl"}}, {"ia", typ, {"pl"}}, }, decl3_stem2) elseif typ == "3-3+" or typ == "3-P+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ēs", typ, {"pl"}, base_as_stem2}, {"ia", typ, {"pl"}, base_as_stem2}, {"", typ, {}}, }, decl3_stem2) elseif typ == "3-C+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, get_subtypes_and_endings(typ, compare), decl3_stem2) elseif typ == "irreg+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(duo)$", typ, {"pl"}}, {"^(ambō)$", typ, {"pl"}}, {"^(mīll?ia)$", typ, {"N", "pl"}, constant_base("mīlle")}, -- match ea {"^(ea)$", typ, {}, constant_base("is")}, -- match id {"^(id)$", typ, {}, constant_base("is")}, -- match plural eī, iī {"^([ei]ī)$", typ, {"pl"}, constant_base("is")}, -- match plural ea, eae {"^(eae?)$", typ, {"pl"}, constant_base("is")}, -- match eadem {"^(eadem)$", typ, {}, constant_base("īdem")}, -- match īdem, idem {"^([īi]dem)$", typ, {}, constant_base("īdem")}, -- match plural īdem {"^(īdem)$", typ, {"pl"}}, -- match plural eadem, eaedem {"^(eae?dem)$", typ, {"pl"}, constant_base("īdem")}, -- match illa, ipsa, ista; it doesn't matter if we overmatch because -- we'll get an error as we use the stem itself in the returned base {"^(i[lps][lst])a$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match illud, istud; as above, it doesn't matter if we overmatch {"^(i[ls][lt])ud$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match ipsum {"^(ipsum)$", typ, {}, constant_base("ipse")}, -- match plural illī, ipsī, istī; as above, it doesn't matter if we -- overmatch {"^(i[lps][lst])ī$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- match plural illa, illae, ipsa, ipsae, ista, istae; as above, it -- doesn't matter if we overmatch {"^(i[lps][lst])ae?$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- Detect quī as non-plural unless .pl specified. {"^(quī)$", typ, {}}, -- Otherwise detect quī as plural. {"^(quī)$", typ, {"pl"}}, -- Same for quae. {"^(quae)$", typ, {}, constant_base("quī")}, {"^(quae)$", typ, {"pl"}, constant_base("quī")}, {"^(quid)$", typ, {}, constant_base("quis")}, {"^(quod)$", typ, {}, constant_base("quī")}, {"^(qui[cd]quid)$", typ, {}, constant_base("quisquis")}, {"^(quīquī)$", typ, {"pl"}, constant_base("quisquis")}, {"^(quaequae)$", typ, {"pl"}, constant_base("quisquis")}, -- match all remaining lemmas in lemma form {"", typ, {}}, }) elseif typ == "indecl+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", typ, {"both"}}, {"", typ, {"sg"}}, {"", typ, {"pl"}}, }) else -- 0+ return lemma, nil, typ, {} end end local noun_lb = { nom_sg = "sg.", gen_sg = "sg.", dat_sg = "sg.", acc_sg = "sg.", abl_sg = "sg.", voc_sg = "sg.", loc_sg = "sg.", nom_pl = "pl.", gen_pl = "pl.", dat_pl = "pl.", acc_pl = "pl.", abl_pl = "pl.", voc_pl = "pl.", loc_pl = "pl." } function export.sust(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de = "num"}, ["nota"] = {}, } for form,_ in pairs(noun_lb) do params[form] = {lista=true} end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local genero local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, detected_subtypes = detect_noun_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end if not genero then if types.M then genero = "m" end if types.N then genero = "n" end if types.F then genero = "f" end end local es_adj if not r1 and genero then local typ r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) if r1 then c = typ es_adj = true end end assert(r1, "forma no reconocida: "..r[1]) local cb = es_adj and adj_decl[c] or noun_decl[c] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) if es_adj then local forms_ = {} for form,arr in pairs(data.forms) do local f1, f2 = form:match("^(.*)(_"..genero..")$") if f1 then forms_[f1] = arr end end data.forms = forms_ end if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, noun_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if declinfo["loc_sg"] and #declinfo["loc_sg"] == 0 then declinfo["loc_sg"] = nil end if declinfo["loc_pl"] and #declinfo["loc_pl"] == 0 then declinfo["loc_pl"] = nil end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local forms = sobreescribir_formas(declinfo, args, false, {}) comprobar_defectivo(forms, {}) forms = desactivar_formas(forms, function (form) return (form:find("pl$") and nopl) or (form:find("sg$") and nosg) end ) local raiz_nom = f(forms["nom_sg"][1] or forms["nom_pl"][1] or "?") local raiz_gen = f(forms["gen_sg"][1] or forms["gen_pl"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, noun_lb) local t = {} insert(t, {{""}, {"Singular"}, {"Plural"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg"], forms["nom_pl"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg"], forms["gen_pl"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg"], forms["dat_pl"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg"], forms["acc_pl"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg"], forms["abl_pl"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg"], forms["voc_pl"]}) if (forms["loc_sg"] and forms["loc_sg"][1]) or (forms["loc_pl"] and forms["loc_pl"][1]) then insert(t, {{"Locativo", header=true, color=COLOR_H}, forms["loc_sg"], forms["loc_pl"]}) end insert(t, {{args["nota"] or "", colspan=3}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_nom..", "..raiz_gen.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local adj_lb = { nom_sg_m = "m.", nom_sg_n = "n.", nom_sg_f = "f.", nom_pl_m = "m.", nom_pl_n = "n.", nom_pl_f = "f.", gen_sg_m = "m.", gen_sg_n = "n.", gen_sg_f = "f.", gen_pl_m = "m.", gen_pl_n = "n.", gen_pl_f = "f.", dat_sg_m = "m.", dat_sg_n = "n.", dat_sg_f = "f.", dat_pl_m = "m.", dat_pl_n = "n.", dat_pl_f = "f.", acc_sg_m = "m.", acc_sg_n = "n.", acc_sg_f = "f.", acc_pl_m = "m.", acc_pl_n = "n.", acc_pl_f = "f.", abl_sg_m = "m.", abl_sg_n = "n.", abl_sg_f = "f.", abl_pl_m = "m.", abl_pl_n = "n.", abl_pl_f = "f.", voc_sg_m = "m.", voc_sg_n = "n.", voc_sg_f = "f.", voc_pl_m = "m.", voc_pl_n = "n.", voc_pl_f = "f.", } function export.adj(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de="num"}, ["gen"] = {por_defecto="mfn"}, ["nota"] = {}, } for form,_ in pairs(adj_lb) do params[form] = {lista=true} end params["dat_pl"] = {lista=true} params["abl_pl"] = {lista=true} params["loc_pl"] = {lista=true} local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) if args["dat_pl"][1] then args["dat_pl_m"] = deep_copy(args["dat_pl"]) args["dat_pl_n"] = deep_copy(args["dat_pl"]) args["dat_pl_f"] = deep_copy(args["dat_pl"]) end if args["abl_pl"][1] then args["abl_pl_m"] = deep_copy(args["abl_pl"]) args["abl_pl_n"] = deep_copy(args["abl_pl"]) args["abl_pl_f"] = deep_copy(args["abl_pl"]) end if args["loc_pl"][1] then args["loc_pl_m"] = deep_copy(args["loc_pl"]) args["loc_pl_n"] = deep_copy(args["loc_pl"]) args["loc_pl_f"] = deep_copy(args["loc_pl"]) end args["dat_pl"] = nil args["abl_pl"] = nil args["loc_pl"] = nil assert(not find(title, " "), "locuciones no soportadas aún") -- REVISAR local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") a = a or subarg b = b or "+" local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end local cb = adj_decl[typ] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) local formas_ = {} -- necesario crear otro arreglo para no modificar las claves durante la iteración for form,arr in pairs(data.forms) do local pref = match(form, "^(.*)_m$") if pref and not data.forms[pref.."_f"] then formas_[pref.."_f"] = deep_copy(arr) end if pref and not data.forms[pref.."_n"] then formas_[pref.."_n"] = deep_copy(arr) end formas_[form] = arr end data.forms = formas_ if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, adj_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local m = find(args["gen"], "m") local fem = find(args["gen"], "f") local n = find(args["gen"], "n") local forms = sobreescribir_formas(declinfo, args, false, {}, adj_lb) comprobar_defectivo(forms) forms = desactivar_formas(forms, function (form) return (form:find("pl") and nopl) or (form:find("sg") and nosg) or (form:find("m$") and not m) or (form:find("f$") and not fem) or (form:find("n$") and not n) end ) local raiz_m = f(forms["nom_sg_m"][1] or forms["nom_pl_m"][1] or "?") local raiz_f = f(forms["nom_sg_f"][1] or forms["nom_pl_f"][1] or "?") local raiz_n = f(forms["nom_sg_n"][1] or forms["nom_pl_n"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, adj_lb) local t = {} insert(t, {{"Singular", colspan=4}, header=true, color=COLOR_H}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg_m"], forms["nom_sg_f"], forms["nom_sg_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg_m"], forms["gen_sg_f"], forms["gen_sg_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg_m"], forms["dat_sg_f"], forms["dat_sg_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg_m"], forms["acc_sg_f"], forms["acc_sg_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg_m"], forms["abl_sg_f"], forms["abl_sg_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg_m"], forms["voc_sg_f"], forms["voc_sg_n"]}) insert(t, {{"Plural", colspan=4, header=true, color=COLOR_H}}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_pl_m"], forms["nom_pl_f"], forms["nom_pl_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_pl_m"], forms["gen_pl_f"], forms["gen_pl_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_pl_m"], forms["dat_pl_f"], forms["dat_pl_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_pl_m"], forms["acc_pl_f"], forms["acc_pl_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_pl_m"], forms["abl_pl_f"], forms["abl_pl_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_pl_m"], forms["voc_pl_f"], forms["voc_pl_n"]}) insert(t, {{args["nota"] or "", colspan=4}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_m..", "..raiz_f..", "..raiz_n.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local EGO, TU, IS, NOS, VOS, EI = 1, 2, 3, 4, 5, 6 local tostr = {"1", "2", "3", "4", "5", "6"} local PRONOMBRES = {"ego", "tū", "is, ea, id", "nōs", "vōs", "eī, eae, ea"} local PRONOMBRES_SUBJ = {"ut ego", "ut tū", "ut is, ut ea, ut id", "ut nōs", "ut vōs", "ut eī, ut eae, ut ea"} local PRONOMBRES_IMP = {"―", "(tū)", "(is, ea, id)", "―", "(vōs)", "(eī, eae, ea)"} local IMPERSONALES = {"", "", "(id)", "", "", ""} local function obtener_pronombre(forma, impers) local conj, p = match(forma, "^(.*)(%d)$") if not p then return nil end p = tonumber(p) if impers then return IMPERSONALES[p] else if find(conj, "^subj") then return PRONOMBRES_SUBJ[p] end if find(conj, "^imper") then return PRONOMBRES_IMP[p] end return PRONOMBRES[p] end end local sufijos = { ["1"] = { inf_act = {"āre","isse"}, inf_pas = {"ārī"}, part_act = {"āns","ūrus"}, part_pas = {"andus","us"}, ger = {"andī","andō","andum"}, sup = {"um","ū"}, ind_pres = {"ō","ās","at","āmus","ātis","ant"}, ind_imp = {"ābam","ābās","ābat","ābāmus","ābātis","ābant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ābō","ābis","ābit","ābimus","ābitis","ābunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","āris","ātur","āmur","āminī","antur", nil,"āre"}, ind_imp_pas = {"ābar","ābāris","ābātur","ābāmur","ābāminī","ābantur", nil,"ābāre"}, ind_fut_pas = {"ābor","āberis","ābitur","ābimur","ābiminī","ābuntur", nil,"ābere"}, subj_pres = {"em","ēs","et","ēmus","ētis","ent"}, subj_imp = {"ārem","ārēs","āret","ārēmus","ārētis","ārent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"er","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_imp_pas = {"ārer","ārēris","ārētur","ārēmur","ārēminī","ārentur", nil,"ārēre"}, imper_pres = {nil,"ā",nil,nil,"āte",nil}, imper_fut = {nil,"ātō","ātō",nil,"ātōte","antō"}, imper_pres_pas = {nil,"āre",nil,nil,"āminī",nil}, imper_fut_pas = {nil,"ātor","ātor",nil,nil,"antor"}, }, ["2"] = { inf_act = {"ēre","isse"}, inf_pas = {"ērī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"eō","ēs","et","ēmus","ētis","ent"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ēbō","ēbis","ēbit","ēbimus","ēbitis","ēbunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"eor","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ēbor","ēberis","ēbitur","ēbimur","ēbiminī","ēbuntur", nil,"ēbere"}, subj_pres = {"eam","eās","eat","eāmus","eātis","eant"}, subj_imp = {"ērem","ērēs","ēret","ērēmus","ērētis","ērent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ear","eāris","eātur","eāmur","eāminī","eantur", nil,"eāre"}, subj_imp_pas = {"ērer","ērēris","ērētur","ērēmur","ērēminī","ērentur", nil,"ērēre"}, imper_pres = {nil,"ē",nil,nil,"ēte",nil}, imper_fut = {nil,"ētō","ētō",nil,"ētōte","entō"}, imper_pres_pas = {nil,"ēre",nil,nil,"ēminī",nil}, imper_fut_pas = {nil,"ētor","ētor",nil,nil,"entor"}, }, ["3"] = { -- 3 (comparar [[capio]] con [[lego]], las raíces con capi- y leg- pero hay que eliminar la doble ii) inf_act = {"ere","isse"}, inf_pas = {"ī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", nil,"ere"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_pres = {"am","ās","at","āmus","ātis","ant"}, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", nil,"āre"}, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", nil,"erēre"}, imper_pres = {nil,"e",nil,nil,"ite",nil}, imper_fut = {nil,"itō","itō",nil,"itōte","untō"}, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil}, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor"}, }, ["3/4"] = { inf_act = {"ere","isse","īre","isse"}, inf_pas = {"ī","īrī"}, part_act = {"ēns","iēns","ūrus"}, part_pas = {"endus","iendus","us"}, ger = {"endī","endō","endum","iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt", "iō","īs",nil,"īmus","ītis","iunt" }, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant", "iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant" }, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent", "iam","iēs","iet","iēmus","iētis","ient" }, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", "ior","ere","ītur","īmur","īminī","iuntur", nil,"īris",nil,nil,nil,nil, nil,"īre" }, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", "iēbar","ēbāre","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāris",nil,nil,nil,nil, nil,"iēbāre" }, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", "iar","ēre","iētur","iēmur","iēminī","ientur", nil,"iēris",nil,nil,nil,nil, nil,"iēre" }, subj_pres = {"am","ās","at","āmus","ātis","ant", "iam","iās","iat","iāmus","iātis","iant", }, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent", "īrem","īrēs","īret","īrēmus","īrētis","īrent" }, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", "iar","āre","iātur","iāmur","iāminī","iantur", nil,"iāris",nil,nil,nil,nil, nil,"iāre" }, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", "īrer","erēre","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēris",nil,nil,nil,nil, nil,"īrēre" }, imper_pres = {nil,"e",nil,nil,"ite",nil, nil,"ī",nil,nil,"īte",nil }, imper_fut = {nil,"itō","itō",nil,"itōte","untō", nil,"ītō","ītō",nil,"ītōte","iuntō" }, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil, nil,"īre",nil,nil,"īminī",nil }, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor", nil,"ītor","ītor",nil,nil,"iuntor" }, }, ["4"] = { inf_act = {"īre","isse"}, inf_pas = {"īrī"}, part_act = {"iēns","ūrus"}, part_pas = {"iendus","us"}, ger = {"iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"iō","īs","it","īmus","ītis","iunt"}, ind_imp = {"iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"iam","iēs","iet","iēmus","iētis","ient"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"ior","īris","ītur","īmur","īminī","iuntur", nil,"īre"}, ind_imp_pas = {"iēbar","iēbāris","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāre"}, ind_fut_pas = {"iar","iēris","iētur","iēmur","iēminī","ientur", nil,"iēre"}, subj_pres = {"iam","iās","iat","iāmus","iātis","iant"}, subj_imp = {"īrem","īrēs","īret","īrēmus","īrētis","īrent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"iar","iāris","iātur","iāmur","iāminī","iantur", nil,"iāre"}, subj_imp_pas = {"īrer","īrēris","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēre"}, imper_pres = {nil,"ī",nil,nil,"īte",nil}, imper_fut = {nil,"ītō","ītō",nil,"ītōte","iuntō"}, imper_pres_pas = {nil,"īre",nil,nil,"īminī",nil}, imper_fut_pas = {nil,"ītor","ītor",nil,nil,"iuntor"}, } } local formas_no_personales = { inf_act = true, inf_pas = true, part_act = true, part_pas = true, ger = true, sup = true, } local formas_personales = { ind_pres = true, ind_imp = true, ind_perf = true, ind_pluperf = true, ind_fut = true, ind_fut_perf = true, ind_fut_sig = true, ind_pres_pas = true, ind_imp_pas = true, ind_fut_pas = true, subj_pres = true, subj_imp = true, subj_perf = true, subj_pluperf = true, subj_aor_sig = true, subj_pres_pas = true, subj_imp_pas = true, imper_pres = true, imper_fut = true, imper_pres_pas = true, imper_fut_pas = true, } local formas = merge(formas_no_personales, formas_personales) local verbos_irregulares = { {"aiō", {"aiō", "aiiō", "aijō", "ajō"}, { desactivar = {"inf_pas","part_pas","ger","sup","ind_pluperf","ind_fut","ind_fut_perf", "ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_perf","subj_pluperf","subj_pres_pas", "subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {"ai"}, nucleoperf = {"a"}, nucleosup = {}, nucleosigm = {}, inf_act = {"aiere"}, ind_pres = {nil,nil,nil,{}}, ind_perf = {{},nil,nil,{},{}}, subj_pres = {nil,nil,nil,{},{}}, subj_imp = {{},{},nil,{},{},{}}, imper_pres = {{},{"ai"},{},{},{},{}}, }}, {"cedo", {"cedo"}, { desactivar = {"inf_act","inf_pas","part_act","part_pas","ger","sup","ind_pluperf","ind_pres","ind_imp","ind_perf", "ind_fut","ind_fut_perf","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres","subj_imp","subj_perf", "subj_pluperf","subj_pres_pas","subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, imper_pres = {nil,{"cedo"},nil,nil,{"cette","cedile"},nil}, }}, {"dīcō", {"dīcō"}, { conj = "3", nucleopres = {"dīc"}, nucleoperf = {"dīx"}, nucleosup = {"dict"}, nucleosigm = {"dīx"}, desactivar = {}, imper_pres = {nil, {"dīc", "dīce"}}, inf_pas = {"dīcī", "dīcier{L}"}, }}, {"dō", {"dō"}, { conj = "1", nucleopres = {"d"}, nucleoperf = {"ded"}, nucleosup = {"dat"}, nucleosigm = {}, desactivar = {}, inf_act = {"dare","dedisse"}, inf_pas = {"darī"}, ind_pres = {nil,nil,nil,{"damus"},{"datis"},nil}, ind_imp = {{"dabam"},{"dabās"},{"dabat"},{"dabāmus"},{"dabātis"},{"dabant"}}, ind_fut = {{"dabō"},{"dabis"},{"dabit"},{"dabimus"},{"dabitis"},{"dabunt"}}, ind_imp_pas = {{"dabar"},{"dabāris","dabāre"},{"dabātur"},{"dabāmur"},{"dabāminī"},{"dabantur"}}, ind_fut_pas = {{"dabor"},{"daberis","dabere"},{"dabitur"},{"dabimur"},{"dabiminī"},{"dabuntur"}}, subj_imp = {{"darem"},{"darēs"},{"daret"},{"darēmus"},{"darētis"},{"darent"}}, subj_imp_pas = {{"darer"},{"darēris","darēre"},{"darētur"},{"darēmur"},{"darēminī"},{"darentur"}}, imper_pres = {nil,nil,nil,nil,{"date"},nil}, imper_fut = {nil,{"datō"},{"datō"},nil,{"datōte"},{"dantō"}}, imper_pres_pas = {nil,{"dare"},nil,nil,{"daminī"},nil}, imper_fut_pas = {nil,{"dator"},{"dator"},nil,nil,{"dator"}}, }}, {"dūcō", {"dūcō"}, { conj = "3", nucleopres = {"dūc"}, nucleoperf = {"dūx"}, nucleosup = {"duct"}, nucleosigm = {}, desactivar = {}, imper_pres = {nil, {"dūc", "dūce"}}, }}, {"edō", {"edō", "ëdō"}, { conj = "3", nucleopres = {"ed"}, nucleoperf = {"ed"}, nucleosup = {""}, nucleosigm = {}, desactivar = {}, inf_act = {"edere","ēsse"}, part_act = {"edēns","ēsūrus","ēssūrus","ēstūrus"}, part_pas = {"edendus","edundus","ēsus","ēssus","ēstus"}, sup = {"ēsum","ēssum","ēstum","ēsū","ēssū","ēstū"}, ind_pres = {nil,{"edis","ēs"},{"edit","ēst"},nil,{"editis","ēstis"},nil}, ind_pres_pas = {nil,{"ederis","edere","ēssis","ēsse"},{"editur","ēstur"}}, subj_pres = {{"edam","edim"},{"edās","edīs"},{"edat","edit","ēst"},{"edāmus","edīmus"},{"edātis","edītis"},{"edant","edint"}}, subj_imp = {{"ederem","ēssem"},{"ederēs","ēssēs"},{"ederet","ēsset"},{"ederēmus","ēssēmus"},{"ederētis","ēssētis"},{"ederent","ēssent"}}, subj_imp_pas = {{"ederer","ēsser"},{"ederēris","ederēre","ēssēris","ēssēre"},{"ederetur","ēssetur"},{"ederēmur","ēssēmur"},{"ederēminī","ēssēminī"},{"ederentur","ēssentur"}}, imper_pres = {nil,{"ede","ēs"},nil,nil,{"edite","ēste"},nil}, imper_fut = {nil,{"editō","ēstō"},{"editō","ēstō"},nil,{"editōte","ēstōte"},{"eduntō"}}, imper_pres_pas = {nil,{"edere","ēsse"},nil,nil,{"ediminī"},nil}, imper_fut_pas = {nil,{"editor","ēstor"},{"editor","ēstor"},nil,nil,{"eduntor"}}, }}, {"eō", {"eō", "ëō"}, { conj = "4", nucleopres = {""}, nucleoperf = {""}, nucleosup = {""}, nucleosigm = {}, desactivar = {"imper_pres_pas"}, inf_act = {"īre","īsse","iisse","īvisse"}, inf_pas = {"īrī","īrier"}, part_act = {"iēns","itūrus"}, part_pas = {"eundum","itum"}, ger = {"eundī","eundō","eundum"}, sup = {"itum","itū"}, ind_pres = {{"eō"},{"īs"},{"it"},{"īmus"},{"ītis"},{"eunt"}}, ind_imp = {{"ībam"},{"ībās"},{"ībat"},{"ībāmus"},{"ībātis"},{"ībant"}}, ind_perf = {{"iī","īvī"},{"īstī","iistī","īvistī"},{"iit","īvit"},{"iimus","īvimus"},{"īstis","iistis","īvistis"},{"iērunt","iēre","īvērunt","īvēre"}}, ind_pluperf = {{"ieram","īveram"},{"ierās","īverās"},{"ierat","īverat"},{"ierāmus","īverāmus"},{"ierātis","īverātis"},{"ierant","īverant"}}, ind_fut = {{"ībō"},{"ībis"},{"ībit"},{"ībimus"},{"ībitis"},{"ībunt"}}, ind_fut_perf = {{"ierō","īverō"},{"ieris","īveris"},{"ierit","īverit"},{"ierimus","īverimus"},{"ieritis","īveritis"},{"ierint","īverint"}}, ind_fut_sig = {nil,nil,nil,nil,nil,nil}, ind_pres_pas = {{},{},{"ītur"},{},{},{}}, ind_imp_pas = {{},{},{"ībātur"},{},{},{}}, ind_fut_pas = {{},{},{"ībitur"},{},{},{}}, subj_pres = {{"eam"},{"eās"},{"eat"},{"eāmus"},{"eātis"},{"eant"}}, subj_imp = {{"īrem"},{"īrēs"},{"īret"},{"īrēmus"},{"īrētis"},{"īrent"}}, subj_perf = {{"ierim","īverim"},{"ierīs","īverīs"},{"ierit","īverit"},{"ierīmus","īverīmus"},{"ierītis","īverītis"},{"ierint","īverint"}}, subj_pluperf = {{"īssem","iissem","īvissem"},{"īssēs","iissēs","īvissēs"},{"īsset","iisset","īvisset"},{"īssēmus","iissēmus","īvissēmus"},{"īssētis","iissētis","īvissētis"},{"īssent","iissent","īvissent"}}, subj_aor_sig = {nil,nil,nil,nil,nil,nil}, subj_pres_pas = {{},{},{"eātur"},{},{},{}}, subj_imp_pas = {{},{},{"īrētur"},{},{},{}}, imper_pres = {nil,nil,nil,nil,nil,nil}, imper_fut = {nil,nil,nil,nil,nil,{"euntō"}}, imper_fut_pas = {nil,{},nil,nil,nil,{}}, }}, {"faciō", {"faciō"}, { conj = "3", I = true, nucleopres = {"fac"}, nucleoperf = {"fax"}, nucleosup = {"fact"}, nucleosigm = {"fax","faxs","facs"}, desactivar = {}, ind_pres_pas = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, ind_imp_pas = {{"fīēbam"},{"fīēbās"},{"fīēbat"},{"fīēbāmus"},{"fīēbātis"},{"fīēbant"}}, ind_fut_pas = {{"fīam"},{"fīēs"},{"fīet"},{"fīēmus"},{"fīētis"},{"fīent"}}, subj_pres_pas = {{"fīam"},{"fīās"},{"fīat"},{"fīāmus"},{"fīātis"},{"fīant"}}, subj_imp_pas = {{"fierem"},{"fierēs"},{"fieret"},{"fierēmus"},{"fierētis"},{"fierent"}}, imper_pres = {nil,{"fac","face"},nil,nil,nil,nil}, imper_pres_pas = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut_pas = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"ferō", {"ferō"}, { conj = "3", nucleopres = {"fer"}, nucleoperf = {"tul", "tetul{†}"}, nucleosup = {"lāt"}, nucleosigm = {}, desactivar = {}, inf_act = {"ferre", "tulisse", "tetulisse{†}"}, inf_pas = {"ferrī"}, ind_pres = {nil,{"fers"},{"fert"},nil,{"fertis"}}, ind_pres_pas = {nil,{"ferris","ferre"}}, subj_imp = {{"ferrem"},{"ferrēs"},{"ferret"},{"ferrēmus"},{"ferrētis"},{"ferrent"}}, subj_imp_pas = {{"ferrer"},{"ferrēris","ferrēre"},{"ferrētur"},{"ferrēmur"},{"ferrēminī"},{"ferrentur"}}, imper_pres = {nil,{"fer"},nil,nil,{"ferte"},nil}, imper_pres_pas = {nil,{"ferre"},nil,nil,nil,nil}, imper_fut = {nil,{"fertō"},{"fertō"},nil,{"fertōte"},{"feruntō"}}, imper_fut_pas = {nil,{"fertor"},{"fertor"},nil,nil,nil}, }}, {"fīō", {"fīō"}, { conj = "3", nucleopres = {"fī"}, nucleoperf = {}, nucleosup = {"fact"}, nucleosigm = {}, semidep = true, desactivar = {}, ind_pres = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, imper_pres = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"feruntō"}}, }}, {"inquam", {"inquam"}, { conj = "3", nucleopres = {"inqui"}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, nopasivo = true, desactivar = {"inf_act","inf_pas","part_pas","ger"}, ind_pres = {{"inquam"}}, }}, {"possum", {"possum"}, { conj = "3", nucleopres = {"pot"}, nucleoperf = {"pot"}, nucleosup = {}, nucleosigm = {}, pres = "possō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"posse","potesse{†}"}, part_act = {"potēns"}, ind_pres = {{"possum"},{"potes"},{"potest"},{"possumus"},{"potestis"},{"possunt"}}, ind_imp = {{"poteram"},{"poterās"},{"poterat"},{"poterāmus"},{"poterātis"},{"poterant"}}, ind_fut = {{"poterō"},{"poteris","potere"},{"poterit"},{"poterimus"},{"poteritis"},{"poterunt"}}, ind_perf = {{"potuī"},{"potuistī"},{"potuit"},{"potuimus"},{"potuistis"},{"potuērunt","potuēre"}}, ind_pluperf = {{"potueram"},{"potuerās"},{"potuerat"},{"potuerāmus"},{"potuerātis"},{"potuerant"}}, ind_fut_perf = {{"potuerō"},{"potueris"},{"potuerit"},{"potuerimus"},{"potueritis"},{"potuerunt"}}, subj_pres = {{"possem"},{"possēs"},{"possēt"},{"possēmus"},{"possētis"},{"possent"}}, subj_imp = {{"possim"},{"possīs"},{"possit"},{"possīmus"},{"possītis"},{"possint"}}, subj_perf = {{"potuerim"},{"potuerīs"},{"potuerit"},{"potuerīmus"},{"potuerītis"},{"potuerint"}}, subj_pluperf = {{"potuissem"},{"potuissēs"},{"potuisset"},{"potuissēmus"},{"potuissētis"},{"potuissent"}}, }}, {"sum", {"sum"}, { conj = "3", nucleopres = {"s"}, nucleoperf = {"fu"}, nucleosup = {}, nucleosigm = {}, pres = "sō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres_pas","imper_fut_pas"}, inf_act = {"esse"}, part_act = {"futūrus"}, ind_pres = {{"sum"},{"es"},{"est"},{"sumus"},{"estis"},{"sunt"}}, ind_imp = {{"eram"},{"erās"},{"erat"},{"erāmus"},{"erātis"},{"erant"}}, ind_fut = {{"erō"},{"eris","ere"},{"erit"},{"erimus"},{"eritis"},{"erunt"}}, subj_pres = {{"sim","siem","fuam{†}"},{"sīs","siēs","fuās{†}"},{"sit","siet","fuat{†}"},{"sīmus","siēmus","fuāmus{†}"},{"sītis","siētis","fuātis{†}"},{"sint","sient","fuant{†}"}}, subj_imp = {{"essem","forem"},{"essēs","forēs"},{"esset","foret"},{"essēmus","forēmus"},{"essētis","forētis"},{"essent","forent"}}, imper_pres = {nil,{"es"},nil,nil,{"este"},nil}, imper_fut = {nil,{"estō"},{"estō"},nil,{"estōte"},nil}, }}, {"mālō", {"mālō"}, { conj = "3", nucleopres = {"māl"}, nucleoperf = {"mālu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"mālle","māluisse"}, ind_pres = {{"mālō"},{"māvīs"},{"māvult"},{"mālumus"},{"māvultis"},{"mālunt"}}, subj_pres = {{"mālim"},{"mālīs"},{"mālit"},{"mālīmus"},{"mālītis"},{"mālint"}}, subj_imp = {{"māllem"},{"māllēs"},{"māllet"},{"māllēmus"},{"māllētis"},{"māllent"}}, }}, {"nōlō", {"nōlō"}, { conj = "3", nucleopres = {"nōl"}, nucleoperf = {"nōlu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"nōlle","nōluisse"}, ind_pres = {{"nōlō"},{"nōn vīs","nevīs{†}"},{"nōn vult","nōn volt","nevolt{†}"},{"nōlumus"},{"nōn vultis","nōn voltis","nōltis{†}"},{"nōlunt"}}, subj_pres = {{"nōlim"},{"nōlīs"},{"nōlit"},{"nōlīmus"},{"nōlītis"},{"nōlint"}}, subj_imp = {{"nōllem"},{"nōllēs"},{"nōllet"},{"nōllēmus"},{"nōllētis"},{"nōllent"}}, }}, {"volō", {"volō"}, { conj = "3", nucleopres = {"vol"}, nucleoperf = {"volu"}, nucleosup = {"volit"}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"velle","voluisse"}, ind_pres = {{"volō"},{"vīs"},{"vult","volt{†}"},{"volumus"},{"vultis","voltis{†}"},{"volunt"}}, subj_pres = {{"velim","volim{†}"},{"velīs","volīs{†}"},{"velit","volit{†}"},{"velīmus","volīmus{†}"},{"velītis","volītis{†}"},{"velint","volint{†}"}}, subj_imp = {{"vellem"},{"vellēs"},{"vellet"},{"vellēmus"},{"vellētis"},{"vellent"}}, }}, } local function combinar_prefijo_nucleosufijo(prefijo, nucleosufijo) return prefijo..nucleosufijo end local function combinar_nucleo_sufijo(nucleo, sufijo, agregar_i) if agregar_i and (not find(sufijo, "^[iī]")) and (sufijo ~= "e") and (not find(sufijo, "^er")) then return nucleo.."~i~"..sufijo end return nucleo..sufijo end local function agregar_forma(conjugado, conjinfo, forma) conjinfo[forma] = conjinfo[forma] or {} local sufijos_ = sufijos[conjinfo.conj][forma] local nucleos local prefijo if forma == "sup" then nucleos = conjinfo.nucleosup prefijo = conjinfo.prefijosup or conjinfo.prefijo elseif find(forma, "sig") then nucleos = conjinfo.nucleosigm prefijo = conjinfo.prefijosigm or conjinfo.prefijo elseif find(forma, "perf") then nucleos = conjinfo.nucleoperf prefijo = conjinfo.prefijoperf or conjinfo.prefijo else nucleos = conjinfo.nucleopres prefijo = conjinfo.prefijo end if formas_no_personales[forma] then if conjinfo[forma][1] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma]) do insert_if_not(conjugado[forma], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else for _, sufijo in ipairs(sufijos_) do local nucleos_ = nucleos if forma == "inf_act" and sufijo == "isse" then nucleos_ = conjinfo.nucleoperf elseif forma == "part_act" and sufijo == "ūrus" then nucleos_ = conjinfo.nucleosup elseif forma == "part_pas" and sufijo == "us" then nucleos_ = conjinfo.nucleosup end local agregar_i = conjinfo.I and nucleos_ == conjinfo.nucleopres for _,nucleo in ipairs(nucleos_) do insert_if_not(conjugado[forma], combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(nucleo, sufijo, agregar_i))) end end end return end for i = EGO, EI do local p = tostr[i] if conjinfo[forma][i] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma][i]) do insert_if_not(conjugado[forma..p], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else local k = i while sufijos_[k] do local agregar_i = conjinfo.I and nucleos == conjinfo.nucleopres for j, n in ipairs(nucleos) do local x = combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(n, sufijos_[k], agregar_i)) if conjinfo.always_sync_perf and (forma == "ind_perf" or forma == "ind_pluperf" or forma == "ind_fut_perf" or forma == "subj_perf" or forma == "subj_pluperf") then x = x:gsub("īvī", "iī") x = x:gsub("īvi", "ī") x = x:gsub("īve", "ī") x = x:gsub("īvē", "ē") end insert_if_not(conjugado[forma..p], x) end k = k + 6 end end end end local function get_subtype_by_ending(pres, conjinfo, specs) for _, spec in ipairs(specs) do local base = extract_base(pres, spec[1]) if base then for _,s in ipairs(spec[2]) do if conjinfo[s] == nil then conjinfo[s] = true end end return base end end error("Unrecognized ending for conjugation " .. conjinfo["conj"]) end local function detect_v_type_and_subtypes(conjinfo) local pres = conjinfo["v"] local conj_arg = conjinfo["conj"] pres = toNFC(pres) local base_conj_arg, auto_perf_supine = conj_arg:match("^([124]/?4?)(%+%+?)$") if base_conj_arg then if auto_perf_supine == "++" and base_conj_arg ~= "4" then error("Conjugation types 1++ and 2++ not allowed") end conj_arg = base_conj_arg end conjinfo.conj = conj_arg if conj_arg == "1" then local base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"at", {"impers"}}, {"ātur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "āv" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "āt" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "āss" end end elseif conj_arg == "2" then local base = get_subtype_by_ending(pres, conjinfo, { {"eō", {}}, {"eor", {"dep"}}, {"et", {"impers"}}, {"ētur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "u" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "it" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3" then local base if conjinfo.I == false then -- si explícitamente se indicó que no es del tipo -io, hay que excluir sufijos base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) else base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) end if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end assert(conjinfo["nucleoperf"][1], "especifique todos los núcleos para verbos de la tercera conjugación") assert(conjinfo["nucleosup"][1], "especifique todos los núcleos para verbos de la tercera conjugación") if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3/4" then local base base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "4" then local base = get_subtype_by_ending(pres, conjinfo, { {"iō", {}}, {"ior", {"dep"}}, {"it", {"impers"}}, {"ītur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "irreg" then for _,p in ipairs(verbos_irregulares) do for _,rx in ipairs(p[2]) do local pref, verb = match(conjinfo.v, "^(.*)("..rx..")$") if verb then conjinfo.v = verb conjinfo.prefijo = pref if conjinfo.nucleoperf[1] and conjinfo.nucleoperf[1] ~= "-" then -- [[ecfero]] conjinfo.prefijoperf = conjinfo.nucleoperf[1] conjinfo.nucleoperf = {} end if conjinfo.nucleosup[1] and conjinfo.nucleosup[1] ~= "-" then conjinfo.prefijosup = conjinfo.nucleosup[1] conjinfo.nucleosup = {} end if conjinfo.nucleosigm[1] and conjinfo.nucleosigm[1] ~= "-" then conjinfo.prefijosigm = conjinfo.nucleosigm[1] conjinfo.nucleosigm = {} end conjinfo.irreg = true conjinfo.conj = p[3].conj for k,val in pairs(p[3]) do if not conjinfo[k] or (type(conjinfo[k]) == "table" and not conjinfo[k][1]) then conjinfo[k] = deep_copy(val) end end return conjinfo end end end error("Unrecognized conjugation '" .. conj_arg .. "'") else error("Unrecognized conjugation '" .. conj_arg .. "'") end return conjinfo end function export.v(frame) local title_ = mw.title.getCurrentTitle() local tit = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {alias_de = "conj"}, [2] = {alias_de = "pres"}, [3] = {alias_de = "nucleoperf"}, [4] = {alias_de = "nucleosup"}, [5] = {alias_de = "nucleosigm"}, ["impers"] = {}, -- pas para formas pasivas solamente ["impersonal"] = {alias_de = "impers"}, ["dep"] = {tipo="bool"}, ["depon"] = {alias_de="dep"}, ["deponente"] = {alias_de="dep"}, ["semidep"] = {tipo="bool"}, ["semidepon"] = {alias_de="semidep"}, ["semideponente"] = {alias_de="semidep"}, ["sigm"] = {tipo="bool"}, ["nopasivo"] = {tipo="bool"}, ["soloperf"] = {tipo="bool"}, ["I"] = {tipo="bool"}, ["p3inf"] = {tipo="bool"}, -- sin uso ["poet_sync_perf"] = {tipo="bool"}, -- sin uso ["always_sync_perf"] = {tipo="bool"}, -- solo en [[saevio]] ["conj"] = {requerido=true}, ["pres"] = {requerido=true}, ["nucleopres"] = {lista = true}, ["nucleoperf"] = {lista = true}, ["nucleosup"] = {lista = true}, ["nucleosigm"] = {lista = true}, ["núcleopres"] = {alias_de="nucleopres"}, ["núcleoperf"] = {alias_de="nucleoperf"}, ["núcleosup"] = {alias_de="nucleosup"}, ["paradigma"] = {lista = true}, ["desactivarnucleos"] = {tipo="bool", por_defecto=true}, -- para [[-o]] ["nota"] = {}, } local conjugado = {} for forma,_ in pairs(formas_no_personales) do params[forma] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma] = {} end for forma,_ in pairs(formas_personales) do for i,s in ipairs(tostr) do params[forma..s] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma..s] = {} if i == 1 then params[forma] = {alias_de=forma..s} end end end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) assert(not find(tit, " "), "locuciones no soportadas aún") assert(not (args["dep"] and args["semidep"]), "un verbo no puede ser deponente y semideponente a la vez") local conjinfo = { conj = args.conj, prefijo="", v=args.pres, desactivar = {}, dep=args.dep, semidep=args.semidep, sigm=args.sigm, impers=args.impers, nopasivo=args.nopasivo, soloperf=args.soloperf, I=args.I, p3inf=args.p3inf, poet_sync_perf=args.poet_sync_perf, -- sin uso always_sync_perf=args.always_sync_perf, nucleopres = deep_copy(args.nucleopres), nucleoperf = deep_copy(args.nucleoperf), nucleosup = deep_copy(args.nucleosup), nucleosigm = deep_copy(args.nucleosigm) } conjinfo = detect_v_type_and_subtypes(conjinfo) conjinfo.conj = conjinfo.conj if conjinfo.impers == true then conjinfo.impers = "3" end -- no puede ir conjinfo acá abajo porque si es un sufijo va a quedar "-" en la raíz, lo que anularía todas las formas conjugadas, tiene que venir directo de args if args.desactivarnucleos then if args.nucleopres[1] == "-" then conjinfo.nucleopres = {} end if args.nucleoperf[1] == "-" then conjinfo.nucleoperf = {} end if args.nucleosup[1] == "-" then conjinfo.nucleosup = {} end if args.nucleosigm[1] == "-" then conjinfo.nucleosigm = {} end end local es_irregular = conjinfo.irreg for _,d in ipairs(conjinfo.desactivar) do if formas_no_personales[d] then args[d] = {"no"} else args[d.."2"] = {"no"} end end for forma,_ in pairs(formas) do agregar_forma(conjugado, conjinfo, forma) end local resultante = sobreescribir_formas(conjugado, args) local mostrar_fut_sig = #resultante["ind_fut_sig1"] > 0 local mostrar_aor_sig = #resultante["subj_aor_sig1"] > 0 local defectivo = comprobar_defectivo(resultante, {"^imper", "_sig"}, tostr) local defect2 resultante, defect2 = desactivar_formas(resultante, function (form) return (conjinfo.nopasivo and form:find("_pas")) or (conjinfo.soloperf and not form:find("perf")) or (conjinfo.impers == "pas" and form:find("_pas[^3]")) or (conjinfo.impers == "pas3" and form:find("_pas[^3]")) or (conjinfo.impers == "pas36" and form:find("_pas[^36]")) end ) if defect2 then defectivo = true end -- por ahora innecesario -- local part_no_adj = {} -- for _,e in ipairs(resultante.part) do -- if (find(e, 'PART') or not find(e, 'ADJ')) and not find(e, "†") then -- insert(part_no_adj, gsub1(e, '%b{}', '')) -- end -- end local tit_pres = f(resultante["ind_pres1"][1] or "―") local tit_inf = f(resultante["inf_act"][1] or "―") local tit_perf = f(resultante["ind_perf1"][1] or "―") local tit_sup = f(resultante["sup"][1] or "―") resultante = agregar_enlaces(resultante, tit, normalizar_enlace) local es_impersonal = conjinfo.impers resultante = formatear_formas(resultante, function (x) return obtener_pronombre(x, es_impersonal) end) local impers = conjinfo.impers local cs, cs1, cs2, fila_pronombres_ind, fila_pronombres_subj, fila_pronombres_imper, mostrar_imper if impers == "3" then fila_pronombres_ind = {"", "(id)", color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", "(quod id)", color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", "(id)", color=COLOR_IMPER, header=true, class="pc"} cs = 2 elseif impers == "36" then error("no soportado actualmente") cs = 3 else fila_pronombres_ind = {"", PRONOMBRES[1], PRONOMBRES[2], PRONOMBRES[3], PRONOMBRES[4], PRONOMBRES[5], PRONOMBRES[6], color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", PRONOMBRES_SUBJ[1], PRONOMBRES_SUBJ[2], PRONOMBRES_SUBJ[3], PRONOMBRES_SUBJ[4], PRONOMBRES_SUBJ[5], PRONOMBRES_SUBJ[6], color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", PRONOMBRES_IMP[1], PRONOMBRES_IMP[2], PRONOMBRES_IMP[3], PRONOMBRES_IMP[4], PRONOMBRES_IMP[5], PRONOMBRES_IMP[6], color=COLOR_IMPER, header=true, class="pc"} cs = 7 mostrar_imper = true end cs1 = cs -- math.floor(cs / 2) -- cs2 = cs - cs1 local t = {} insert(t, {{"Formas no personales (verboides)", colspan=cs}, color=COLOR_H, header=true}) if impers == "3" then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else resultante.inf_act.colspan = cs1-1 resultante.inf_pas.colspan = cs1-1 resultante.part_act.colspan = cs1-1 resultante.part_pas.colspan = cs1-1 resultante.ger.colspan = cs1-1 resultante.sup.colspan = cs1-1 if not conjinfo.dep then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) end if not conjinfo.semidep then insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) end if not conjinfo.dep then insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) end if not conjinfo.semidep then insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) end insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) end local function ic(tiempo) if impers == "3" then return resultante[tiempo.."3"] elseif impers == "36" then return resultante[tiempo.."3"], resultante[tiempo.."6"] end return resultante[tiempo.."1"], resultante[tiempo.."2"], resultante[tiempo.."3"], resultante[tiempo.."4"], resultante[tiempo.."5"], resultante[tiempo.."6"] end insert(t, {{"Formas personales", colspan=cs}, color=COLOR_H, header=true}) insert(t, {{"Modo indicativo", colspan=cs}, color=COLOR_IND, header=true}) insert(t, fila_pronombres_ind) if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) end if not conjinfo.dep and not conjinfo.semidep then insert(t, {{"Pretérito perfecto", color=COLOR_IND, header=true}, ic("ind_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_IND, header=true}, ic("ind_pluperf")}) insert(t, {{"Futuro perfecto", color=COLOR_IND, header=true}, ic("ind_fut_perf")}) end if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) end insert(t, {{"Modo subjuntivo", colspan=cs}, color=COLOR_SUBJ, header=true}) insert(t, fila_pronombres_subj) if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) end if not conjinfo.dep and not conjinfo.semidep then insert(t, {{"Pretérito perfecto", color=COLOR_SUBJ, header=true}, ic("subj_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_SUBJ, header=true}, ic("subj_pluperf")}) end if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) end insert(t, {{"Modo imperativo", colspan=cs}, color=COLOR_IMPER, header=true}) insert(t, fila_pronombres_imper) if mostrar_imper then if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) end else insert(t, {{"Como verbo "..(impers == "3" and "impersonal" or "terciopersonal")..", ''"..tit.."'' CARECE de imperativo", color=COLOR_IMPER, header=true, colspan=cs}}) end insert(t, {{f("Leyenda: † arcaico, x no normativo, ~■~ cambio ortográfico, #■# irregularidad"), colspan=cs}}) args["nota"] = args["nota"] or "" if conjinfo.impers == "utc3" then args["nota"] = args["nota"].." NOTA: se usa también como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "umc3" then args["nota"] = args["nota"].." NOTA: se usa más como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "utc36" then args["nota"] = args["nota"].." NOTA: se usa también como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "umc36" then args["nota"] = args["nota"].." NOTA: se usa más como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "pas" or conjinfo.imeprs == "pas3" then args["nota"] = args["nota"].." NOTA: impersonal para las formas pasivas" end if conjinfo.impers == "pas36" then args["nota"] = args["nota"].." NOTA: formas pasivas terciopersonales (solamente tercera persona singular y plural)" end if conjinfo.soloperf then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas del perfecto y pluscuamperfecto con valor de presente, imperfecto o futuro" end if conjinfo.nopasivo then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas activas" end insert(t, {{args["nota"] and args["nota"] or "", colspan=cs}}) local cats = {} local subtits = {} local conj_str if conjinfo.conj == "1" then conj_str = "primera conjugación" elseif conjinfo.conj == "2" then conj_str = "segunda conjugación" elseif conjinfo.conj == "3" then conj_str = "tercera conjugación" elseif conjinfo.conj == "3/4" then conj_str = "tercera/cuarta conjugación" else conj_str = "cuarta conjugación" end insert(cats, "LA:Verbos de la "..conj_str) insert(subtits, conj_str) impers = impers or "" if impers == "3" or find(impers, "^u[tm]c3$") then insert(subtits, "impersonal") insert(cats, "LA:Verbos impersonales") end if defectivo then insert(subtits, "defectivo") insert(cats, "LA:Verbos defectivos") end if conjinfo.dep then insert(subtits, "deponente") insert(cats, "LA:Verbos deponentes") end if conjinfo.semidep then insert(subtits, "semideponente") insert(cats, "LA:Verbos semideponentes") end if es_irregular then insert(subtits, "irregular") insert(cats, "LA:Verbos irregulares") else insert(subtits, "regular") insert(cats, "LA:Verbos regulares") end return renderizar_tabla( frame, "'''Conjugación de ''"..tit_pres..", "..tit_inf..", "..tit_perf..", "..tit_sup.."'''''&emsp;&emsp;("..concat(subtits, ", ")..")", t, ns == 0 and cats or {}) end function export.adv(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { ["n"] = {}, ["nota"] = {alias_de = "n"}, ["comp"] = {lista = true}, ["comparativo"] = {alias_de = "comp"}, ["compnota"] = {lista = true}, ["sup"] = {lista = true}, ["superlativo"] = {alias_de = "sup"}, ["supnota"] = {lista = true}, } local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local head = args[1] local modo = args[2] local enc local cats = {} local cat_pref = "LA:Adverbios" if modo == "-" then enc = "sin comparativo ni superlativo" insert(cats, cat_pref.." incomparables") return renderizar_encabezado( frame, head, enc, args["n"], {}, ns == 0 and cats or {}, normalizar_enlace ) end local flex = {comp={},sup={}} local stem for _, suff in ipairs{"iter", "nter", "ter", "er", "iē", "ē", "rā", "im", "ō"} do stem = match(head, "^(.*)" .. suff .. "$") if stem ~= nil then local comp_suff, sup_suff = "ius", "issimē" if suff == "nter" then stem = stem .. "nt" end if suff == "rā" then comp_suff = "er" .. comp_suff sup_suff = "imē" end insert(flex.comp, stem .. comp_suff) insert(flex.sup, stem .. sup_suff) break end end if not stem and not args.comp[1] and not args.sup[1] then error("Unrecognized adverb type, recognized types are “-ē”, “-er”, “-ter”, “-iter”, “-im”, or “-ō”, “-ra” or specify irregular forms or “-” if incomparable.") end local formas, irr = sobreescribir_formas(flex, args) if args["comp"][1] == "no" then enc = "sin comparativo" insert(cats, cat_pref.." sin comparativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) elseif args["sup"][1] == "no" then enc = "sin superlativo" insert(cats, cat_pref.." sin superlativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end if irr then enc = f("#irregular#") insert(cats, cat_pref.." irregulares") end return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}, {"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end return export 6o8greu4ta9diqo535jhc3p4l1zg6t2 6123481 6123480 2026-07-24T22:38:51Z Tmagc 158167 6123481 Scribunto text/plain -- FLEXIÓN DEL LATÍN -- Adaptado desde en.wikt por Tmagc local export = {} local unpack = unpack or table.unpack local insert = table.insert local concat = table.concat local m_table = require("Módulo:tabla") local keys_to_list = m_table.keysToList local insert_if_not = m_table.insertIfNot local deep_copy = m_table.deepCopy local contains = m_table.contains local merge = m_table.merge local m_str = require("Módulo:string") local u = m_str.char local match = m_str.match local sub = m_str.sub local gsub = m_str.gsub local split = m_str.split local gsplit = m_str.gsplit local find = m_str.find local m_str_avanzado = require("Módulo:string/avanzado") local toNFD = m_str_avanzado.toNFD local toNFC = m_str_avanzado.toNFC local m_flex = require("Módulo:flex") local f = m_flex.f local f_links = m_flex.f_links local parsear_arreglo = m_flex.parsear_arreglo local separar_palabras = m_flex.separar_palabras local combinar_copulativa = m_flex.combinar_copulativa local sobreescribir_formas = m_flex.sobreescribir_formas local desactivar_formas = m_flex.desactivar_formas local agregar_enlaces = m_flex.agregar_enlaces local formatear_formas = m_flex.formatear_formas local comprobar_defectivo = m_flex.comprobar_defectivo local renderizar_tabla = m_flex.renderizar_tabla local renderizar_encabezado = m_flex.renderizar_encabezado local COLOR_H = m_flex.COLOR_H local COLOR_NP = m_flex.COLOR_NP local COLOR_IND = m_flex.COLOR_IND local COLOR_SUBJ = m_flex.COLOR_SUBJ local COLOR_IMPER = m_flex.COLOR_IMPER local MACRON = u(0x304) local BREVE = u(0x306) local DIAER = u(0x308) local DBREVE = u(0x361) local ACCENT = "[" .. MACRON .. BREVE .. DIAER .. DBREVE .. "]" local VOWEL = "[aæeioœuyAÆEIOŒUY]" local cons_to_vowel = { ["j"] = "i", ["J"] = "I", ["v"] = "u", ["V"] = "U", } local function normalizar_enlace(x) x = toNFD(x) x = gsub(x, ACCENT, "") return toNFC(x) end local function join(a, b) a, b = toNFD(a), toNFD(b) -- If the first part ends in "j" or "v", convert it to "i" or "u" unless -- the second part begins with a vowel. if not match(b, "^" .. VOWEL) then a = gsub(a, "[jvJV]$", cons_to_vowel) end return toNFC(a..b) end local function add_form(decl, slot, stem, suf) if type(slot) == "string" then slot = {slot} end for _,slt in ipairs(slot) do if type(decl[slt]) == "nil" or decl[slt] == "" then decl[slt] = {} elseif type(decl[slt]) == "string" then decl[slt] = {decl[slt]} end insert_if_not(decl[slt], join(stem, suf)) end end local function remove_forms(decl, forms) for form,_ in pairs(decl) do for _,rx in ipairs(forms) do if form:find(rx) then forms[form] = {} break end end end end local function merge_forms(forms, forms2, keys) keys = keys or forms2 for key,arr in pairs(keys) do if not forms[key] then forms[key] = {} end if type(forms2[key]) == "string" then insert_if_not(forms[key], forms2[key]) elseif type(forms2[key]) == "table" then for _,a in ipairs(forms2[key]) do insert_if_not(forms[key], a) end end end end local noun_decl = {} noun_decl["0"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = stem forms["dat_sg"] = stem forms["acc_sg"] = stem forms["abl_sg"] = stem forms["voc_sg"] = stem forms["nom_pl"] = stem forms["gen_pl"] = stem forms["dat_pl"] = stem forms["acc_pl"] = stem forms["abl_pl"] = stem forms["voc_pl"] = stem -- with locative if data.loc then forms["loc_sg"] = stem forms["loc_pl"] = stem end end local function alt_gen_pl_in_um(stem, forms, types, subtitles, i_stem) if types.genplum then add_form(forms, "gen_pl", stem, (i_stem and "i" or "") .. "um") elseif types.not_genplum then -- FIXME: not a contraction. -- insert_if_not(subtitles, "uncontracted genitive plural") end end noun_decl["1"] = function(data, args) local forms, types, loc, subtitles = data.forms, data.types, data.loc, data.subtitles local stem = args[1] -- normal 1st local nom_sg = "a" local gen_loc_sg = "ae" local dat_sg = "ae" local acc_sg = "am" local abl_sg = "ā" local voc_sg = "a" local nom_voc_pl = "ae" local gen_pl = "ārum" local dat_abl_loc_pl = "īs" local acc_pl = "ās" insert_if_not(data.title, "primera declinación") insert_if_not(data.categories, "LA:Sustantivos de la primera declinación") -- ām if types.am then nom_sg = "ām" acc_sg = "ām" abl_sg = {"ām", "ā"} voc_sg = "ām" -- all Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") --Greek Ma if types.Ma then nom_sg = "ās" acc_sg = "ān" voc_sg = "ā" -- Greek Me elseif types.Me then nom_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" -- Greek else nom_sg = "ē" gen_loc_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" end end -- ābus if types.abus then dat_abl_loc_pl = "ābus" end add_form(forms, "nom_sg", stem, nom_sg) add_form(forms, "gen_sg", stem, gen_loc_sg) add_form(forms, "dat_sg", stem, dat_sg) add_form(forms, "acc_sg", stem, acc_sg) add_form(forms, "abl_sg", stem, abl_sg) add_form(forms, "voc_sg", stem, voc_sg) add_form(forms, {"nom_pl", "voc_pl"}, stem, nom_voc_pl) add_form(forms, "gen_pl", stem, gen_pl) add_form(forms, {"dat_pl", "abl_pl"}, stem, dat_abl_loc_pl) add_form(forms, "acc_pl", stem, acc_pl) -- with locative if loc then add_form(forms, "loc_sg", stem, gen_loc_sg) add_form(forms, "loc_pl", stem, dat_abl_loc_pl) end end noun_decl["2"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "segunda declinación") insert_if_not(data.categories, "LA:Sustantivos de la segunda declinación") -- normal 2nd forms["nom_sg"] = stem1 .. "us" forms["gen_sg"] = stem1 .. "ī" forms["dat_sg"] = stem1 .. "ō" forms["acc_sg"] = stem1 .. "um" forms["abl_sg"] = stem1 .. "ō" forms["voc_sg"] = stem1 .. "e" forms["nom_pl"] = stem1 .. "ī" forms["gen_pl"] = stem1 .. "ōrum" forms["dat_pl"] = stem1 .. "īs" forms["acc_pl"] = stem1 .. "ōs" forms["abl_pl"] = stem1 .. "īs" forms["voc_pl"] = stem1 .. "ī" -- all neuter if types.N then forms["nom_sg"] = stem1 .. "um" forms["voc_sg"] = stem1 .. "um" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- neuter ium if types.ium then forms["nom_sg"] = stem1 .. "ium" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" forms["voc_sg"] = stem1 .. "ium" forms["nom_pl"] = stem1 .. "ia" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "ia" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "ia" -- neuter us, plural a elseif types.a then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- -vom (aevom, etc.) elseif types.vom then forms["nom_sg"] = stem1 .. "om" forms["acc_sg"] = stem1 .. "om" forms["voc_sg"] = stem1 .. "om" -- neuter Greek in -os (cētos) elseif types.Greek and types.us then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "os" forms["voc_sg"] = stem1 .. "os" forms["nom_pl"] = stem1 .. "ē" forms["gen_pl"] = stem1 .. "ōn" forms["acc_pl"] = stem1 .. "ē" forms["voc_pl"] = stem1 .. "ē" -- neuter Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "on" forms["acc_sg"] = stem1 .. "on" forms["voc_sg"] = stem1 .. "on" -- neuter us elseif types.us then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "ī" forms["acc_pl"] = stem1 .. "ōs" forms["voc_pl"] = stem1 .. "ī" end -- er elseif types.er then forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "ī" forms["dat_sg"] = stem2 .. "ō" forms["acc_sg"] = stem2 .. "um" forms["abl_sg"] = stem2 .. "ō" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ī" forms["gen_pl"] = stem2 .. "ōrum" forms["dat_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "ōs" forms["abl_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "ī" -- ius elseif types.ius then forms["nom_sg"] = stem1 .. "ius" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" if types.voci then -- Only for proper names and fīlius, genius forms["voc_sg"] = stem1 .. "ī" else forms["voc_sg"] = stem1 .. "ie" end forms["nom_pl"] = stem1 .. "iī" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "iōs" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "iī" -- -vos (servos, etc.) elseif types.vos then forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "om" -- Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "on" if data.num == "pl" then forms["nom_pl"] = stem1 .. "oe" forms["voc_pl"] = stem1 .. "oe" else forms["nom_pl"] = {stem1 .. "ī", stem1 .. "oe"} forms["voc_pl"] = {stem1 .. "ī", stem1 .. "oe"} end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- with -um genitive plural alt_gen_pl_in_um(stem2, forms, types, subtitles, types.ius or types.ium) -- with locative if data.loc then if types.ius or types.ium then forms["loc_sg"] = stem2 .. "iī" forms["loc_pl"] = stem2 .. "iīs" else forms["loc_sg"] = stem2 .. "ī" forms["loc_pl"] = stem2 .. "īs" end end end local acc_sg_i_stem_subtypes = { acc_im = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [abl -ī]; -- cannabis, senapis, sinapis [abl -e, -ī] acc_sg = {"im"}, title = {"accusative singular in ''-im''"}, }, acc_im_in = { -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [abl -ī]; -- Baetis, Tigris [acc -e, -ī] acc_sg = {"im", "in"}, title = {"accusative singular in ''-im'' or ''-in''"}, }, acc_im_in_em = { -- e.g. tigris, river Līris acc_sg = {"im", "in", "em"}, title = {"accusative singular in ''-im'', ''-in'' or ''-em''"}, }, acc_im_em = { acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or ''-em''"}, }, acc_im_occ_em = { -- febris, pelvis, puppis, restis, securis, turris [abl -ī, -e] acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or occasionally ''-em''"}, }, acc_em_im = { -- aqualis, clavis, lens, navis [abl -e, -ī]; -- cutis, restis [abl -e] acc_sg = {"em", "im"}, title = {"accusative singular in ''-em'' or ''-im''"}, }, } local abl_sg_i_stem_subtypes = { abl_i = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [acc -im]; -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [acc -im or -in]; -- canalis "water pipe", months in -is or -er, nouns originally i-stem adjectives such as aedilis, affinis, bipennis, familiaris, sodalis, volucris, etc. [acc -em] abl_sg = {"ī"}, title = {"ablative singular in ''-ī''"}, }, abl_i_e = { -- febris, pelvis, puppis, restis, securis, turris [acc -im, -em] abl_sg = {"ī", "e"}, title = {"ablative singular in ''-ī'' or ''-e''"}, }, abl_e_i = { -- cannabis, senapis, sinapis [acc -im]; -- Baetis, Tigris [acc -im, -in]; -- aqualis, clavis, lens, navis [acc -em, -im]; -- finis, mugilis, occiput, pugil, rus, supellex, vectis [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or ''-ī''"}, }, abl_e_occ_i = { -- amnis, anguis, avis, civis, classis, fustis, ignis, imber, orbis, pars, postis, sors, unguis, vesper [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or occasionally ''-ī''"}, }, } local function extract_stem(form, ending) local base = match(form, "^(.*)" .. ending .. "$") if not base then error("Form " .. form .. " should end in -" .. ending) end return base end local function count_vowels(stem) return select(2, toNFD(stem):gsub("[aeiouyAEIOUY]", "")) end noun_decl["3"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] -- local function non_i_stem_type() -- return (count_vowels(stem1) > count_vowels(stem2) and "parisyllabic" or "imparisyllabic") .. " non-i-stem" -- end insert_if_not(data.title, "tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") --normal 3rd forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "is" forms["dat_sg"] = stem2 .. "ī" forms["acc_sg"] = stem2 .. "em" forms["abl_sg"] = stem2 .. "e" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ēs" forms["gen_pl"] = stem2 .. "um" forms["dat_pl"] = stem2 .. "ibus" forms["acc_pl"] = stem2 .. "ēs" forms["abl_pl"] = stem2 .. "ibus" forms["voc_pl"] = stem2 .. "ēs" local acc_sg_i_stem_subtype = false local not_acc_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if acc_sg_i_stem_subtypes[subtype] then acc_sg_i_stem_subtype = true break end end for acc_sg_subtype, _ in pairs(acc_sg_i_stem_subtypes) do if types["not_" .. acc_sg_subtype] then not_acc_sg_i_stem_subtype = true break end end local abl_sg_i_stem_subtype = false local not_abl_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if abl_sg_i_stem_subtypes[subtype] then abl_sg_i_stem_subtype = true break end end for abl_sg_subtype, _ in pairs(abl_sg_i_stem_subtypes) do if types["not_" .. abl_sg_subtype] then not_abl_sg_i_stem_subtype = true break end end -- all Greek if types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") -- Greek er if types.er then stem1 = extract_stem(stem1, "ēr") forms["nom_sg"] = stem1 .. "ēr" forms["gen_sg"] = stem1 .. "eris" forms["dat_sg"] = stem1 .. "erī" forms["acc_sg"] = {stem1 .. "era", stem1 .. "erem"} forms["abl_sg"] = stem1 .. "ere" forms["voc_sg"] = stem1 .. "ēr" forms["nom_pl"] = stem1 .. "erēs" forms["gen_pl"] = stem1 .. "erum" forms["dat_pl"] = stem1 .. "eribus" forms["acc_pl"] = stem1 .. "erēs" forms["abl_pl"] = stem1 .. "eribus" forms["voc_pl"] = stem1 .. "erēs" -- Greek on elseif types.on then stem1 = extract_stem(stem1, "ōn") forms["nom_sg"] = stem1 .. "ōn" forms["gen_sg"] = {stem1 .. "ontis", stem1 .. "ontos"} forms["dat_sg"] = stem1 .. "ontī" forms["acc_sg"] = stem1 .. "onta" forms["abl_sg"] = stem1 .. "onte" forms["voc_sg"] = stem1 .. "ōn" forms["nom_pl"] = stem1 .. "ontēs" forms["gen_pl"] = {stem1 .. "ontum", stem1 .. "ontium"} forms["dat_pl"] = stem1 .. "ontibus" forms["acc_pl"] = {stem1 .. "ontēs", stem1 .. "ontās"} forms["abl_pl"] = stem1 .. "ontibus" forms["voc_pl"] = stem1 .. "ontēs" -- Greek i-stem elseif types.I then forms["gen_sg"] = {stem2 .. "is", stem2 .. "eōs", stem2 .. "ios"} forms["acc_sg"] = {stem2 .. "im", stem2 .. "in", stem2 .. "em{MED}"} forms["abl_sg"] = {stem2 .. "ī", stem2 .. "e{MED}"} forms["voc_sg"] = {stem2 .. "is", stem2 .. "i"} forms["nom_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["gen_pl"] = {stem2 .. "ium", stem2 .. "eōn"} forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["voc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} if types.poetic_esi then forms["dat_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} forms["abl_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} end -- normal Greek else forms["gen_sg"] = stem2 .. "os" if match(toNFD(stem2), "[yY]" .. ACCENT .. "*$") then forms["acc_sg"] = stem2 .. "n" else forms["acc_sg"] = stem2 .. "a" end forms["nom_pl"] = stem2 .. "es" forms["acc_pl"] = stem2 .. "as" forms["voc_pl"] = stem2 .. "es" if match(toNFD(stem1), "[iyIY]" .. ACCENT .. "*s$") then -- Per Hiley, words in -is and -ys have a poetic vocative -- without the -s, but otherwise the vocative is the same -- as the nominative. forms["voc_sg"] = {stem1, (stem1:gsub("s$", "")).."{L}"} end end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- polis if types.polis then stem1 = extract_stem(stem1, "polis") insert_if_not(data.title, "parcialmente griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "polis" forms["gen_sg"] = stem1 .. "polis" forms["dat_sg"] = stem1 .. "polī" forms["acc_sg"] = {stem1 .. "polim", stem1 .. "polin"} forms["abl_sg"] = stem1 .. "polī" forms["voc_sg"] = {stem1 .. "polis", stem1 .. "polī"} end -- all neuter if types.N then forms["acc_sg"] = stem1 -- neuter I stem if types.I then -- pure variety if types.pure then forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "ia" forms["gen_pl"] = stem2 .. "ium" forms["acc_pl"] = stem2 .. "ia" forms["voc_pl"] = stem2 .. "ia" -- non-pure variety (rare) else forms["nom_pl"] = stem2 .. "a" forms["gen_pl"] = {stem2 .. "ium", stem2 .. "um"} forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- normal neuter else forms["nom_pl"] = stem2 .. "a" forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- I stem elseif types.I or acc_sg_i_stem_subtype or abl_sg_i_stem_subtype then forms["gen_pl"] = stem2 .. "ium" -- Per Allen and Greenough, Hiley and others, the acc_pl in -īs -- applied originally to all i-stem nouns, and was current as an -- alternative form up through Caesar. forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "īs"} -- pure variety if types.pure then forms["acc_sg"] = stem2 .. "im" forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "īs" end local num = data.num for subtype, _ in pairs(types) do local acc_sg_i_stem_props = acc_sg_i_stem_subtypes[subtype] if acc_sg_i_stem_props then forms["acc_sg"] = {} for _, ending in ipairs(acc_sg_i_stem_props.acc_sg) do insert_if_not(forms["acc_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(acc_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end -- FIXME: needs to be done for neuter nouns as well. for subtype, _ in pairs(types) do local abl_sg_i_stem_props = abl_sg_i_stem_subtypes[subtype] if abl_sg_i_stem_props then forms["abl_sg"] = {} for _, ending in ipairs(abl_sg_i_stem_props.abl_sg) do insert_if_not(forms["abl_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(abl_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end end -- with locative if data.loc then -- As far as I can tell, in general both dative singular and -- ablative singular could be used for the third-declension locative, -- with different time periods preferring different forms. -- http://dcc.dickinson.edu/grammar/latin/3rd-declension-locative-case -- mentions rūrī along with either Carthāginī or Carthāgine. -- Wikipedia in https://en.wikipedia.org/wiki/Locative_case#Latin -- says this: -- -- In archaic times, the locative singular of third declension nouns -- was still interchangeable between ablative and dative forms, but in -- the Augustan Period the use of the ablative form became fixed. -- Therefore, both forms "rūrī" and "rūre" may be encountered. -- -- Lewis and Short confirm this. local loc_sg = forms["dat_sg"] if type(loc_sg) == "table" then loc_sg = deep_copy(loc_sg) else loc_sg = {loc_sg} end local abl_sg = forms["abl_sg"] if type(abl_sg) == "table" then for _, form in ipairs(abl_sg) do insert_if_not(loc_sg, deep_copy(form)) end else insert_if_not(loc_sg, abl_sg) end forms["loc_sg"] = loc_sg forms["loc_pl"] = deep_copy(forms["abl_pl"]) --The following is what we used to have, but I simply cannot believe it. --if types.Greek and not types.s then -- forms["loc_pl"] = stem2 .. "ēs" --end end end noun_decl["4"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "cuarta declinación") insert_if_not(data.categories, "LA:Sustantivos de la cuarta declinación") -- normal 4th forms["nom_sg"] = stem .. "us" forms["gen_sg"] = stem .. "ūs" forms["dat_sg"] = stem .. "uī" forms["acc_sg"] = stem .. "um" forms["abl_sg"] = stem .. "ū" forms["voc_sg"] = stem .. "us" forms["nom_pl"] = stem .. "ūs" forms["gen_pl"] = stem .. "uum" forms["dat_pl"] = stem .. "ibus" forms["acc_pl"] = stem .. "ūs" forms["abl_pl"] = stem .. "ibus" forms["voc_pl"] = stem .. "ūs" if types.echo then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end add_form(forms, "acc_sg", stem, "ōn") elseif types.Callisto then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end end -- neuter if types.N then forms["nom_sg"] = stem .. "ū̆{?}" forms["gen_sg"] = {stem .. "ūs{C}", stem .. "ū{S}"} forms["dat_sg"] = {stem .. "uī{C}", stem .. "ū{S}"} forms["acc_sg"] = stem .. "ū̆{?}" forms["voc_sg"] = stem .. "ū̆{?}" forms["nom_pl"] = stem .. "ua" forms["acc_pl"] = stem .. "ua" forms["voc_pl"] = stem .. "ua" end -- ubus if types.ubus then forms["dat_pl"] = stem .. "ubus" forms["abl_pl"] = stem .. "ubus" end -- with locative if data.loc then forms["loc_sg"] = forms["abl_sg"] forms["loc_pl"] = forms["abl_pl"] end end noun_decl["5"] = function(data, args) local forms, types = data.forms, data.types local stem = args[1] insert_if_not(data.title, "quinta declinación") insert_if_not(data.categories, "LA:Sustantivos de la quinta declinación") -- ies if types.i then stem = stem .. "i" end forms["nom_sg"] = stem .. "ēs" forms["gen_sg"] = stem .. "eī" forms["dat_sg"] = stem .. "eī" forms["acc_sg"] = stem .. "em" forms["abl_sg"] = stem .. "ē" forms["voc_sg"] = stem .. "ēs" forms["nom_pl"] = stem .. "ēs" forms["gen_pl"] = stem .. "ērum" forms["dat_pl"] = stem .. "ēbus" forms["acc_pl"] = stem .. "ēs" forms["abl_pl"] = stem .. "ēbus" forms["voc_pl"] = stem .. "ēs" -- ies if types.i then forms["gen_sg"] = stem .. "ēī" forms["dat_sg"] = stem .. "ēī" end --with locative if data.loc then forms["loc_sg"] = stem .. "ē" forms["loc_pl"] = stem .. "ēbus" end end noun_decl["sgpl"] = function(data, args) local forms = data.forms local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem1 forms["gen_sg"] = stem1 forms["dat_sg"] = stem1 forms["acc_sg"] = stem1 forms["abl_sg"] = stem1 forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 forms["gen_pl"] = stem2 forms["dat_pl"] = stem2 forms["acc_pl"] = stem2 forms["abl_pl"] = stem2 forms["voc_pl"] = stem2 -- with locative if data.loc then forms["loc_sg"] = stem1 forms["loc_pl"] = stem2 end end noun_decl["indecl"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = stem forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} -- with locative (for multiword terms) if data.loc then forms["loc_sg"] = {} forms["loc_pl"] = {} end data.num = "sg" end noun_decl["irreg"] = function(data, args) local forms, subtitles, notes = data.forms, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "irregular") insert_if_not(data.categories, "LA:Sustantivos irregulares") forms["nom_sg"] = {} forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = {} forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} if stem == "bōs" then data.decl = "3" local stem1, stem2 = "bōs", "bov" noun_decl["3"](data, {stem1, stem2}) add_form(forms, "abl_sg", stem2, "īd{†}") add_form(forms, "gen_pl", "bo", "um") add_form(forms, "gen_pl", stem2, "erum") add_form(forms, "dat_pl", "", "bōbus") add_form(forms, "dat_pl", "", "būbus") add_form(forms, "abl_pl", "", "bōbus") add_form(forms, "abl_pl", "", "būbus") elseif stem:match("^[dD]eus$") then data.decl = "2" local dD = stem:sub(1, 1) forms["nom_sg"] = dD .. "eus" forms["gen_sg"] = dD .. "eī" forms["dat_sg"] = dD .. "eō" forms["acc_sg"] = dD .. "eum" forms["abl_sg"] = dD .. "eō" forms["voc_sg"] = {dD .. "eus", dD .. "ee"} if stem == "deus" then forms["nom_pl"] = {"dī", "diī", "deī"} forms["gen_pl"] = {"deōrum", "deum"} forms["dat_pl"] = {"dīs", "diīs", "deīs"} forms["acc_pl"] = "deōs" forms["abl_pl"] = {"dīs", "diīs", "deīs"} forms["voc_pl"] = {"dī", "diī", "deī"} end elseif stem == "domus" then data.decl = "4,2" insert_if_not(data.title, "cuarta/segunda declinación") forms["nom_sg"] = "domus" forms["gen_sg"] = {"domūs", "domī"} forms["dat_sg"] = {"domuī", "domō", "domū"} forms["acc_sg"] = "domum" forms["abl_sg"] = {"domū", "domō"} forms["voc_sg"] = "domus" forms["loc_sg"] = "domī" forms["nom_pl"] = "domūs" forms["gen_pl"] = {"domuum", "domōrum"} forms["dat_pl"] = "domibus" forms["acc_pl"] = {"domūs", "domōs"} forms["abl_pl"] = "domibus" forms["voc_pl"] = "domūs" forms["loc_pl"] = {} data.loc = true elseif match(stem, "^[IÏJ]ēs[uū]" .. BREVE .. "?s$") then local ij = sub(stem, 1, 1) local uu = match(stem, "[uū]" .. BREVE .. "?") forms["nom_sg"] = stem forms["gen_sg"] = ij .. "ēsū" forms["dat_sg"] = ij .. "ēsū" forms["acc_sg"] = ij .. "ēs" .. uu .. "m" forms["abl_sg"] = ij .. "ēsū" forms["voc_sg"] = ij .. "ēsū" data.num = "sg" elseif stem == "Mōsēs" or stem == "Moesēs" or match(stem, "^M[oō]" .. BREVE .. "?[īȳ]sēs$") then local mos = sub(stem, 1, -3) forms["nom_sg"] = stem forms["gen_sg"] = {mos .. "ī", mos .. "ēī", mos .. "is", mos .. "ēn", mos .. "eōs"} forms["dat_sg"] = mos .. "ī" forms["acc_sg"] = {mos .. "ēn", mos .. "em"} forms["abl_sg"] = {mos .. "e", mos .. "ēn", mos .. "ī"} forms["voc_sg"] = {mos .. "ēs", mos .. "ē"} data.num = "sg" elseif stem:match("^[ij]ūgerum$") then data.decl = "2,3" local ij = stem:sub(1, 1) insert_if_not(data.title, "segunda/tercera declinación híbrido") forms["nom_sg"] = ij .. "ūgerum" forms["gen_sg"] = ij .. "ūgerī" forms["dat_sg"] = ij .. "ūgerō" forms["acc_sg"] = ij .. "ūgerum" forms["abl_sg"] = ij .. "ūgerō" forms["voc_sg"] = ij .. "ūgerum" forms["nom_pl"] = ij .. "ūgera" forms["gen_pl"] = ij .. "ūgerum" forms["dat_pl"] = ij .. "ūgeribus" forms["acc_pl"] = ij .. "ūgera" forms["abl_pl"] = {ij .. "ūgeribus", ij .. "ūgerīs{†}"} forms["voc_pl"] = ij .. "ūgera" elseif stem == "sūs" then data.decl = "3" forms["nom_sg"] = "sūs" forms["gen_sg"] = "suis" forms["dat_sg"] = "suī" forms["acc_sg"] = "suem" forms["abl_sg"] = "sue" forms["voc_sg"] = "sūs" forms["nom_pl"] = "suēs" forms["gen_pl"] = "suum" forms["dat_pl"] = {"suibus", "sūbus", "subus"} forms["acc_pl"] = "suēs" forms["abl_pl"] = {"suibus", "sūbus", "subus"} forms["voc_pl"] = "suēs" elseif stem == "ēthos" then data.decl = "3" insert_if_not(data.title, "tercera declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "ēthos" forms["gen_sg"] = "ētheos" forms["acc_sg"] = "ēthos" forms["voc_sg"] = "ēthos" forms["nom_pl"] = {"ēthea", "ēthē"} forms["dat_pl"] = {"ēthesi", "ēthesin"} forms["acc_pl"] = {"ēthea", "ēthē"} forms["abl_pl"] = {"ēthesi", "ēthesin"} forms["voc_pl"] = {"ēthea", "ēthē"} elseif stem == "Athōs" then data.decl = "2" insert_if_not(data.title, "segunda declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "Athōs" forms["gen_sg"] = "Athō" forms["dat_sg"] = "Athō" forms["acc_sg"] = {"Athō", "Athōn"} forms["abl_sg"] = "Athō" forms["voc_sg"] = "Athōs" data.num = "sg" elseif stem:match("^[uv]ēnum$") then data.decl = "4,2" local uv = stem:sub(1, 1) insert_if_not(data.title, "cuarta/segunda declinación, defectivo") forms["dat_sg"] = {uv .. "ēnuī", uv .. "ēnō"} forms["acc_sg"] = uv .. "ēnum" data.num = "sg" elseif stem:match("^[uv]īs$") then data.decl = "3" local uv = stem:sub(1, 1) insert_if_not(data.title, "defectivo") forms["nom_sg"] = uv .. "īs" forms["gen_sg"] = uv .. "īs" forms["dat_sg"] = uv .. "ī" forms["acc_sg"] = uv .. "im" forms["abl_sg"] = uv .. "ī" forms["voc_sg"] = uv .. "īs" forms["nom_pl"] = uv .. "īrēs" forms["gen_pl"] = uv .. "īrium" forms["dat_pl"] = uv .. "īribus" forms["acc_pl"] = {uv .. "īrēs", uv .. "īrīs"} forms["abl_pl"] = uv .. "īribus" forms["voc_pl"] = uv .. "īrēs" else error("Stem " .. stem .. " not recognized.") end end local adj_decl = {} adj_decl["0+"] = function(data, args) local forms, categories = data.forms, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = stem forms["gen_sg_m"] = stem forms["gen_pl_m"] = stem forms["dat_sg_m"] = stem forms["dat_pl_m"] = stem forms["acc_sg_m"] = stem forms["acc_pl_m"] = stem forms["abl_sg_m"] = stem forms["abl_pl_m"] = stem forms["voc_sg_m"] = stem forms["voc_pl_m"] = stem forms["loc_sg_m"] = stem forms["loc_pl_m"] = stem end adj_decl["1&2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera y segunda declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local original if types.er then local final2 = stem:sub(-2) if final2 == "er" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") elseif final2 == "ur" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") else error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem) end stem, original = args[2], stem end local us = "us" local a_sf = "a" local um = "um" local ae_gsf = "ae" local am = "am" local a_macron = "ā" local i_pl = stem .. "ī" if types.greekA or types.greekE then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") if types.greekA then us = "os" um = "on" am = "ān" else us = "os" a_sf = "ē" um = "on" ae_gsf = "ēs" am = "ēn" a_macron = "ē" end i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = original or (stem .. us) forms["nom_sg_f"] = stem .. a_sf forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_f"] = stem .. ae_gsf forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_f"] = stem .. "ae" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_f"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_f"] = stem .. am forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_f"] = stem .. a_macron forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_f"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = original or (stem .. "e") forms["voc_sg_f"] = stem .. a_sf forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" if types.ius then insert_if_not(data.title, "pronominal") --insert_if_not(subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''") forms["gen_sg_m"] = stem .. "ī̆us" forms["gen_sg_f"] = stem .. "ī̆us" forms["gen_sg_n"] = stem .. "ī̆us" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_f"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" elseif types.not_ius then insert_if_not(data.title, "no pronominal") --insert_if_not(subtitles, "with normal genitive and dative singular") end if stem == "me" then forms["voc_sg_m"] = "mī" end if types.ic then --insert_if_not(subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''") local oc = "oc" local oc_macron = "ōc" if stem == "ill" then oc = "uc" oc_macron = "ūc" end forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = stem .. oc forms["nom_pl_n"] = stem .. "aec" forms["gen_sg_m"] = stem .. "uius" forms["gen_sg_f"] = stem .. "uius" forms["gen_sg_n"] = stem .. "uius" forms["dat_sg_m"] = stem .. "uic" forms["dat_sg_f"] = stem .. "uic" forms["dat_sg_n"] = stem .. "uic" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = stem .. oc forms["acc_pl_n"] = stem .. "aec" forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. oc_macron forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} end if types.distr then if stem:sub(-1) == "n" then forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum{R}"} forms["gen_pl_f"] = {stem .. "um", stem .. "ārum{R}"} forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum{R}"} else error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem) end end forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["1-1+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") forms["nom_sg_m"] = stem .. "a" forms["nom_pl_m"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ae" forms["gen_pl_m"] = stem .. "ārum" forms["dat_sg_m"] = stem .. "ae" forms["dat_pl_m"] = stem .. "īs" forms["acc_sg_m"] = stem .. "am" forms["acc_sg_n"] = stem .. "a" forms["acc_pl_m"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ā" forms["abl_pl_m"] = stem .. "īs" forms["voc_sg_m"] = stem .. "a" forms["voc_pl_m"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["2-2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "segunda declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local us = "us" local um = "um" local i_pl = stem .. "ī" if types.greek then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") us = "os" um = "on" i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = stem .. us forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = stem .. "e" forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end local function abl_i_e(...) local function update_slot(forms, slot, f, do_copy) if not forms[slot] then return do_copy elseif do_copy then f = deep_copy(f) end forms[slot] = f return true end function abl_i_e(stem, forms, types) local f, do_copy if types["abl_e_i"] then f = {stem .. "e", stem .. "ī"} elseif types["abl_i_e"] then f = {stem .. "ī", stem .. "e"} else return end do_copy = update_slot(forms, "abl_sg_m", f, do_copy) do_copy = update_slot(forms, "abl_sg_f", f, do_copy) -- Neuter doesn't take -e with i-stems. if not types.I then update_slot(forms, "abl_sg_n", f, do_copy) end end return abl_i_e(...) end adj_decl["3-1+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) if types.par then forms["nom_pl_n"] = stem2 .. "a" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["abl_sg_m"] = stem2 .. "e" forms["abl_sg_n"] = stem2 .. "e" forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"} -- Really? forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"} -- Why does this happen? forms["acc_pl_n"] = stem2 .. "a" forms["voc_pl_n"] = stem2 .. "a" end local es_base = stem1:match("^(.-)ēs$") if es_base and es_base == stem2 then if types.greek then forms["nom_sg_n"] = {stem2 .. "ē̆s{?}"} forms["acc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_m"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["nom_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["acc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["voc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["abl_sg_m"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["abl_sg_n"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["gen_pl_m"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} forms["gen_pl_n"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Adjetivos griegos") elseif types.not_greek then insert_if_not(data.title, "no griego") end end end adj_decl["3-def+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, defectivo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = stem2 .. "ēs" forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" if types.tor then insert_if_not(data.title, "tercera declinación, solo en masculino") insert_if_not(categories, "LA:Adjetivos solo en masculino") remove_forms(forms, {"_f$", "_n$"}) forms["nom_sg_m"] = stem1 forms["gen_sg_m"] = stem2 .. "is" forms["dat_sg_m"] = stem2 .. "ī" forms["acc_sg_m"] = stem2 .. "em" forms["abl_sg_m"] = stem2 .. "e" forms["voc_sg_m"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["gen_pl_m"] = stem2 .. "um" forms["dat_pl_m"] = stem2 .. "ibus" forms["acc_pl_m"] = stem2 .. "ēs" forms["abl_pl_m"] = stem2 .. "ibus" forms["voc_pl_m"] = stem2 .. "ēs" end if types.trix then insert_if_not(data.title, "tercera declinación, solo en femenino o en neutro plural") insert_if_not(categories, "LA:Adjetivos solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en neutro") remove_forms(forms, {"_m$", "sg_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.trixf then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.idis then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = {stem2 .. "is", stem2 .. "os"} forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = {stem2 .. "em", stem2 .. "a"} forms["abl_sg_f"] = stem2 .. "e" forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} forms["gen_pl_f"] = stem2 .. "um" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = {stem2 .. "ēs", stem2 .. "as"} forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} end forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-C+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1 = args[1] local stem2 = stem1 .. "ōr" insert_if_not(data.title, "tercera declinación, comparativo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos comparativos") forms["nom_sg_m"] = stem1 .. "or" forms["nom_sg_n"] = stem1 .. "us" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "a" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 .. "us" forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} forms["acc_pl_n"] = stem2 .. "a" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 .. "or" forms["voc_sg_n"] = stem1 .. "us" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "a" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-P+"] = function(data, args) local forms, notes = data.forms, data.notes local stem2 = args[2] adj_decl["3-1+"](data, args) insert_if_not(data.title, "tercera declinación, participio") insert_if_not(data.categories, "LA:Adjetivos de la tercera declinación") forms["abl_sg_m"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["abl_sg_n"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} end adj_decl["3-2+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem = args[1] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem .. "is" forms["nom_sg_n"] = stem .. "e" forms["nom_pl_m"] = stem .. "ēs" forms["nom_pl_n"] = stem .. "ia" forms["gen_sg_m"] = stem .. "is" forms["gen_sg_n"] = stem .. "is" forms["gen_pl_m"] = stem .. "ium" forms["gen_pl_n"] = stem .. "ium" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" forms["dat_pl_m"] = stem .. "ibus" forms["dat_pl_n"] = stem .. "ibus" forms["acc_sg_m"] = stem .. "em" forms["acc_sg_n"] = stem .. "e" forms["acc_pl_m"] = {stem .. "īs", stem .. "ēs"} forms["acc_pl_n"] = stem .. "ia" forms["abl_sg_m"] = stem .. "ī" forms["abl_sg_n"] = stem .. "ī" forms["abl_pl_m"] = stem .. "ibus" forms["abl_pl_n"] = stem .. "ibus" -- abl_i_e(stem, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem .. "is" forms["voc_sg_n"] = stem .. "e" forms["voc_pl_m"] = stem .. "ēs" forms["voc_pl_n"] = stem .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-3+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con tres terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_f"] = stem2 .. "is" forms["nom_sg_n"] = stem2 .. "e" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_f"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_f"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_f"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_f"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_f"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_f"] = stem2 .. "em" forms["acc_sg_n"] = stem2 .. "e" forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_f"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_f"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_f"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" -- abl_i_e(stem2, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem1 forms["voc_sg_f"] = stem2 .. "is" forms["voc_sg_n"] = stem2 .. "e" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_f"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["indecl+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = {} forms["gen_sg_m"] = {} forms["gen_pl_m"] = {} forms["dat_sg_m"] = {} forms["dat_pl_m"] = {} forms["acc_sg_m"] = stem forms["acc_pl_m"] = {} forms["abl_sg_m"] = {} forms["abl_pl_m"] = {} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["irreg+"] = function(data,args) local forms, types, pos, notes, categories = data.forms, data.types, data.pos, data.notes, data.categories local arg1 = args[1] insert_if_not(data.title, "irregular") insert_if_not(categories, "LA:Adjetivos irregulares") if arg1 == "duo" or arg1 == "ambō" then local stem = sub(arg1, 1, -2) -- data.title = stem == "amb" and "irregular adjective" or "numeral" data.num = "pl" local stem_with_o = stem .. (stem == "amb" and "ō" or "o") forms["nom_pl_m"] = stem_with_o forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem_with_o forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_pl_m"] = stem .. "ōbus" forms["dat_pl_f"] = stem .. "ābus" forms["dat_pl_n"] = stem .. "ōbus" forms["acc_pl_m"] = {stem .. "ōs", stem_with_o} forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem_with_o forms["abl_pl_m"] = stem .. "ōbus" forms["abl_pl_f"] = stem .. "ābus" forms["abl_pl_n"] = stem .. "ōbus" forms["voc_pl_m"] = stem_with_o forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem_with_o if stem == "du" then forms["gen_pl_m"] = {forms["gen_pl_m"], "duum", "duom{†}"} forms["gen_pl_n"] = {forms["gen_pl_n"], "duum", "duom{†}"} end elseif arg1:sub(-6) == "mīlle" then insert_if_not(data.title, "numeral semiindeclinable") local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "le" forms["nom_pl_m"] = {stem .. "ia", stem .. "lia"} forms["gen_sg_m"] = stem .. "le" forms["gen_pl_m"] = {stem .. "ium", stem .. "lium"} forms["dat_sg_m"] = stem .. "le" forms["dat_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["acc_sg_m"] = stem .. "le" forms["acc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["abl_sg_m"] = stem .. "le" forms["abl_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["voc_sg_m"] = stem .. "le" forms["voc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) elseif arg1 == "ille" or arg1 == "iste" or arg1 == "ipse" or arg1 == "olle" then local stem = arg1:sub(1, -2) types.ius = true adj_decl["1&2+"](data, {stem}) insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) forms["nom_sg_m"] = arg1 if arg1 == "ipse" then add_form(forms, "nom_sg_n", stem, "ud{MED}") add_form(forms, "acc_sg_n", stem, "ud{MED}") else forms["nom_sg_n"] = stem .. "ud" forms["acc_sg_n"] = stem .. "ud" end forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} elseif arg1 == "illic" or arg1 == "istic" or arg1 == "isthic" then insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["gen_sg_m"] = stem .. "ī̆usce" forms["gen_sg_f"] = stem .. "ī̆usce" forms["gen_sg_n"] = stem .. "ī̆usce" forms["dat_sg_m"] = stem .. "īc" forms["dat_sg_f"] = stem .. "īc" forms["dat_sg_n"] = stem .. "īc" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. "ōc" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["nom_pl_m"] = stem .. "īsce" forms["nom_pl_f"] = stem .. "aec" forms["nom_pl_n"] = stem .. "aec" forms["gen_pl_m"] = stem .. "ōrunc{?}" forms["gen_pl_f"] = stem .. "ārunc{?}" forms["gen_ok_n"] = stem .. "ōrunc{?}" forms["dat_pl_m"] = stem .. "īsce" forms["dat_pl_f"] = stem .. "īsce" forms["dat_pl_n"] = stem .. "īsce" forms["acc_pl_m"] = stem .. "ōsce" forms["acc_pl_f"] = stem .. "āsce" forms["acc_pl_n"] = stem .. "aec" forms["abl_pl_m"] = stem .. "īsce" forms["abl_pl_f"] = stem .. "īsce" forms["abl_pl_n"] = stem .. "īsce" forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "hice" then insert_if_not(data.title, "demostrativo") -- .. " pronoun" forms["nom_sg_m"] = "hice" forms["nom_sg_f"] = "haece" forms["nom_sg_n"] = "hoce" forms["nom_pl_m"] = "hīce" forms["nom_pl_f"] = "haece" forms["nom_pl_n"] = "haece" forms["gen_sg_m"] = "huiusce" forms["gen_sg_f"] = "huiusce" forms["gen_sg_n"] = "huiusce" forms["gen_pl_m"] = {"hōrunce", "hōrumce"} forms["gen_pl_f"] = {"hārunce", "hārumce"} forms["gen_pl_n"] = {"hōrunce", "hōrumce"} forms["dat_sg_m"] = "huīce" forms["dat_sg_f"] = "huīce" forms["dat_sg_n"] = "huīce" forms["dat_pl_m"] = "hīsce" forms["dat_pl_f"] = "hīsce" forms["dat_pl_n"] = "hīsce" forms["acc_sg_m"] = "hunce" forms["acc_sg_f"] = "hance" forms["acc_sg_n"] = "hoce" forms["acc_pl_m"] = "hōsce" forms["acc_pl_f"] = "hāsce" forms["acc_pl_n"] = "haece" forms["abl_sg_m"] = "hōce" forms["abl_sg_f"] = "hāce" forms["abl_sg_n"] = "hōce" forms["abl_pl_m"] = "hīsce" forms["abl_pl_f"] = "hīsce" forms["abl_pl_n"] = "hīsce" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "plūs" then insert_if_not(data.title, "comparativo") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación con una terminación") data.note = "Ninguna de las formas en singular se usaron en latín clásico" forms["nom_sg_n"] = "plūs" forms["nom_pl_m"] = "plūrēs" forms["nom_pl_n"] = "plūra" forms["gen_sg_m"] = "plūris" forms["gen_sg_n"] = "plūris" forms["gen_pl_m"] = "plūrium" forms["gen_pl_n"] = "plūrium" forms["dat_sg_m"] = "plūrī" forms["dat_sg_n"] = "plūrī" forms["dat_pl_m"] = "plūribus" forms["dat_pl_n"] = "plūribus" forms["acc_sg_m"] = "plūrem" forms["acc_sg_f"] = "plūrem" forms["acc_sg_n"] = "plūs" forms["acc_pl_m"] = {"plūrēs", "plūrīs"} forms["acc_pl_n"] = "plūra" forms["abl_sg_m"] = {"plūrī", "plūre"} forms["abl_sg_f"] = {"plūrī", "plūre"} forms["abl_sg_n"] = {"plūrī", "plūre"} forms["abl_pl_m"] = "plūribus" forms["abl_pl_n"] = "plūribus" forms["voc_sg_n"] = "plūs" forms["voc_pl_m"] = "plūrēs" forms["voc_pl_n"] = "plūra" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif match(arg1, "^egō̆?$") or arg1 == "nōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "nōs" forms["gen_sg_m"] = "meī" forms["gen_pl_m"] = {"nostrī", "nostrum"} forms["dat_sg_m"] = "mihī̆" forms["dat_pl_m"] = "nōbīs" forms["acc_sg_m"] = {"mē", "mēmē"} forms["acc_pl_m"] = "nōs" forms["abl_sg_m"] = {"mē", "mēmē"} forms["abl_pl_m"] = "nōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "nōs" elseif arg1 == "tū" or arg1 == "vōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "vōs" forms["gen_sg_m"] = "tuī" forms["gen_pl_m"] = {"vestrī", "vestrum"} forms["dat_sg_m"] = "tibī̆" forms["dat_pl_m"] = "vōbīs" forms["acc_sg_m"] = {"tē", "tētē"} forms["acc_pl_m"] = "vōs" forms["abl_sg_m"] = {"tē", "tētē"} forms["abl_pl_m"] = "vōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "vōs" elseif arg1 == "suī" then insert_if_not(data.title, "pronombre reflexivo") forms["nom_sg_m"] = {} forms["nom_pl_m"] = {} forms["gen_sg_m"] = arg1 forms["gen_pl_m"] = forms["gen_sg_m"] forms["dat_sg_m"] = "sibī̆" forms["dat_pl_m"] = forms["dat_sg_m"] forms["acc_sg_m"] = {"sē", "sēsē"} forms["acc_pl_m"] = {"sē", "sēsē"} forms["abl_sg_m"] = {"sē", "sēsē"} forms["abl_pl_m"] = {"sē", "sēsē"} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} elseif arg1 == "is" or arg1 == "īdem" then insert_if_not(data.title, "pronombre demostrativo") forms["nom_sg_m"] = "is" forms["nom_sg_f"] = "ea" forms["nom_sg_n"] = "id" forms["nom_pl_m"] = {"iī", "eī", "ī"} forms["nom_pl_f"] = "eae" forms["nom_pl_n"] = "ea" forms["gen_sg_m"] = {"eius", "ejus"} forms["gen_sg_f"] = {"eius", "ejus"} forms["gen_sg_n"] = {"eius", "ejus"} forms["gen_pl_m"] = {"eōrum", "eum"} forms["gen_pl_f"] = "eārum" forms["gen_pl_n"] = {"eōrum", "eum"} forms["dat_sg_m"] = {"eī", "e͡i", "ēī"} forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"} forms["dat_sg_n"] = {"eī", "e͡i", "ēī"} forms["dat_pl_m"] = {"iīs", "eīs", "īs"} forms["dat_pl_f"] = {"iīs", "eīs", "īs", "eābus"} forms["dat_pl_n"] = {"iīs", "eīs", "īs"} forms["acc_sg_m"] = "eum" forms["acc_sg_f"] = "eam" forms["acc_sg_n"] = "id" forms["acc_pl_m"] = "eōs" forms["acc_pl_f"] = "eās" forms["acc_pl_n"] = "ea" forms["abl_sg_m"] = "eō" forms["abl_sg_f"] = "eā" forms["abl_sg_n"] = "eō" forms["abl_pl_m"] = {"iīs", "eīs", "īs"} forms["abl_pl_f"] = {"iīs", "eīs", "īs"} forms["abl_pl_n"] = {"iīs", "eīs", "īs"} if arg1 == "īdem" then forms["nom_sg_m"] = "ī" forms["nom_sg_n"] = "i" forms["acc_sg_n"] = "i" end elseif arg1 == "quis" or arg1 == "quī" then data.note = "La forma ''qua'' es preferida frente a ''quae'' cuando se usa como indefinido" local id = "id" if arg1 == "quī" then insert_if_not(data.title, "determinante relativo/interrogativo") id = "od" forms["nom_sg_m"] = {"quī", "quis", "quei{†}"} forms["nom_sg_f"] = {"quae", "qua"} forms["acc_sg_f"] = "quam" forms["abl_sg_m"] = "quō" forms["abl_sg_f"] = "quā" forms["abl_sg_n"] = "quō" else insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = {"quis", "quī"} forms["nom_sg_f"] = {"quae", "qua", "quis{†}"} forms["acc_sg_f"] = {"quam", "quem{†}"} forms["abl_sg_m"] = {"quō", "quī"} forms["abl_sg_f"] = {"quā", "quī"} forms["abl_sg_n"] = {"quō", "quī"} end forms["nom_sg_n"] = "qu"..id forms["nom_pl_m"] = {"quī", "quei{†}"} forms["nom_pl_f"] = "quae" forms["nom_pl_n"] = {"quae", "qua"} forms["gen_sg_m"] = {"cuius", "quoius{†}"} forms["gen_sg_f"] = {"cuius", "quoius{†}"} forms["gen_sg_n"] = {"cuius", "quoius{†}"} forms["gen_pl_m"] = "quōrum" forms["gen_pl_f"] = "quārum" forms["gen_pl_n"] = "quōrum" forms["dat_sg_m"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_f"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_n"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_n"] = {"quibus", "quīs", "queis{†}"} forms["acc_sg_m"] = "quem" forms["acc_sg_n"] = "qu"..id forms["acc_pl_m"] = "quōs" forms["acc_pl_f"] = "quās" forms["acc_pl_n"] = {"quae", "qua"} forms["abl_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_n"] = {"quibus", "quīs", "queis{†}"} elseif arg1 == "aliquī" then insert_if_not(data.title, "determinante indefinido") forms["nom_sg_m"] = {"aliquī{DET/ADJ}", "aliquis{PRON/SUST}"} forms["nom_sg_f"] = {"aliqua", "aliquae{R}"} forms["nom_sg_n"] = "aliquod" forms["nom_pl_m"] = "aliquī" forms["nom_pl_f"] = "aliquae" forms["nom_pl_n"] = "aliqua" forms["gen_sg_m"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_f"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_n"] = {"alicuius", "aliquoius{†}"} forms["gen_pl_m"] = "aliquōrum" forms["gen_pl_f"] = "aliquārum" forms["gen_pl_n"] = "aliquōrum" forms["dat_sg_m"] = {"alicui", "aliquoi{†}"} forms["dat_sg_f"] = {"alicui", "aliquoi{†}"} forms["dat_sg_n"] = {"alicui", "aliquoi{†}"} forms["dat_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["acc_sg_m"] = "aliquem" forms["acc_sg_f"] = "aliquam" forms["acc_sg_n"] = "aliquod" forms["acc_pl_m"] = "aliquōs" forms["acc_pl_f"] = "aliquās" forms["acc_pl_n"] = "aliqua" forms["abl_sg_m"] = "aliquō" forms["abl_sg_f"] = "aliquā" forms["abl_sg_n"] = "aliquō" forms["abl_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} elseif arg1 == "quisquam" then insert_if_not(data.title, "determinante indefinido, concordancia en negativo") data.note = "En latín clásico, era preferidas las formas de ''ūllus'' en lugar de las esta voz para el femenino y el neutro." forms["nom_sg_m"] = "quisquam" forms["nom_sg_f"] = {"quaequam", "quisquam{†}"} forms["nom_sg_n"] = "quodquam" forms["nom_pl_m"] = "quīquam" forms["nom_pl_f"] = "quaequam" forms["nom_pl_n"] = "quaequam" forms["gen_sg_m"] = "cuiusquam" forms["gen_sg_f"] = "cuiusquam" forms["gen_sg_n"] = "cuiusquam" forms["gen_pl_m"] = "quōrumquam" forms["gen_pl_f"] = "quārumquam" forms["gen_pl_n"] = "quōrumquam" forms["dat_sg_m"] = "cuiquam" forms["dat_sg_f"] = "cuiquam" forms["dat_sg_n"] = "cuiquam" forms["dat_pl_m"] = "quibusquam" forms["dat_pl_f"] = "quibusquam" forms["dat_pl_n"] = "quibusquam" forms["acc_sg_m"] = "quemquam" forms["acc_sg_f"] = {"quamquam", "quemquam{†}"} forms["acc_sg_n"] = "quodquam" forms["acc_pl_m"] = "quōsquam" forms["acc_pl_f"] = "quāsquam" forms["acc_pl_n"] = "quaequam" forms["abl_sg_m"] = {"quōquam", "quīquam{†}"} forms["abl_sg_f"] = "quāquam" forms["abl_sg_n"] = "quōquam" forms["abl_pl_m"] = "quibusquam" forms["abl_pl_f"] = "quibusquam" forms["abl_pl_n"] = "quibusquam" forms["voc_sg_m"] = "quisquam" forms["voc_sg_f"] = "quaequam" forms["voc_sg_n"] = "quodquam" forms["voc_pl_m"] = "quīquam" forms["voc_pl_f"] = "quaequam" forms["voc_pl_n"] = "quaequam" elseif arg1 == "quisquis" then insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = "quisquis" forms["nom_sg_f"] = "quisquis" forms["nom_sg_n"] = {"quidquid", "quicquid"} forms["nom_pl_m"] = "quīquī" forms["nom_pl_f"] = "quaequae" forms["nom_pl_n"] = "quaequae" forms["gen_sg_m"] = "cuiuscuius" forms["gen_sg_f"] = "cuiuscuius" forms["gen_sg_n"] = "cuiuscuius" forms["gen_pl_m"] = "quōrumquōrum" forms["gen_pl_f"] = "quārumquārum" forms["gen_pl_n"] = "quōrumquōrum" forms["dat_sg_m"] = "cuicui" forms["dat_sg_f"] = "cuicui" forms["dat_sg_n"] = "cuicui" forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"} forms["acc_sg_m"] = "quemquem" forms["acc_sg_f"] = "quamquam" forms["acc_sg_n"] = {"quidquid", "quicquid"} forms["acc_pl_m"] = "quōsquōs" forms["acc_pl_f"] = "quāsquās" forms["acc_pl_n"] = "quaequae" forms["abl_sg_m"] = "quōquō" forms["abl_sg_f"] = "quāquā" forms["abl_sg_n"] = "quōquō" forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"} forms["voc_sg_m"] = "quisquis" forms["voc_sg_f"] = "quisquis" forms["voc_sg_n"] = {"quidquid", "quicquid"} forms["voc_pl_m"] = "quīquī" forms["voc_pl_f"] = "quaequae" forms["voc_pl_n"] = "quaequae" elseif arg1 == "ecquis" then insert_if_not(data.title, "pronombre interrogativo") forms["nom_sg_m"] = {"ecquis", "ecquī"} forms["nom_sg_f"] = {"ecqua", "ecquae"} forms["nom_sg_n"] = "ecquid" forms["nom_pl_m"] = "ecquī" forms["nom_pl_f"] = "ecquae" forms["nom_pl_n"] = {"ecqua", "ecquae"} forms["gen_sg_m"] = "eccuius" forms["gen_sg_f"] = "eccuius" forms["gen_sg_n"] = "eccuius" forms["dat_sg_m"] = "eccui" forms["dat_sg_f"] = "eccui" forms["dat_sg_n"] = "eccui" forms["acc_sg_m"] = "ecquem" forms["acc_sg_f"] = "ecquam" forms["acc_sg_n"] = "ecquod" forms["acc_pl_m"] = "ecquōs" forms["acc_pl_f"] = "ecquās" forms["acc_pl_n"] = {"ecqua", "ecquae"} forms["abl_sg_m"] = {"ecquō", "ecquī"} forms["abl_sg_f"] = {"ecquā", "ecquī"} forms["abl_sg_n"] = {"ecquō", "ecquī"} elseif arg1 == "quīdam" then insert_if_not(data.title, "pronombre indefinido") forms["nom_sg_m"] = "quīdam" forms["nom_sg_f"] = "quaedam" forms["nom_sg_n"] = "quiddam" forms["nom_pl_m"] = {"quīdam", "quēsdam{†}"} forms["nom_pl_f"] = "quaedam" forms["nom_pl_n"] = "quaedam" forms["gen_sg_m"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_f"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_n"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_pl_m"] = {"quōrundam", "quōrumdam"} forms["gen_pl_f"] = {"quārundam", "quārumdam"} forms["gen_pl_n"] = {"quōrundam", "quōrumdam"} forms["dat_sg_m"] = {"cuidam", "quoidam{†}"} forms["dat_sg_f"] = {"cuidam", "quoidam{†}"} forms["dat_sg_n"] = {"cuidam", "quoidam{†}"} forms["dat_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_n"] = {"quibusdam", "quīsdam{†}"} forms["acc_sg_m"] = {"quendam", "quemdam"} forms["acc_sg_f"] = {"quandam", "quamdam"} forms["acc_sg_n"] = "quiddam" forms["acc_pl_m"] = {"quōsdam", "quēsdam{†}"} forms["acc_pl_f"] = "quāsdam" forms["acc_pl_n"] = "quaedam" forms["abl_sg_m"] = "quōdam" forms["abl_sg_f"] = "quādam" forms["abl_sg_n"] = "quōdam" forms["abl_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_n"] = {"quibusdam", "quīsdam{†}"} elseif arg1 == "nēmō" then insert_if_not(data.title, "Determinante y pronombre, concordancia en negativo") forms["nom_sg_m"] = "nēmō" forms["nom_sg_f"] = "nēmō" forms["gen_sg_m"] = {"nūllī̆us", "nēminis{R}"} forms["gen_sg_f"] = {"nūllī̆us", "nēminis{R}"} forms["dat_sg_m"] = "nēminī" forms["dat_sg_f"] = "nēminī" forms["acc_sg_m"] = "nēminem" forms["acc_sg_f"] = "nēminem" forms["abl_sg_m"] = {"nūllō", "nēmine{R}"} forms["abl_sg_f"] = {"nūllā", "nēmine{R}"} else error('adjective ' .. arg1 .. ' not recognized') end end local function extract_base(lemma, ending) if ending:find("(", nil, true) then return match(lemma, ending) end return match(lemma, "^(.*)" .. ending .. "$") end local function get_noun_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local subtypes = ending_and_subtypes[2] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. -- In addition, M or F as a subtype is canceled by N, and -- vice-versa, but M doesn't cancel F or vice-versa; instead, -- we simply ignore the conflicting gender specification when -- constructing the combination of specified and inferred subtypes. -- The reason for this is that neuters have distinct declensions -- from masculines and feminines, but masculines and feminines have -- the same declension, and various nouns in Latin that are -- normally masculine are exceptionally feminine and vice-versa -- (nauta, agricola, fraxinus, malus "apple tree", manus, rēs, -- etc.). -- -- In addition, sg as a subtype is canceled by pl and vice-versa. -- It's also possible to specify both, which will override sg but -- not cancel it (in the sense that it won't prevent the relevant -- rule from matching). For example, there's a rule specifying that -- lemmas beginning with a capital letter and ending in -ius take -- the ius.voci.sg subtypes. Specifying such a lemma with the -- subtype both will result in the ius.voci.both subtypes, whereas -- specifying such a lemma with the subtype pl will cause this rule -- not to match, and it will fall through to a less specific rule -- that returns just the ius subtype, which will be combined with -- the explicitly specified pl subtype to produce ius.pl. if specified_subtypes["-" .. subtype] or subtype == "N" and (specified_subtypes.M or specified_subtypes.F) or (subtype == "M" or subtype == "F") and specified_subtypes.N or subtype == "sg" and specified_subtypes.pl or subtype == "pl" and specified_subtypes.sg then not_this_subtype = true break end end end if not not_this_subtype then if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] local base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending == stem2 then return base, stem2, subtypes end else local base = extract_base(lemma, ending) if base then return base, stem2, subtypes end end end end if decltype then error("Unrecognized ending for declension-" .. decltype .. " noun: " .. lemma) end return lemma, stem2, keys_to_list(specified_subtypes) end local patterns = { {"[mM]a", "%0t"}, {"e", ""}, {"([aoAO])([lr])", "%1" .. MACRON .. "%2"}, {"[eE]l", "%0l"}, {"([mM])en", "%1in"}, {"([tT]ūd)ō", "%1in"}, {"([gG])ō", "%1in"}, {"[ōŌ]", "%1n"}, {"er", "r"}, {"[ēi]s", ""}, {"([āēīōūȳĀĒĪŌŪȲ]n)s", function(v) return (gsub(toNFD(v), MACRON, "") .. "t") end}, {"([cC])eps", "%1ipit"}, {"([bp])s", "%1"}, {"us", "or"}, {"s", "t"}, {"ex", "ic"}, {"x", "c"}, } local function make_stem2(stem) local n for _, pattern in ipairs(patterns) do local key = pattern[1] stem, n = gsub(stem, key .. "$", pattern[2]) if n > 0 then -- debug_track("la-utilities/" .. key) REVISAR return toNFC(stem) end end -- debug_track("la-utilities") REVISAR return stem end local function detect_noun_subtype(lemma, stem2, typ, subtypes) local base, _ if typ == "1" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ām", {"F", "am"}}, {"ās", {"M", "Greek", "Ma"}}, {"ēs", {"M", "Greek", "Me"}}, {"ē", {"F", "Greek"}}, {"ae", {"F", "pl"}}, {"a", {"F"}}, }) elseif typ == "2" then local detected_subtypes lemma, stem2, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(.*r)$", {"M", "er"}}, {"^(.*v)os$", {"M", "vos"}}, {"^(.*v)om$", {"N", "vom"}}, -- If the lemma ends in -os and the user said N or -M, then the -- following won't apply, and the second (neuter) -os will applly. {"os", {"M", "Greek"}}, {"os", {"N", "Greek", "us"}}, {"on", {"N", "Greek"}}, -- -ius beginning with a capital letter is assumed a proper name, -- and takes the voci subtype (vocative in -ī) along with the ius -- subtype and sg-only. Other nouns in -ius just take the ius -- subtype. Explicitly specify "sg" so that if .pl is given, -- this rule won't apply. {"^(%u.*)ius$", {"M", "ius", "voci", "sg"}}, {"ius", {"M", "ius"}}, {"ium", {"N", "ium"}}, -- If the lemma ends in -us and the user said N or -M, then the -- following won't apply, and the second (neuter) -us will applly. {"us", {"M"}}, {"us", {"N", "us"}}, {"um", {"N"}}, {"iī", {"M", "ius", "pl"}}, {"ia", {"N", "ium", "pl"}}, -- If the lemma ends in -ī and the user said N or -M, then the -- following won't apply, and the second (neuter) -ī will applly. {"ī", {"M", "pl"}}, {"ī", {"N", "us", "pl"}}, {"oe", {"M", "Greek", "pl"}}, {"a", {"N", "pl"}}, }) stem2 = stem2 or lemma return lemma, stem2, detected_subtypes elseif typ == "3" then if subtypes.pl then if subtypes.Greek then base = lemma:match("^(.*)erēs$") if base then return base .. "ēr", base .. "er", {"er"} end base = lemma:match("^(.*)ontēs$") if base then return base .. "ōn", base .. "ont", {"on"} end base = lemma:match("^(.*)es$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural Greek noun: " .. lemma) end base = lemma:match("^(.*)ia$") if base then return base, stem2 or base, {"N", "I", "pure"} end base = lemma:match("^(.*)a$") if base then return base, stem2 or base, {"N"} end base = lemma:match("^(.*)ēs$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural noun: " .. lemma) end stem2 = stem2 or make_stem2(lemma) local detected_subtypes if subtypes.Greek then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"is", ""}, {"I"}}, {"ēr", {"er"}}, {"ōn", {"on"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} end if not subtypes.N then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"^(%u.*pol)is$", ""}, {"F", "polis", "sg", "loc"}}, {{"tūdō", "tūdin"}, {"F"}}, {{"tās", "tāt"}, {"F"}}, {{"tūs", "tūt"}, {"F"}}, {{"tiō", "tiōn"}, {"F"}}, {{"siō", "siōn"}, {"F"}}, {{"xiō", "xiōn"}, {"F"}}, {{"gō", "gin"}, {"F"}}, {{"or", "ōr"}, {"M"}}, {{"tr[iī]x", "trīc"}, {"F"}}, {{"is", ""}, {"I"}}, {{"^(%l.*)ēs$", ""}, {"I"}}, }) if base then return lemma, stem2, detected_subtypes end end base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"us", "or"}, {"N"}}, {{"us", "er"}, {"N"}}, {{"ma", "mat"}, {"N"}}, {{"men", "min"}, {"N"}}, {{"^(%u.*)e$", ""}, {"N", "sg"}}, {{"e", ""}, {"N", "I", "pure"}}, {{"al", "āl"}, {"N", "I", "pure"}}, {{"ar", "ār"}, {"N", "I", "pure"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} elseif typ == "4" then if subtypes.echo or subtypes.Callisto then base = lemma:match("^(.*)ō$") if not base then error("Declension-4 noun of subtype .echo or .Callisto should end in -ō: " .. lemma) end if subtypes.Callisto then return base, nil, {"F", "sg"} else return base, nil, {"F"} end end return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", {"M"}}, {"ū̆", {"N"}}, {"ūs", {"M", "pl"}}, {"ua", {"N", "pl"}}, }) elseif typ == "5" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"iēs", {"F", "i"}}, {"iēs", {"F", "i", "pl"}}, {"ēs", {"F"}}, {"ēs", {"F", "pl"}}, }) elseif typ == "sgpl" then return lemma, stem2, {} elseif typ == "irreg" and lemma == "domus" then -- [[domus]] auto-sets data.loc = true, but we need to know this -- before declining the noun so we can propagate it to other segments. return lemma, nil, {"loc"} elseif typ == "indecl" or typ == "irreg" and ( lemma == "Deus" or match(lemma, "^[IJ]ēs[uū]s$") or lemma == "Athōs" or lemma == "vēnum" ) then -- Indeclinable nouns, and certain irregular nouns, set data.num = "sg", -- but we need to know this before declining the noun so we can -- propagate it to other segments. return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", {"both"}}, {"", {"sg"}}, {"", {"pl"}}, }) elseif typ == "indecl" or typ == "irreg" then return lemma, nil, {} else return nil, nil, {} end end -- Given ENDINGS_AND_SUBTYPES (a list of four-tuples of ENDING, RETTYPE, -- SUBTYPES, PROCESS_RETVAL), check each ENDING in turn against LEMMA and -- STEM2. If it matches, return a four-tuple BASE, STEM2, RETTYPE, NEW_SUBTYPES -- where BASE is normally the remainder of LEMMA minus the ending, STEM2 is -- as passed in, RETTYPE is as passed in, and NEW_SUBTYPES is the same as -- SUBTYPES minus any subtypes beginning with a hyphen. If no endings match, -- throw an error if DECLTYPPE is non-nil, mentioning the DECLTYPE -- (user-specified declension); but if DECLTYPE is nil, just return the tuple -- nil, nil, nil, nil. -- -- In order for a given entry to match, ENDING must match and also the subtypes -- in SUBTYPES (a list) must not be incompatible with the passed-in -- user-specified subtypes SPECIFIED_SUBTYPES (a set, i.e. a table where the -- keys are strings and the value is always true). "Incompatible" means that -- a given SUBTYPE is specified in either one and -SUBTYPE in the other, or -- that "pl" is found in SPECIFIED_SUBTYPES and not in SUBTYPES. -- -- The ending spec in ENDINGS_AND_SUBTYPES is one of the following: -- -- 1. A simple string, e.g. "tūdō", specifying an ending. -- 2. A regex that should match the entire lemma (it should be anchored at -- the beginning with ^ and at the end with $), and contains a single -- capturing group to match the base. -- 3. A pair {SIMPLE_STRING_OR_REGEX, STEM2_ENDING} where -- SIMPLE_STRING_OR_REGEX is one of the previous two possibilities and -- STEM2_ENDING is a string specifying the corresponding ending that must -- be present in STEM2. If this form is used, the combination of -- base + STEM2_ENDING must exactly match STEM2 in order for this entry -- to be considered a match. An example is {"is", ""}, which will match -- lemma == "follis", stem2 == "foll", but not lemma == "lapis", -- stem2 == "lapid". -- -- If PROCESS_STEM2 is given and the returned STEM2 would be nil, call -- process_stem2(BASE) to get the STEM2 to return. local function get_adj_type_and_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes, process_stem2) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local rettype = ending_and_subtypes[2] local subtypes = ending_and_subtypes[3] local process_retval = ending_and_subtypes[4] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. if specified_subtypes["-" .. subtype] then not_this_subtype = true break end -- A subtype is canceled if the user specified SUBTYPE and -- -SUBTYPE is given in the to-be-returned subtypes. local must_not_be_present = subtype:match("^%-(.*)$") if must_not_be_present and specified_subtypes[must_not_be_present] then not_this_subtype = true break end end end if not not_this_subtype then local base if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending ~= stem2 then base = nil end else base = extract_base(lemma, ending) end if base then -- Remove subtypes of the form -SUBTYPE from the subtypes -- to be returned. local new_subtypes = {} for _, subtype in ipairs(subtypes) do if subtype:sub(1, 1) ~= "-" then insert(new_subtypes, subtype) end end if process_retval then base, stem2 = process_retval(base, stem2) end if process_stem2 then stem2 = stem2 or process_stem2(base) end return base, stem2, rettype, new_subtypes end end end if not decltype then return lemma, stem2, nil, keys_to_list(specified_subtypes) elseif decltype == "" then error("Unrecognized ending for adjective: " .. lemma) else error("Unrecognized ending for declension-" .. decltype .. " adjective: " .. lemma) end end -- Autodetect the type and subtype of an adjective given all the information -- specified by the user: lemma, stem2, declension type and specified subtypes. -- Four values are returned: the lemma base (i.e. the stem of the lemma, as -- required by the declension functions), the value of stem2 to pass to the -- declension function, the declension type and the autodetected subtypes. -- Note that this will not detect a given subtype if -SUBTYPE is specified for -- any subtype that would be returned, or if SUBTYPE is specified and -SUBTYPE -- is among the subtypes that would be returned (such subtypes are filtered out -- of the returned subtypes). local function detect_adj_type_and_subtype(lemma, stem2, typ, subtypes) local function base_as_stem2(base, stem2) return base, base end local function constant_base(baseval) return function(base, stem2) return baseval, nil end end local function decl12_stem2(base) return base end local function decl3_stem2(base) return make_stem2(base) end local decl12_entries = { {"us", "1&2+", {}}, {"a", "1&2+", {}}, {"um", "1&2+", {}}, {"ī", "1&2+", {"pl"}}, {"ae", "1&2+", {"pl"}}, {"a", "1&2+", {"pl"}}, -- Nearly all -os adjectives are greekA {"os", "1&2+", {"greekA", "-greekE"}}, {"os", "1&2+", {"greekE", "-greekA"}}, {"ē", "1&2+", {"greekE", "-greekA"}}, {"on", "1&2+", {"greekA", "-greekE"}}, {"on", "1&2+", {"greekE", "-greekA"}}, {"^(.*er)$", "1&2+", {"er"}}, {"^(.*ur)$", "1&2+", {"er"}}, {"^(h)ic$", "1&2+", {"ic"}}, } local decl3_entries = { {"^(.*er)$", "3-3+", {"I"}}, {"^(.*er)$", "3-3+", {}}, {"is", "3-2+", {"I"}}, {"is", "3-2+", {}}, {"e", "3-2+", {"I"}}, {"e", "3-2+", {}}, {"^(.*[ij])or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(.*[ij])or$", "3-C+", {}}, {"^(min)or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(min)or$", "3-C+", {}}, {"^(.*trīx)$", "3-def+", {"trix", "abl_i_e", "-abl_e_i"}}, {"^(.*trīx)$", "3-def+", {"trix"}}, {"^(.*tor)$", "3-def+", {"tor", "abl_i_e", "-abl_e_i"}}, {"^(.*tor)$", "3-def+", {"tor"}}, -- Detect -ēs as 3-1 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like quadripēs, volucripēs). -- Essentially, for declension-3 adjectives, we require that -- .pl is given if the lemma is plural. -- -- Most 3-1 adjectives are i-stem (e.g. audāx) so we require -I -- to be given with non-i-stem adjectives. The first entry below -- will apply when -I isn't given, the second when it is given. {"^(.*ēs)$", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"I"}}, {"^(.*ēs)$", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"par"}}, {"^(.*[ij])ōrēs$", "3-C+", {"pl"}}, {"^(min)ōrēs$", "3-C+", {"pl"}}, -- If .pl with -ēs, we don't know if the adjective is 3-1, 3-2 -- or 3-3. Since 3-2 is probably the most common, we infer it -- (as well as the fact that these adjectives *are* in a sense -- 3-2 since they have a distinct neuter in -(i)a. Note that -- we have two entries here; the first one will apply unless -- -I is given, and will infer an i-stem adjective; the second -- one will apply otherwise (and infer a non-i-stem 3-1 adjective). {"ēs", "3-2+", {"pl", "I"}, base_as_stem2}, {"ēs", "3-1+", {"pl", "par"}, base_as_stem2}, -- Same for neuters. {"ia", "3-2+", {"pl", "I"}, base_as_stem2}, {"a", "3-1+", {"pl", "par"}, base_as_stem2}, -- As above for -ēs but for miscellaneous singulars. {"", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"I"}}, {"", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"par"}}, } local function get_subtypes_and_endings(typ, f) local subtypes_and_endings = {} for _, v in ipairs(decl3_entries) do if f(v) then v = deep_copy(v) v[2] = typ insert(subtypes_and_endings, v) end end return subtypes_and_endings end local function compare(spec) return spec[2] == typ end if typ == "+" then local base, new_stem2, rettype, new_subtypes = get_adj_type_and_subtype_by_ending(lemma, stem2, nil, subtypes, decl12_entries, decl12_stem2) if rettype then return base, new_stem2, rettype, new_subtypes else return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) end elseif typ == "3+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) elseif typ == "1&2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl12_entries, decl12_stem2) elseif typ == "1-1+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"a", typ, {}}, {"ae", typ, {"pl"}}, }) elseif typ == "2-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", typ, {}}, {"um", typ, {}}, {"ī", typ, {"pl"}}, {"a", typ, {"pl"}}, {"os", typ, {"greek"}}, {"on", typ, {"greek"}}, {"oe", typ, {"greek", "pl"}}, }) elseif typ == "3-1+" then -- Use the specs from `decl3_entries`, but add the two i-stem 3-2+ specs when plural-only, as they're the same when 3-1+. local subtypes_and_endings = get_subtypes_and_endings(typ, function(spec) local spec1, spec2 = spec[1], spec[2] return spec2 == typ or (spec2 == "3-2+" and spec1 == "ēs" or spec1 == "ia") end) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-def+" then -- Like 3-1+ but defective in gender local subtypes_and_endings = get_subtypes_and_endings(typ, compare) insert(subtypes_and_endings, {"", typ, {"I"}}) insert(subtypes_and_endings, {"", typ, {"par"}}) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"is", typ, {}}, {"e", typ, {}}, -- Detect -ēs as 3-2 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like isoscelēs). Essentially, -- for declension-3 adjectives, we require that .pl is given -- if the lemma is plural. {"ēs", typ, {}}, {"ēs", typ, {"pl"}}, {"ia", typ, {"pl"}}, }, decl3_stem2) elseif typ == "3-3+" or typ == "3-P+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ēs", typ, {"pl"}, base_as_stem2}, {"ia", typ, {"pl"}, base_as_stem2}, {"", typ, {}}, }, decl3_stem2) elseif typ == "3-C+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, get_subtypes_and_endings(typ, compare), decl3_stem2) elseif typ == "irreg+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(duo)$", typ, {"pl"}}, {"^(ambō)$", typ, {"pl"}}, {"^(mīll?ia)$", typ, {"N", "pl"}, constant_base("mīlle")}, -- match ea {"^(ea)$", typ, {}, constant_base("is")}, -- match id {"^(id)$", typ, {}, constant_base("is")}, -- match plural eī, iī {"^([ei]ī)$", typ, {"pl"}, constant_base("is")}, -- match plural ea, eae {"^(eae?)$", typ, {"pl"}, constant_base("is")}, -- match eadem {"^(eadem)$", typ, {}, constant_base("īdem")}, -- match īdem, idem {"^([īi]dem)$", typ, {}, constant_base("īdem")}, -- match plural īdem {"^(īdem)$", typ, {"pl"}}, -- match plural eadem, eaedem {"^(eae?dem)$", typ, {"pl"}, constant_base("īdem")}, -- match illa, ipsa, ista; it doesn't matter if we overmatch because -- we'll get an error as we use the stem itself in the returned base {"^(i[lps][lst])a$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match illud, istud; as above, it doesn't matter if we overmatch {"^(i[ls][lt])ud$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match ipsum {"^(ipsum)$", typ, {}, constant_base("ipse")}, -- match plural illī, ipsī, istī; as above, it doesn't matter if we -- overmatch {"^(i[lps][lst])ī$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- match plural illa, illae, ipsa, ipsae, ista, istae; as above, it -- doesn't matter if we overmatch {"^(i[lps][lst])ae?$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- Detect quī as non-plural unless .pl specified. {"^(quī)$", typ, {}}, -- Otherwise detect quī as plural. {"^(quī)$", typ, {"pl"}}, -- Same for quae. {"^(quae)$", typ, {}, constant_base("quī")}, {"^(quae)$", typ, {"pl"}, constant_base("quī")}, {"^(quid)$", typ, {}, constant_base("quis")}, {"^(quod)$", typ, {}, constant_base("quī")}, {"^(qui[cd]quid)$", typ, {}, constant_base("quisquis")}, {"^(quīquī)$", typ, {"pl"}, constant_base("quisquis")}, {"^(quaequae)$", typ, {"pl"}, constant_base("quisquis")}, -- match all remaining lemmas in lemma form {"", typ, {}}, }) elseif typ == "indecl+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", typ, {"both"}}, {"", typ, {"sg"}}, {"", typ, {"pl"}}, }) else -- 0+ return lemma, nil, typ, {} end end local noun_lb = { nom_sg = "sg.", gen_sg = "sg.", dat_sg = "sg.", acc_sg = "sg.", abl_sg = "sg.", voc_sg = "sg.", loc_sg = "sg.", nom_pl = "pl.", gen_pl = "pl.", dat_pl = "pl.", acc_pl = "pl.", abl_pl = "pl.", voc_pl = "pl.", loc_pl = "pl." } function export.sust(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de = "num"}, ["nota"] = {}, } for form,_ in pairs(noun_lb) do params[form] = {lista=true} end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local genero local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, detected_subtypes = detect_noun_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end if not genero then if types.M then genero = "m" end if types.N then genero = "n" end if types.F then genero = "f" end end local es_adj if not r1 and genero then local typ r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) if r1 then c = typ es_adj = true end end assert(r1, "forma no reconocida: "..r[1]) local cb = es_adj and adj_decl[c] or noun_decl[c] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) if es_adj then local forms_ = {} for form,arr in pairs(data.forms) do local f1, f2 = form:match("^(.*)(_"..genero..")$") if f1 then forms_[f1] = arr end end data.forms = forms_ end if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, noun_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if declinfo["loc_sg"] and #declinfo["loc_sg"] == 0 then declinfo["loc_sg"] = nil end if declinfo["loc_pl"] and #declinfo["loc_pl"] == 0 then declinfo["loc_pl"] = nil end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local forms = sobreescribir_formas(declinfo, args, false, {}) comprobar_defectivo(forms, {}) forms = desactivar_formas(forms, function (form) return (form:find("pl$") and nopl) or (form:find("sg$") and nosg) end ) local raiz_nom = f(forms["nom_sg"][1] or forms["nom_pl"][1] or "?") local raiz_gen = f(forms["gen_sg"][1] or forms["gen_pl"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, noun_lb) local t = {} insert(t, {{""}, {"Singular"}, {"Plural"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg"], forms["nom_pl"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg"], forms["gen_pl"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg"], forms["dat_pl"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg"], forms["acc_pl"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg"], forms["abl_pl"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg"], forms["voc_pl"]}) if (forms["loc_sg"] and forms["loc_sg"][1]) or (forms["loc_pl"] and forms["loc_pl"][1]) then insert(t, {{"Locativo", header=true, color=COLOR_H}, forms["loc_sg"], forms["loc_pl"]}) end insert(t, {{args["nota"] or "", colspan=3}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_nom..", "..raiz_gen.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local adj_lb = { nom_sg_m = "m.", nom_sg_n = "n.", nom_sg_f = "f.", nom_pl_m = "m.", nom_pl_n = "n.", nom_pl_f = "f.", gen_sg_m = "m.", gen_sg_n = "n.", gen_sg_f = "f.", gen_pl_m = "m.", gen_pl_n = "n.", gen_pl_f = "f.", dat_sg_m = "m.", dat_sg_n = "n.", dat_sg_f = "f.", dat_pl_m = "m.", dat_pl_n = "n.", dat_pl_f = "f.", acc_sg_m = "m.", acc_sg_n = "n.", acc_sg_f = "f.", acc_pl_m = "m.", acc_pl_n = "n.", acc_pl_f = "f.", abl_sg_m = "m.", abl_sg_n = "n.", abl_sg_f = "f.", abl_pl_m = "m.", abl_pl_n = "n.", abl_pl_f = "f.", voc_sg_m = "m.", voc_sg_n = "n.", voc_sg_f = "f.", voc_pl_m = "m.", voc_pl_n = "n.", voc_pl_f = "f.", } function export.adj(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de="num"}, ["gen"] = {por_defecto="mfn"}, ["nota"] = {}, } for form,_ in pairs(adj_lb) do params[form] = {lista=true} end params["dat_pl"] = {lista=true} params["abl_pl"] = {lista=true} params["loc_pl"] = {lista=true} local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) if args["dat_pl"][1] then args["dat_pl_m"] = deep_copy(args["dat_pl"]) args["dat_pl_n"] = deep_copy(args["dat_pl"]) args["dat_pl_f"] = deep_copy(args["dat_pl"]) end if args["abl_pl"][1] then args["abl_pl_m"] = deep_copy(args["abl_pl"]) args["abl_pl_n"] = deep_copy(args["abl_pl"]) args["abl_pl_f"] = deep_copy(args["abl_pl"]) end if args["loc_pl"][1] then args["loc_pl_m"] = deep_copy(args["loc_pl"]) args["loc_pl_n"] = deep_copy(args["loc_pl"]) args["loc_pl_f"] = deep_copy(args["loc_pl"]) end args["dat_pl"] = nil args["abl_pl"] = nil args["loc_pl"] = nil assert(not find(title, " "), "locuciones no soportadas aún") -- REVISAR local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") a = a or subarg b = b or "+" local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end local cb = adj_decl[typ] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) local formas_ = {} -- necesario crear otro arreglo para no modificar las claves durante la iteración for form,arr in pairs(data.forms) do local pref = match(form, "^(.*)_m$") if pref and not data.forms[pref.."_f"] then formas_[pref.."_f"] = deep_copy(arr) end if pref and not data.forms[pref.."_n"] then formas_[pref.."_n"] = deep_copy(arr) end formas_[form] = arr end data.forms = formas_ if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, adj_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local m = find(args["gen"], "m") local fem = find(args["gen"], "f") local n = find(args["gen"], "n") local forms = sobreescribir_formas(declinfo, args, false, {}, adj_lb) comprobar_defectivo(forms) forms = desactivar_formas(forms, function (form) return (form:find("pl") and nopl) or (form:find("sg") and nosg) or (form:find("m$") and not m) or (form:find("f$") and not fem) or (form:find("n$") and not n) end ) local raiz_m = f(forms["nom_sg_m"][1] or forms["nom_pl_m"][1] or "?") local raiz_f = f(forms["nom_sg_f"][1] or forms["nom_pl_f"][1] or "?") local raiz_n = f(forms["nom_sg_n"][1] or forms["nom_pl_n"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, adj_lb) local t = {} insert(t, {{"Singular", colspan=4}, header=true, color=COLOR_H}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg_m"], forms["nom_sg_f"], forms["nom_sg_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg_m"], forms["gen_sg_f"], forms["gen_sg_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg_m"], forms["dat_sg_f"], forms["dat_sg_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg_m"], forms["acc_sg_f"], forms["acc_sg_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg_m"], forms["abl_sg_f"], forms["abl_sg_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg_m"], forms["voc_sg_f"], forms["voc_sg_n"]}) insert(t, {{"Plural", colspan=4, header=true, color=COLOR_H}}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_pl_m"], forms["nom_pl_f"], forms["nom_pl_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_pl_m"], forms["gen_pl_f"], forms["gen_pl_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_pl_m"], forms["dat_pl_f"], forms["dat_pl_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_pl_m"], forms["acc_pl_f"], forms["acc_pl_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_pl_m"], forms["abl_pl_f"], forms["abl_pl_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_pl_m"], forms["voc_pl_f"], forms["voc_pl_n"]}) insert(t, {{args["nota"] or "", colspan=4}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_m..", "..raiz_f..", "..raiz_n.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local EGO, TU, IS, NOS, VOS, EI = 1, 2, 3, 4, 5, 6 local tostr = {"1", "2", "3", "4", "5", "6"} local PRONOMBRES = {"ego", "tū", "is, ea, id", "nōs", "vōs", "eī, eae, ea"} local PRONOMBRES_SUBJ = {"ut ego", "ut tū", "ut is, ut ea, ut id", "ut nōs", "ut vōs", "ut eī, ut eae, ut ea"} local PRONOMBRES_IMP = {"―", "(tū)", "(is, ea, id)", "―", "(vōs)", "(eī, eae, ea)"} local IMPERSONALES = {"", "", "(id)", "", "", ""} local function obtener_pronombre(forma, impers) local conj, p = match(forma, "^(.*)(%d)$") if not p then return nil end p = tonumber(p) if impers then return IMPERSONALES[p] else if find(conj, "^subj") then return PRONOMBRES_SUBJ[p] end if find(conj, "^imper") then return PRONOMBRES_IMP[p] end return PRONOMBRES[p] end end local sufijos = { ["1"] = { inf_act = {"āre","isse"}, inf_pas = {"ārī"}, part_act = {"āns","ūrus"}, part_pas = {"andus","us"}, ger = {"andī","andō","andum"}, sup = {"um","ū"}, ind_pres = {"ō","ās","at","āmus","ātis","ant"}, ind_imp = {"ābam","ābās","ābat","ābāmus","ābātis","ābant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ābō","ābis","ābit","ābimus","ābitis","ābunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","āris","ātur","āmur","āminī","antur", nil,"āre"}, ind_imp_pas = {"ābar","ābāris","ābātur","ābāmur","ābāminī","ābantur", nil,"ābāre"}, ind_fut_pas = {"ābor","āberis","ābitur","ābimur","ābiminī","ābuntur", nil,"ābere"}, subj_pres = {"em","ēs","et","ēmus","ētis","ent"}, subj_imp = {"ārem","ārēs","āret","ārēmus","ārētis","ārent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"er","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_imp_pas = {"ārer","ārēris","ārētur","ārēmur","ārēminī","ārentur", nil,"ārēre"}, imper_pres = {nil,"ā",nil,nil,"āte",nil}, imper_fut = {nil,"ātō","ātō",nil,"ātōte","antō"}, imper_pres_pas = {nil,"āre",nil,nil,"āminī",nil}, imper_fut_pas = {nil,"ātor","ātor",nil,nil,"antor"}, }, ["2"] = { inf_act = {"ēre","isse"}, inf_pas = {"ērī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"eō","ēs","et","ēmus","ētis","ent"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ēbō","ēbis","ēbit","ēbimus","ēbitis","ēbunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"eor","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ēbor","ēberis","ēbitur","ēbimur","ēbiminī","ēbuntur", nil,"ēbere"}, subj_pres = {"eam","eās","eat","eāmus","eātis","eant"}, subj_imp = {"ērem","ērēs","ēret","ērēmus","ērētis","ērent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ear","eāris","eātur","eāmur","eāminī","eantur", nil,"eāre"}, subj_imp_pas = {"ērer","ērēris","ērētur","ērēmur","ērēminī","ērentur", nil,"ērēre"}, imper_pres = {nil,"ē",nil,nil,"ēte",nil}, imper_fut = {nil,"ētō","ētō",nil,"ētōte","entō"}, imper_pres_pas = {nil,"ēre",nil,nil,"ēminī",nil}, imper_fut_pas = {nil,"ētor","ētor",nil,nil,"entor"}, }, ["3"] = { -- 3 (comparar [[capio]] con [[lego]], las raíces con capi- y leg- pero hay que eliminar la doble ii) inf_act = {"ere","isse"}, inf_pas = {"ī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", nil,"ere"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_pres = {"am","ās","at","āmus","ātis","ant"}, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", nil,"āre"}, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", nil,"erēre"}, imper_pres = {nil,"e",nil,nil,"ite",nil}, imper_fut = {nil,"itō","itō",nil,"itōte","untō"}, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil}, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor"}, }, ["3/4"] = { inf_act = {"ere","isse","īre","isse"}, inf_pas = {"ī","īrī"}, part_act = {"ēns","iēns","ūrus"}, part_pas = {"endus","iendus","us"}, ger = {"endī","endō","endum","iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt", "iō","īs",nil,"īmus","ītis","iunt" }, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant", "iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant" }, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent", "iam","iēs","iet","iēmus","iētis","ient" }, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", "ior","ere","ītur","īmur","īminī","iuntur", nil,"īris",nil,nil,nil,nil, nil,"īre" }, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", "iēbar","ēbāre","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāris",nil,nil,nil,nil, nil,"iēbāre" }, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", "iar","ēre","iētur","iēmur","iēminī","ientur", nil,"iēris",nil,nil,nil,nil, nil,"iēre" }, subj_pres = {"am","ās","at","āmus","ātis","ant", "iam","iās","iat","iāmus","iātis","iant", }, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent", "īrem","īrēs","īret","īrēmus","īrētis","īrent" }, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", "iar","āre","iātur","iāmur","iāminī","iantur", nil,"iāris",nil,nil,nil,nil, nil,"iāre" }, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", "īrer","erēre","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēris",nil,nil,nil,nil, nil,"īrēre" }, imper_pres = {nil,"e",nil,nil,"ite",nil, nil,"ī",nil,nil,"īte",nil }, imper_fut = {nil,"itō","itō",nil,"itōte","untō", nil,"ītō","ītō",nil,"ītōte","iuntō" }, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil, nil,"īre",nil,nil,"īminī",nil }, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor", nil,"ītor","ītor",nil,nil,"iuntor" }, }, ["4"] = { inf_act = {"īre","isse"}, inf_pas = {"īrī"}, part_act = {"iēns","ūrus"}, part_pas = {"iendus","us"}, ger = {"iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"iō","īs","it","īmus","ītis","iunt"}, ind_imp = {"iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"iam","iēs","iet","iēmus","iētis","ient"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"ior","īris","ītur","īmur","īminī","iuntur", nil,"īre"}, ind_imp_pas = {"iēbar","iēbāris","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāre"}, ind_fut_pas = {"iar","iēris","iētur","iēmur","iēminī","ientur", nil,"iēre"}, subj_pres = {"iam","iās","iat","iāmus","iātis","iant"}, subj_imp = {"īrem","īrēs","īret","īrēmus","īrētis","īrent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"iar","iāris","iātur","iāmur","iāminī","iantur", nil,"iāre"}, subj_imp_pas = {"īrer","īrēris","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēre"}, imper_pres = {nil,"ī",nil,nil,"īte",nil}, imper_fut = {nil,"ītō","ītō",nil,"ītōte","iuntō"}, imper_pres_pas = {nil,"īre",nil,nil,"īminī",nil}, imper_fut_pas = {nil,"ītor","ītor",nil,nil,"iuntor"}, } } local formas_no_personales = { inf_act = true, inf_pas = true, part_act = true, part_pas = true, ger = true, sup = true, } local formas_personales = { ind_pres = true, ind_imp = true, ind_perf = true, ind_pluperf = true, ind_fut = true, ind_fut_perf = true, ind_fut_sig = true, ind_pres_pas = true, ind_imp_pas = true, ind_fut_pas = true, subj_pres = true, subj_imp = true, subj_perf = true, subj_pluperf = true, subj_aor_sig = true, subj_pres_pas = true, subj_imp_pas = true, imper_pres = true, imper_fut = true, imper_pres_pas = true, imper_fut_pas = true, } local formas = merge(formas_no_personales, formas_personales) local verbos_irregulares = { {"aiō", {"aiō", "aiiō", "aijō", "ajō"}, { desactivar = {"inf_pas","part_pas","ger","sup","ind_pluperf","ind_fut","ind_fut_perf", "ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_perf","subj_pluperf","subj_pres_pas", "subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {"ai"}, nucleoperf = {"a"}, nucleosup = {}, nucleosigm = {}, inf_act = {"aiere"}, ind_pres = {nil,nil,nil,{}}, ind_perf = {{},nil,nil,{},{}}, subj_pres = {nil,nil,nil,{},{}}, subj_imp = {{},{},nil,{},{},{}}, imper_pres = {{},{"ai"},{},{},{},{}}, }}, {"cedo", {"cedo"}, { desactivar = {"inf_act","inf_pas","part_act","part_pas","ger","sup","ind_pluperf","ind_pres","ind_imp","ind_perf", "ind_fut","ind_fut_perf","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres","subj_imp","subj_perf", "subj_pluperf","subj_pres_pas","subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, imper_pres = {nil,{"cedo"},nil,nil,{"cette","cedile"},nil}, }}, {"dīcō", {"dīcō"}, { conj = "3", nucleopres = {"dīc"}, nucleoperf = {"dīx"}, nucleosup = {"dict"}, nucleosigm = {"dīx"}, desactivar = {}, imper_pres = {nil, {"dīc", "dīce"}}, inf_pas = {"dīcī", "dīcier{L}"}, }}, {"dō", {"dō"}, { conj = "1", nucleopres = {"d"}, nucleoperf = {"ded"}, nucleosup = {"dat"}, nucleosigm = {}, desactivar = {}, inf_act = {"dare","dedisse"}, inf_pas = {"darī"}, ind_pres = {nil,nil,nil,{"damus"},{"datis"},nil}, ind_imp = {{"dabam"},{"dabās"},{"dabat"},{"dabāmus"},{"dabātis"},{"dabant"}}, ind_fut = {{"dabō"},{"dabis"},{"dabit"},{"dabimus"},{"dabitis"},{"dabunt"}}, ind_imp_pas = {{"dabar"},{"dabāris","dabāre"},{"dabātur"},{"dabāmur"},{"dabāminī"},{"dabantur"}}, ind_fut_pas = {{"dabor"},{"daberis","dabere"},{"dabitur"},{"dabimur"},{"dabiminī"},{"dabuntur"}}, subj_imp = {{"darem"},{"darēs"},{"daret"},{"darēmus"},{"darētis"},{"darent"}}, subj_imp_pas = {{"darer"},{"darēris","darēre"},{"darētur"},{"darēmur"},{"darēminī"},{"darentur"}}, imper_pres = {nil,nil,nil,nil,{"date"},nil}, imper_fut = {nil,{"datō"},{"datō"},nil,{"datōte"},{"dantō"}}, imper_pres_pas = {nil,{"dare"},nil,nil,{"daminī"},nil}, imper_fut_pas = {nil,{"dator"},{"dator"},nil,nil,{"dator"}}, }}, {"dūcō", {"dūcō"}, { conj = "3", nucleopres = {"dūc"}, nucleoperf = {"dūx"}, nucleosup = {"duct"}, nucleosigm = {}, desactivar = {}, imper_pres = {nil, {"dūc", "dūce"}}, }}, {"edō", {"edō", "ëdō"}, { conj = "3", nucleopres = {"ed"}, nucleoperf = {"ed"}, nucleosup = {""}, nucleosigm = {}, desactivar = {}, inf_act = {"edere","ēsse"}, part_act = {"edēns","ēsūrus","ēssūrus","ēstūrus"}, part_pas = {"edendus","edundus","ēsus","ēssus","ēstus"}, sup = {"ēsum","ēssum","ēstum","ēsū","ēssū","ēstū"}, ind_pres = {nil,{"edis","ēs"},{"edit","ēst"},nil,{"editis","ēstis"},nil}, ind_pres_pas = {nil,{"ederis","edere","ēssis","ēsse"},{"editur","ēstur"}}, subj_pres = {{"edam","edim"},{"edās","edīs"},{"edat","edit","ēst"},{"edāmus","edīmus"},{"edātis","edītis"},{"edant","edint"}}, subj_imp = {{"ederem","ēssem"},{"ederēs","ēssēs"},{"ederet","ēsset"},{"ederēmus","ēssēmus"},{"ederētis","ēssētis"},{"ederent","ēssent"}}, subj_imp_pas = {{"ederer","ēsser"},{"ederēris","ederēre","ēssēris","ēssēre"},{"ederetur","ēssetur"},{"ederēmur","ēssēmur"},{"ederēminī","ēssēminī"},{"ederentur","ēssentur"}}, imper_pres = {nil,{"ede","ēs"},nil,nil,{"edite","ēste"},nil}, imper_fut = {nil,{"editō","ēstō"},{"editō","ēstō"},nil,{"editōte","ēstōte"},{"eduntō"}}, imper_pres_pas = {nil,{"edere","ēsse"},nil,nil,{"ediminī"},nil}, imper_fut_pas = {nil,{"editor","ēstor"},{"editor","ēstor"},nil,nil,{"eduntor"}}, }}, {"eō", {"eō", "ëō"}, { conj = "4", nucleopres = {""}, nucleoperf = {""}, nucleosup = {""}, nucleosigm = {}, desactivar = {"imper_pres_pas"}, inf_act = {"īre","īsse","iisse","īvisse"}, inf_pas = {"īrī","īrier"}, part_act = {"iēns","itūrus"}, part_pas = {"eundum","itum"}, ger = {"eundī","eundō","eundum"}, sup = {"itum","itū"}, ind_pres = {{"eō"},{"īs"},{"it"},{"īmus"},{"ītis"},{"eunt"}}, ind_imp = {{"ībam"},{"ībās"},{"ībat"},{"ībāmus"},{"ībātis"},{"ībant"}}, ind_perf = {{"iī","īvī"},{"īstī","iistī","īvistī"},{"iit","īvit"},{"iimus","īvimus"},{"īstis","iistis","īvistis"},{"iērunt","iēre","īvērunt","īvēre"}}, ind_pluperf = {{"ieram","īveram"},{"ierās","īverās"},{"ierat","īverat"},{"ierāmus","īverāmus"},{"ierātis","īverātis"},{"ierant","īverant"}}, ind_fut = {{"ībō"},{"ībis"},{"ībit"},{"ībimus"},{"ībitis"},{"ībunt"}}, ind_fut_perf = {{"ierō","īverō"},{"ieris","īveris"},{"ierit","īverit"},{"ierimus","īverimus"},{"ieritis","īveritis"},{"ierint","īverint"}}, ind_fut_sig = {nil,nil,nil,nil,nil,nil}, ind_pres_pas = {{},{},{"ītur"},{},{},{}}, ind_imp_pas = {{},{},{"ībātur"},{},{},{}}, ind_fut_pas = {{},{},{"ībitur"},{},{},{}}, subj_pres = {{"eam"},{"eās"},{"eat"},{"eāmus"},{"eātis"},{"eant"}}, subj_imp = {{"īrem"},{"īrēs"},{"īret"},{"īrēmus"},{"īrētis"},{"īrent"}}, subj_perf = {{"ierim","īverim"},{"ierīs","īverīs"},{"ierit","īverit"},{"ierīmus","īverīmus"},{"ierītis","īverītis"},{"ierint","īverint"}}, subj_pluperf = {{"īssem","iissem","īvissem"},{"īssēs","iissēs","īvissēs"},{"īsset","iisset","īvisset"},{"īssēmus","iissēmus","īvissēmus"},{"īssētis","iissētis","īvissētis"},{"īssent","iissent","īvissent"}}, subj_aor_sig = {nil,nil,nil,nil,nil,nil}, subj_pres_pas = {{},{},{"eātur"},{},{},{}}, subj_imp_pas = {{},{},{"īrētur"},{},{},{}}, imper_pres = {nil,nil,nil,nil,nil,nil}, imper_fut = {nil,nil,nil,nil,nil,{"euntō"}}, imper_fut_pas = {nil,{},nil,nil,nil,{}}, }}, {"faciō", {"faciō"}, { conj = "3", I = true, inf_act = {"facere", "fāre", "fēcisse"}, inf_pas = {"fierī"}, part_pas = {"faciendus", "faciundus", "factus"}, nucleopres = {"fac"}, nucleoperf = {"fax"}, nucleosup = {"fact"}, nucleosigm = {"fax","faxs","facs"}, desactivar = {}, ind_pres_pas = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, ind_imp_pas = {{"fīēbam"},{"fīēbās"},{"fīēbat"},{"fīēbāmus"},{"fīēbātis"},{"fīēbant"}}, ind_fut_pas = {{"fīam"},{"fīēs"},{"fīet"},{"fīēmus"},{"fīētis"},{"fīent"}}, subj_pres_pas = {{"fīam"},{"fīās"},{"fīat"},{"fīāmus"},{"fīātis"},{"fīant"}}, subj_imp_pas = {{"fierem"},{"fierēs"},{"fieret"},{"fierēmus"},{"fierētis"},{"fierent"}}, imper_pres = {nil,{"fac","face"},nil,nil,nil,nil}, imper_pres_pas = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut_pas = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"ferō", {"ferō"}, { conj = "3", nucleopres = {"fer"}, nucleoperf = {"tul", "tetul{†}"}, nucleosup = {"lāt"}, nucleosigm = {}, desactivar = {}, inf_act = {"ferre", "tulisse", "tetulisse{†}"}, inf_pas = {"ferrī"}, ind_pres = {nil,{"fers"},{"fert"},nil,{"fertis"}}, ind_pres_pas = {nil,{"ferris","ferre"}}, subj_imp = {{"ferrem"},{"ferrēs"},{"ferret"},{"ferrēmus"},{"ferrētis"},{"ferrent"}}, subj_imp_pas = {{"ferrer"},{"ferrēris","ferrēre"},{"ferrētur"},{"ferrēmur"},{"ferrēminī"},{"ferrentur"}}, imper_pres = {nil,{"fer"},nil,nil,{"ferte"},nil}, imper_pres_pas = {nil,{"ferre"},nil,nil,nil,nil}, imper_fut = {nil,{"fertō"},{"fertō"},nil,{"fertōte"},{"feruntō"}}, imper_fut_pas = {nil,{"fertor"},{"fertor"},nil,nil,nil}, }}, {"fīō", {"fīō"}, { conj = "3", nucleopres = {"fī"}, nucleoperf = {}, nucleosup = {"fact"}, nucleosigm = {}, semidep = true, desactivar = {}, ind_pres = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, imper_pres = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"feruntō"}}, }}, {"inquam", {"inquam"}, { conj = "3", nucleopres = {"inqui"}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, nopasivo = true, desactivar = {"inf_act","inf_pas","part_pas","ger"}, ind_pres = {{"inquam"}}, }}, {"possum", {"possum"}, { conj = "3", nucleopres = {"pot"}, nucleoperf = {"pot"}, nucleosup = {}, nucleosigm = {}, pres = "possō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"posse","potesse{†}"}, part_act = {"potēns"}, ind_pres = {{"possum"},{"potes"},{"potest"},{"possumus"},{"potestis"},{"possunt"}}, ind_imp = {{"poteram"},{"poterās"},{"poterat"},{"poterāmus"},{"poterātis"},{"poterant"}}, ind_fut = {{"poterō"},{"poteris","potere"},{"poterit"},{"poterimus"},{"poteritis"},{"poterunt"}}, ind_perf = {{"potuī"},{"potuistī"},{"potuit"},{"potuimus"},{"potuistis"},{"potuērunt","potuēre"}}, ind_pluperf = {{"potueram"},{"potuerās"},{"potuerat"},{"potuerāmus"},{"potuerātis"},{"potuerant"}}, ind_fut_perf = {{"potuerō"},{"potueris"},{"potuerit"},{"potuerimus"},{"potueritis"},{"potuerunt"}}, subj_pres = {{"possem"},{"possēs"},{"possēt"},{"possēmus"},{"possētis"},{"possent"}}, subj_imp = {{"possim"},{"possīs"},{"possit"},{"possīmus"},{"possītis"},{"possint"}}, subj_perf = {{"potuerim"},{"potuerīs"},{"potuerit"},{"potuerīmus"},{"potuerītis"},{"potuerint"}}, subj_pluperf = {{"potuissem"},{"potuissēs"},{"potuisset"},{"potuissēmus"},{"potuissētis"},{"potuissent"}}, }}, {"sum", {"sum"}, { conj = "3", nucleopres = {"s"}, nucleoperf = {"fu"}, nucleosup = {}, nucleosigm = {}, pres = "sō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres_pas","imper_fut_pas"}, inf_act = {"esse"}, part_act = {"futūrus"}, ind_pres = {{"sum"},{"es"},{"est"},{"sumus"},{"estis"},{"sunt"}}, ind_imp = {{"eram"},{"erās"},{"erat"},{"erāmus"},{"erātis"},{"erant"}}, ind_fut = {{"erō"},{"eris","ere"},{"erit"},{"erimus"},{"eritis"},{"erunt"}}, subj_pres = {{"sim","siem","fuam{†}"},{"sīs","siēs","fuās{†}"},{"sit","siet","fuat{†}"},{"sīmus","siēmus","fuāmus{†}"},{"sītis","siētis","fuātis{†}"},{"sint","sient","fuant{†}"}}, subj_imp = {{"essem","forem"},{"essēs","forēs"},{"esset","foret"},{"essēmus","forēmus"},{"essētis","forētis"},{"essent","forent"}}, imper_pres = {nil,{"es"},nil,nil,{"este"},nil}, imper_fut = {nil,{"estō"},{"estō"},nil,{"estōte"},nil}, }}, {"mālō", {"mālō"}, { conj = "3", nucleopres = {"māl"}, nucleoperf = {"mālu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"mālle","māluisse"}, ind_pres = {{"mālō"},{"māvīs"},{"māvult"},{"mālumus"},{"māvultis"},{"mālunt"}}, subj_pres = {{"mālim"},{"mālīs"},{"mālit"},{"mālīmus"},{"mālītis"},{"mālint"}}, subj_imp = {{"māllem"},{"māllēs"},{"māllet"},{"māllēmus"},{"māllētis"},{"māllent"}}, }}, {"nōlō", {"nōlō"}, { conj = "3", nucleopres = {"nōl"}, nucleoperf = {"nōlu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"nōlle","nōluisse"}, ind_pres = {{"nōlō"},{"nōn vīs","nevīs{†}"},{"nōn vult","nōn volt","nevolt{†}"},{"nōlumus"},{"nōn vultis","nōn voltis","nōltis{†}"},{"nōlunt"}}, subj_pres = {{"nōlim"},{"nōlīs"},{"nōlit"},{"nōlīmus"},{"nōlītis"},{"nōlint"}}, subj_imp = {{"nōllem"},{"nōllēs"},{"nōllet"},{"nōllēmus"},{"nōllētis"},{"nōllent"}}, }}, {"volō", {"volō"}, { conj = "3", nucleopres = {"vol"}, nucleoperf = {"volu"}, nucleosup = {"volit"}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"velle","voluisse"}, ind_pres = {{"volō"},{"vīs"},{"vult","volt{†}"},{"volumus"},{"vultis","voltis{†}"},{"volunt"}}, subj_pres = {{"velim","volim{†}"},{"velīs","volīs{†}"},{"velit","volit{†}"},{"velīmus","volīmus{†}"},{"velītis","volītis{†}"},{"velint","volint{†}"}}, subj_imp = {{"vellem"},{"vellēs"},{"vellet"},{"vellēmus"},{"vellētis"},{"vellent"}}, }}, } local function combinar_prefijo_nucleosufijo(prefijo, nucleosufijo) return prefijo..nucleosufijo end local function combinar_nucleo_sufijo(nucleo, sufijo, agregar_i) if agregar_i and (not find(sufijo, "^[iī]")) and (sufijo ~= "e") and (not find(sufijo, "^er")) then return nucleo.."~i~"..sufijo end return nucleo..sufijo end local function agregar_forma(conjugado, conjinfo, forma) conjinfo[forma] = conjinfo[forma] or {} local sufijos_ = sufijos[conjinfo.conj][forma] local nucleos local prefijo if forma == "sup" then nucleos = conjinfo.nucleosup prefijo = conjinfo.prefijosup or conjinfo.prefijo elseif find(forma, "sig") then nucleos = conjinfo.nucleosigm prefijo = conjinfo.prefijosigm or conjinfo.prefijo elseif find(forma, "perf") then nucleos = conjinfo.nucleoperf prefijo = conjinfo.prefijoperf or conjinfo.prefijo else nucleos = conjinfo.nucleopres prefijo = conjinfo.prefijo end if formas_no_personales[forma] then if conjinfo[forma][1] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma]) do insert_if_not(conjugado[forma], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else for _, sufijo in ipairs(sufijos_) do local nucleos_ = nucleos if forma == "inf_act" and sufijo == "isse" then nucleos_ = conjinfo.nucleoperf elseif forma == "part_act" and sufijo == "ūrus" then nucleos_ = conjinfo.nucleosup elseif forma == "part_pas" and sufijo == "us" then nucleos_ = conjinfo.nucleosup end local agregar_i = conjinfo.I and nucleos_ == conjinfo.nucleopres for _,nucleo in ipairs(nucleos_) do insert_if_not(conjugado[forma], combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(nucleo, sufijo, agregar_i))) end end end return end for i = EGO, EI do local p = tostr[i] if conjinfo[forma][i] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma][i]) do insert_if_not(conjugado[forma..p], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else local k = i while sufijos_[k] do local agregar_i = conjinfo.I and nucleos == conjinfo.nucleopres for j, n in ipairs(nucleos) do local x = combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(n, sufijos_[k], agregar_i)) if conjinfo.always_sync_perf and (forma == "ind_perf" or forma == "ind_pluperf" or forma == "ind_fut_perf" or forma == "subj_perf" or forma == "subj_pluperf") then x = x:gsub("īvī", "iī") x = x:gsub("īvi", "ī") x = x:gsub("īve", "ī") x = x:gsub("īvē", "ē") end insert_if_not(conjugado[forma..p], x) end k = k + 6 end end end end local function get_subtype_by_ending(pres, conjinfo, specs) for _, spec in ipairs(specs) do local base = extract_base(pres, spec[1]) if base then for _,s in ipairs(spec[2]) do if conjinfo[s] == nil then conjinfo[s] = true end end return base end end error("Unrecognized ending for conjugation " .. conjinfo["conj"]) end local function detect_v_type_and_subtypes(conjinfo) local pres = conjinfo["v"] local conj_arg = conjinfo["conj"] pres = toNFC(pres) local base_conj_arg, auto_perf_supine = conj_arg:match("^([124]/?4?)(%+%+?)$") if base_conj_arg then if auto_perf_supine == "++" and base_conj_arg ~= "4" then error("Conjugation types 1++ and 2++ not allowed") end conj_arg = base_conj_arg end conjinfo.conj = conj_arg if conj_arg == "1" then local base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"at", {"impers"}}, {"ātur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "āv" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "āt" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "āss" end end elseif conj_arg == "2" then local base = get_subtype_by_ending(pres, conjinfo, { {"eō", {}}, {"eor", {"dep"}}, {"et", {"impers"}}, {"ētur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "u" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "it" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3" then local base if conjinfo.I == false then -- si explícitamente se indicó que no es del tipo -io, hay que excluir sufijos base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) else base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) end if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end assert(conjinfo["nucleoperf"][1], "especifique todos los núcleos para verbos de la tercera conjugación") assert(conjinfo["nucleosup"][1], "especifique todos los núcleos para verbos de la tercera conjugación") if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3/4" then local base base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "4" then local base = get_subtype_by_ending(pres, conjinfo, { {"iō", {}}, {"ior", {"dep"}}, {"it", {"impers"}}, {"ītur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "irreg" then for _,p in ipairs(verbos_irregulares) do for _,rx in ipairs(p[2]) do local pref, verb = match(conjinfo.v, "^(.*)("..rx..")$") if verb then conjinfo.v = verb conjinfo.prefijo = pref if conjinfo.nucleoperf[1] and conjinfo.nucleoperf[1] ~= "-" then -- [[ecfero]] conjinfo.prefijoperf = conjinfo.nucleoperf[1] conjinfo.nucleoperf = {} end if conjinfo.nucleosup[1] and conjinfo.nucleosup[1] ~= "-" then conjinfo.prefijosup = conjinfo.nucleosup[1] conjinfo.nucleosup = {} end if conjinfo.nucleosigm[1] and conjinfo.nucleosigm[1] ~= "-" then conjinfo.prefijosigm = conjinfo.nucleosigm[1] conjinfo.nucleosigm = {} end conjinfo.irreg = true conjinfo.conj = p[3].conj for k,val in pairs(p[3]) do if not conjinfo[k] or (type(conjinfo[k]) == "table" and not conjinfo[k][1]) then conjinfo[k] = deep_copy(val) end end return conjinfo end end end error("Unrecognized conjugation '" .. conj_arg .. "'") else error("Unrecognized conjugation '" .. conj_arg .. "'") end return conjinfo end function export.v(frame) local title_ = mw.title.getCurrentTitle() local tit = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {alias_de = "conj"}, [2] = {alias_de = "pres"}, [3] = {alias_de = "nucleoperf"}, [4] = {alias_de = "nucleosup"}, [5] = {alias_de = "nucleosigm"}, ["impers"] = {}, -- pas para formas pasivas solamente ["impersonal"] = {alias_de = "impers"}, ["dep"] = {tipo="bool"}, ["depon"] = {alias_de="dep"}, ["deponente"] = {alias_de="dep"}, ["semidep"] = {tipo="bool"}, ["semidepon"] = {alias_de="semidep"}, ["semideponente"] = {alias_de="semidep"}, ["sigm"] = {tipo="bool"}, ["nopasivo"] = {tipo="bool"}, ["soloperf"] = {tipo="bool"}, ["I"] = {tipo="bool"}, ["p3inf"] = {tipo="bool"}, -- sin uso ["poet_sync_perf"] = {tipo="bool"}, -- sin uso ["always_sync_perf"] = {tipo="bool"}, -- solo en [[saevio]] ["conj"] = {requerido=true}, ["pres"] = {requerido=true}, ["nucleopres"] = {lista = true}, ["nucleoperf"] = {lista = true}, ["nucleosup"] = {lista = true}, ["nucleosigm"] = {lista = true}, ["núcleopres"] = {alias_de="nucleopres"}, ["núcleoperf"] = {alias_de="nucleoperf"}, ["núcleosup"] = {alias_de="nucleosup"}, ["paradigma"] = {lista = true}, ["desactivarnucleos"] = {tipo="bool", por_defecto=true}, -- para [[-o]] ["nota"] = {}, } local conjugado = {} for forma,_ in pairs(formas_no_personales) do params[forma] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma] = {} end for forma,_ in pairs(formas_personales) do for i,s in ipairs(tostr) do params[forma..s] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma..s] = {} if i == 1 then params[forma] = {alias_de=forma..s} end end end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) assert(not find(tit, " "), "locuciones no soportadas aún") assert(not (args["dep"] and args["semidep"]), "un verbo no puede ser deponente y semideponente a la vez") local conjinfo = { conj = args.conj, prefijo="", v=args.pres, desactivar = {}, dep=args.dep, semidep=args.semidep, sigm=args.sigm, impers=args.impers, nopasivo=args.nopasivo, soloperf=args.soloperf, I=args.I, p3inf=args.p3inf, poet_sync_perf=args.poet_sync_perf, -- sin uso always_sync_perf=args.always_sync_perf, nucleopres = deep_copy(args.nucleopres), nucleoperf = deep_copy(args.nucleoperf), nucleosup = deep_copy(args.nucleosup), nucleosigm = deep_copy(args.nucleosigm) } conjinfo = detect_v_type_and_subtypes(conjinfo) conjinfo.conj = conjinfo.conj if conjinfo.impers == true then conjinfo.impers = "3" end -- no puede ir conjinfo acá abajo porque si es un sufijo va a quedar "-" en la raíz, lo que anularía todas las formas conjugadas, tiene que venir directo de args if args.desactivarnucleos then if args.nucleopres[1] == "-" then conjinfo.nucleopres = {} end if args.nucleoperf[1] == "-" then conjinfo.nucleoperf = {} end if args.nucleosup[1] == "-" then conjinfo.nucleosup = {} end if args.nucleosigm[1] == "-" then conjinfo.nucleosigm = {} end end local es_irregular = conjinfo.irreg for _,d in ipairs(conjinfo.desactivar) do if formas_no_personales[d] then args[d] = {"no"} else args[d.."2"] = {"no"} end end for forma,_ in pairs(formas) do agregar_forma(conjugado, conjinfo, forma) end local resultante = sobreescribir_formas(conjugado, args) local mostrar_fut_sig = #resultante["ind_fut_sig1"] > 0 local mostrar_aor_sig = #resultante["subj_aor_sig1"] > 0 local defectivo = comprobar_defectivo(resultante, {"^imper", "_sig"}, tostr) local defect2 resultante, defect2 = desactivar_formas(resultante, function (form) return (conjinfo.nopasivo and form:find("_pas")) or (conjinfo.soloperf and not form:find("perf")) or (conjinfo.impers == "pas" and form:find("_pas[^3]")) or (conjinfo.impers == "pas3" and form:find("_pas[^3]")) or (conjinfo.impers == "pas36" and form:find("_pas[^36]")) end ) if defect2 then defectivo = true end -- por ahora innecesario -- local part_no_adj = {} -- for _,e in ipairs(resultante.part) do -- if (find(e, 'PART') or not find(e, 'ADJ')) and not find(e, "†") then -- insert(part_no_adj, gsub1(e, '%b{}', '')) -- end -- end local tit_pres = f(resultante["ind_pres1"][1] or "―") local tit_inf = f(resultante["inf_act"][1] or "―") local tit_perf = f(resultante["ind_perf1"][1] or "―") local tit_sup = f(resultante["sup"][1] or "―") resultante = agregar_enlaces(resultante, tit, normalizar_enlace) local es_impersonal = conjinfo.impers resultante = formatear_formas(resultante, function (x) return obtener_pronombre(x, es_impersonal) end) local impers = conjinfo.impers local cs, cs1, cs2, fila_pronombres_ind, fila_pronombres_subj, fila_pronombres_imper, mostrar_imper if impers == "3" then fila_pronombres_ind = {"", "(id)", color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", "(quod id)", color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", "(id)", color=COLOR_IMPER, header=true, class="pc"} cs = 2 elseif impers == "36" then error("no soportado actualmente") cs = 3 else fila_pronombres_ind = {"", PRONOMBRES[1], PRONOMBRES[2], PRONOMBRES[3], PRONOMBRES[4], PRONOMBRES[5], PRONOMBRES[6], color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", PRONOMBRES_SUBJ[1], PRONOMBRES_SUBJ[2], PRONOMBRES_SUBJ[3], PRONOMBRES_SUBJ[4], PRONOMBRES_SUBJ[5], PRONOMBRES_SUBJ[6], color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", PRONOMBRES_IMP[1], PRONOMBRES_IMP[2], PRONOMBRES_IMP[3], PRONOMBRES_IMP[4], PRONOMBRES_IMP[5], PRONOMBRES_IMP[6], color=COLOR_IMPER, header=true, class="pc"} cs = 7 mostrar_imper = true end cs1 = cs -- math.floor(cs / 2) -- cs2 = cs - cs1 local t = {} insert(t, {{"Formas no personales (verboides)", colspan=cs}, color=COLOR_H, header=true}) if impers == "3" then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else resultante.inf_act.colspan = cs1-1 resultante.inf_pas.colspan = cs1-1 resultante.part_act.colspan = cs1-1 resultante.part_pas.colspan = cs1-1 resultante.ger.colspan = cs1-1 resultante.sup.colspan = cs1-1 if not conjinfo.dep then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) end if not conjinfo.semidep then insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) end if not conjinfo.dep then insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) end if not conjinfo.semidep then insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) end insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) end local function ic(tiempo) if impers == "3" then return resultante[tiempo.."3"] elseif impers == "36" then return resultante[tiempo.."3"], resultante[tiempo.."6"] end return resultante[tiempo.."1"], resultante[tiempo.."2"], resultante[tiempo.."3"], resultante[tiempo.."4"], resultante[tiempo.."5"], resultante[tiempo.."6"] end insert(t, {{"Formas personales", colspan=cs}, color=COLOR_H, header=true}) insert(t, {{"Modo indicativo", colspan=cs}, color=COLOR_IND, header=true}) insert(t, fila_pronombres_ind) if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) end if not conjinfo.dep and not conjinfo.semidep then insert(t, {{"Pretérito perfecto", color=COLOR_IND, header=true}, ic("ind_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_IND, header=true}, ic("ind_pluperf")}) insert(t, {{"Futuro perfecto", color=COLOR_IND, header=true}, ic("ind_fut_perf")}) end if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) end insert(t, {{"Modo subjuntivo", colspan=cs}, color=COLOR_SUBJ, header=true}) insert(t, fila_pronombres_subj) if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) end if not conjinfo.dep and not conjinfo.semidep then insert(t, {{"Pretérito perfecto", color=COLOR_SUBJ, header=true}, ic("subj_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_SUBJ, header=true}, ic("subj_pluperf")}) end if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) end insert(t, {{"Modo imperativo", colspan=cs}, color=COLOR_IMPER, header=true}) insert(t, fila_pronombres_imper) if mostrar_imper then if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) end else insert(t, {{"Como verbo "..(impers == "3" and "impersonal" or "terciopersonal")..", ''"..tit.."'' CARECE de imperativo", color=COLOR_IMPER, header=true, colspan=cs}}) end insert(t, {{f("Leyenda: † arcaico, x no normativo, ~■~ cambio ortográfico, #■# irregularidad"), colspan=cs}}) args["nota"] = args["nota"] or "" if conjinfo.impers == "utc3" then args["nota"] = args["nota"].." NOTA: se usa también como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "umc3" then args["nota"] = args["nota"].." NOTA: se usa más como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "utc36" then args["nota"] = args["nota"].." NOTA: se usa también como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "umc36" then args["nota"] = args["nota"].." NOTA: se usa más como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "pas" or conjinfo.imeprs == "pas3" then args["nota"] = args["nota"].." NOTA: impersonal para las formas pasivas" end if conjinfo.impers == "pas36" then args["nota"] = args["nota"].." NOTA: formas pasivas terciopersonales (solamente tercera persona singular y plural)" end if conjinfo.soloperf then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas del perfecto y pluscuamperfecto con valor de presente, imperfecto o futuro" end if conjinfo.nopasivo then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas activas" end insert(t, {{args["nota"] and args["nota"] or "", colspan=cs}}) local cats = {} local subtits = {} local conj_str if conjinfo.conj == "1" then conj_str = "primera conjugación" elseif conjinfo.conj == "2" then conj_str = "segunda conjugación" elseif conjinfo.conj == "3" then conj_str = "tercera conjugación" elseif conjinfo.conj == "3/4" then conj_str = "tercera/cuarta conjugación" else conj_str = "cuarta conjugación" end insert(cats, "LA:Verbos de la "..conj_str) insert(subtits, conj_str) impers = impers or "" if impers == "3" or find(impers, "^u[tm]c3$") then insert(subtits, "impersonal") insert(cats, "LA:Verbos impersonales") end if defectivo then insert(subtits, "defectivo") insert(cats, "LA:Verbos defectivos") end if conjinfo.dep then insert(subtits, "deponente") insert(cats, "LA:Verbos deponentes") end if conjinfo.semidep then insert(subtits, "semideponente") insert(cats, "LA:Verbos semideponentes") end if es_irregular then insert(subtits, "irregular") insert(cats, "LA:Verbos irregulares") else insert(subtits, "regular") insert(cats, "LA:Verbos regulares") end return renderizar_tabla( frame, "'''Conjugación de ''"..tit_pres..", "..tit_inf..", "..tit_perf..", "..tit_sup.."'''''&emsp;&emsp;("..concat(subtits, ", ")..")", t, ns == 0 and cats or {}) end function export.adv(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { ["n"] = {}, ["nota"] = {alias_de = "n"}, ["comp"] = {lista = true}, ["comparativo"] = {alias_de = "comp"}, ["compnota"] = {lista = true}, ["sup"] = {lista = true}, ["superlativo"] = {alias_de = "sup"}, ["supnota"] = {lista = true}, } local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local head = args[1] local modo = args[2] local enc local cats = {} local cat_pref = "LA:Adverbios" if modo == "-" then enc = "sin comparativo ni superlativo" insert(cats, cat_pref.." incomparables") return renderizar_encabezado( frame, head, enc, args["n"], {}, ns == 0 and cats or {}, normalizar_enlace ) end local flex = {comp={},sup={}} local stem for _, suff in ipairs{"iter", "nter", "ter", "er", "iē", "ē", "rā", "im", "ō"} do stem = match(head, "^(.*)" .. suff .. "$") if stem ~= nil then local comp_suff, sup_suff = "ius", "issimē" if suff == "nter" then stem = stem .. "nt" end if suff == "rā" then comp_suff = "er" .. comp_suff sup_suff = "imē" end insert(flex.comp, stem .. comp_suff) insert(flex.sup, stem .. sup_suff) break end end if not stem and not args.comp[1] and not args.sup[1] then error("Unrecognized adverb type, recognized types are “-ē”, “-er”, “-ter”, “-iter”, “-im”, or “-ō”, “-ra” or specify irregular forms or “-” if incomparable.") end local formas, irr = sobreescribir_formas(flex, args) if args["comp"][1] == "no" then enc = "sin comparativo" insert(cats, cat_pref.." sin comparativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) elseif args["sup"][1] == "no" then enc = "sin superlativo" insert(cats, cat_pref.." sin superlativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end if irr then enc = f("#irregular#") insert(cats, cat_pref.." irregulares") end return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}, {"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end return export m90ma7fes57e8htk688znsnne5kfjab 6123482 6123481 2026-07-24T22:39:47Z Tmagc 158167 6123482 Scribunto text/plain -- FLEXIÓN DEL LATÍN -- Adaptado desde en.wikt por Tmagc local export = {} local unpack = unpack or table.unpack local insert = table.insert local concat = table.concat local m_table = require("Módulo:tabla") local keys_to_list = m_table.keysToList local insert_if_not = m_table.insertIfNot local deep_copy = m_table.deepCopy local contains = m_table.contains local merge = m_table.merge local m_str = require("Módulo:string") local u = m_str.char local match = m_str.match local sub = m_str.sub local gsub = m_str.gsub local split = m_str.split local gsplit = m_str.gsplit local find = m_str.find local m_str_avanzado = require("Módulo:string/avanzado") local toNFD = m_str_avanzado.toNFD local toNFC = m_str_avanzado.toNFC local m_flex = require("Módulo:flex") local f = m_flex.f local f_links = m_flex.f_links local parsear_arreglo = m_flex.parsear_arreglo local separar_palabras = m_flex.separar_palabras local combinar_copulativa = m_flex.combinar_copulativa local sobreescribir_formas = m_flex.sobreescribir_formas local desactivar_formas = m_flex.desactivar_formas local agregar_enlaces = m_flex.agregar_enlaces local formatear_formas = m_flex.formatear_formas local comprobar_defectivo = m_flex.comprobar_defectivo local renderizar_tabla = m_flex.renderizar_tabla local renderizar_encabezado = m_flex.renderizar_encabezado local COLOR_H = m_flex.COLOR_H local COLOR_NP = m_flex.COLOR_NP local COLOR_IND = m_flex.COLOR_IND local COLOR_SUBJ = m_flex.COLOR_SUBJ local COLOR_IMPER = m_flex.COLOR_IMPER local MACRON = u(0x304) local BREVE = u(0x306) local DIAER = u(0x308) local DBREVE = u(0x361) local ACCENT = "[" .. MACRON .. BREVE .. DIAER .. DBREVE .. "]" local VOWEL = "[aæeioœuyAÆEIOŒUY]" local cons_to_vowel = { ["j"] = "i", ["J"] = "I", ["v"] = "u", ["V"] = "U", } local function normalizar_enlace(x) x = toNFD(x) x = gsub(x, ACCENT, "") return toNFC(x) end local function join(a, b) a, b = toNFD(a), toNFD(b) -- If the first part ends in "j" or "v", convert it to "i" or "u" unless -- the second part begins with a vowel. if not match(b, "^" .. VOWEL) then a = gsub(a, "[jvJV]$", cons_to_vowel) end return toNFC(a..b) end local function add_form(decl, slot, stem, suf) if type(slot) == "string" then slot = {slot} end for _,slt in ipairs(slot) do if type(decl[slt]) == "nil" or decl[slt] == "" then decl[slt] = {} elseif type(decl[slt]) == "string" then decl[slt] = {decl[slt]} end insert_if_not(decl[slt], join(stem, suf)) end end local function remove_forms(decl, forms) for form,_ in pairs(decl) do for _,rx in ipairs(forms) do if form:find(rx) then forms[form] = {} break end end end end local function merge_forms(forms, forms2, keys) keys = keys or forms2 for key,arr in pairs(keys) do if not forms[key] then forms[key] = {} end if type(forms2[key]) == "string" then insert_if_not(forms[key], forms2[key]) elseif type(forms2[key]) == "table" then for _,a in ipairs(forms2[key]) do insert_if_not(forms[key], a) end end end end local noun_decl = {} noun_decl["0"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = stem forms["dat_sg"] = stem forms["acc_sg"] = stem forms["abl_sg"] = stem forms["voc_sg"] = stem forms["nom_pl"] = stem forms["gen_pl"] = stem forms["dat_pl"] = stem forms["acc_pl"] = stem forms["abl_pl"] = stem forms["voc_pl"] = stem -- with locative if data.loc then forms["loc_sg"] = stem forms["loc_pl"] = stem end end local function alt_gen_pl_in_um(stem, forms, types, subtitles, i_stem) if types.genplum then add_form(forms, "gen_pl", stem, (i_stem and "i" or "") .. "um") elseif types.not_genplum then -- FIXME: not a contraction. -- insert_if_not(subtitles, "uncontracted genitive plural") end end noun_decl["1"] = function(data, args) local forms, types, loc, subtitles = data.forms, data.types, data.loc, data.subtitles local stem = args[1] -- normal 1st local nom_sg = "a" local gen_loc_sg = "ae" local dat_sg = "ae" local acc_sg = "am" local abl_sg = "ā" local voc_sg = "a" local nom_voc_pl = "ae" local gen_pl = "ārum" local dat_abl_loc_pl = "īs" local acc_pl = "ās" insert_if_not(data.title, "primera declinación") insert_if_not(data.categories, "LA:Sustantivos de la primera declinación") -- ām if types.am then nom_sg = "ām" acc_sg = "ām" abl_sg = {"ām", "ā"} voc_sg = "ām" -- all Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") --Greek Ma if types.Ma then nom_sg = "ās" acc_sg = "ān" voc_sg = "ā" -- Greek Me elseif types.Me then nom_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" -- Greek else nom_sg = "ē" gen_loc_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" end end -- ābus if types.abus then dat_abl_loc_pl = "ābus" end add_form(forms, "nom_sg", stem, nom_sg) add_form(forms, "gen_sg", stem, gen_loc_sg) add_form(forms, "dat_sg", stem, dat_sg) add_form(forms, "acc_sg", stem, acc_sg) add_form(forms, "abl_sg", stem, abl_sg) add_form(forms, "voc_sg", stem, voc_sg) add_form(forms, {"nom_pl", "voc_pl"}, stem, nom_voc_pl) add_form(forms, "gen_pl", stem, gen_pl) add_form(forms, {"dat_pl", "abl_pl"}, stem, dat_abl_loc_pl) add_form(forms, "acc_pl", stem, acc_pl) -- with locative if loc then add_form(forms, "loc_sg", stem, gen_loc_sg) add_form(forms, "loc_pl", stem, dat_abl_loc_pl) end end noun_decl["2"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "segunda declinación") insert_if_not(data.categories, "LA:Sustantivos de la segunda declinación") -- normal 2nd forms["nom_sg"] = stem1 .. "us" forms["gen_sg"] = stem1 .. "ī" forms["dat_sg"] = stem1 .. "ō" forms["acc_sg"] = stem1 .. "um" forms["abl_sg"] = stem1 .. "ō" forms["voc_sg"] = stem1 .. "e" forms["nom_pl"] = stem1 .. "ī" forms["gen_pl"] = stem1 .. "ōrum" forms["dat_pl"] = stem1 .. "īs" forms["acc_pl"] = stem1 .. "ōs" forms["abl_pl"] = stem1 .. "īs" forms["voc_pl"] = stem1 .. "ī" -- all neuter if types.N then forms["nom_sg"] = stem1 .. "um" forms["voc_sg"] = stem1 .. "um" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- neuter ium if types.ium then forms["nom_sg"] = stem1 .. "ium" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" forms["voc_sg"] = stem1 .. "ium" forms["nom_pl"] = stem1 .. "ia" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "ia" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "ia" -- neuter us, plural a elseif types.a then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- -vom (aevom, etc.) elseif types.vom then forms["nom_sg"] = stem1 .. "om" forms["acc_sg"] = stem1 .. "om" forms["voc_sg"] = stem1 .. "om" -- neuter Greek in -os (cētos) elseif types.Greek and types.us then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "os" forms["voc_sg"] = stem1 .. "os" forms["nom_pl"] = stem1 .. "ē" forms["gen_pl"] = stem1 .. "ōn" forms["acc_pl"] = stem1 .. "ē" forms["voc_pl"] = stem1 .. "ē" -- neuter Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "on" forms["acc_sg"] = stem1 .. "on" forms["voc_sg"] = stem1 .. "on" -- neuter us elseif types.us then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "ī" forms["acc_pl"] = stem1 .. "ōs" forms["voc_pl"] = stem1 .. "ī" end -- er elseif types.er then forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "ī" forms["dat_sg"] = stem2 .. "ō" forms["acc_sg"] = stem2 .. "um" forms["abl_sg"] = stem2 .. "ō" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ī" forms["gen_pl"] = stem2 .. "ōrum" forms["dat_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "ōs" forms["abl_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "ī" -- ius elseif types.ius then forms["nom_sg"] = stem1 .. "ius" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" if types.voci then -- Only for proper names and fīlius, genius forms["voc_sg"] = stem1 .. "ī" else forms["voc_sg"] = stem1 .. "ie" end forms["nom_pl"] = stem1 .. "iī" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "iōs" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "iī" -- -vos (servos, etc.) elseif types.vos then forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "om" -- Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "on" if data.num == "pl" then forms["nom_pl"] = stem1 .. "oe" forms["voc_pl"] = stem1 .. "oe" else forms["nom_pl"] = {stem1 .. "ī", stem1 .. "oe"} forms["voc_pl"] = {stem1 .. "ī", stem1 .. "oe"} end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- with -um genitive plural alt_gen_pl_in_um(stem2, forms, types, subtitles, types.ius or types.ium) -- with locative if data.loc then if types.ius or types.ium then forms["loc_sg"] = stem2 .. "iī" forms["loc_pl"] = stem2 .. "iīs" else forms["loc_sg"] = stem2 .. "ī" forms["loc_pl"] = stem2 .. "īs" end end end local acc_sg_i_stem_subtypes = { acc_im = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [abl -ī]; -- cannabis, senapis, sinapis [abl -e, -ī] acc_sg = {"im"}, title = {"accusative singular in ''-im''"}, }, acc_im_in = { -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [abl -ī]; -- Baetis, Tigris [acc -e, -ī] acc_sg = {"im", "in"}, title = {"accusative singular in ''-im'' or ''-in''"}, }, acc_im_in_em = { -- e.g. tigris, river Līris acc_sg = {"im", "in", "em"}, title = {"accusative singular in ''-im'', ''-in'' or ''-em''"}, }, acc_im_em = { acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or ''-em''"}, }, acc_im_occ_em = { -- febris, pelvis, puppis, restis, securis, turris [abl -ī, -e] acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or occasionally ''-em''"}, }, acc_em_im = { -- aqualis, clavis, lens, navis [abl -e, -ī]; -- cutis, restis [abl -e] acc_sg = {"em", "im"}, title = {"accusative singular in ''-em'' or ''-im''"}, }, } local abl_sg_i_stem_subtypes = { abl_i = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [acc -im]; -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [acc -im or -in]; -- canalis "water pipe", months in -is or -er, nouns originally i-stem adjectives such as aedilis, affinis, bipennis, familiaris, sodalis, volucris, etc. [acc -em] abl_sg = {"ī"}, title = {"ablative singular in ''-ī''"}, }, abl_i_e = { -- febris, pelvis, puppis, restis, securis, turris [acc -im, -em] abl_sg = {"ī", "e"}, title = {"ablative singular in ''-ī'' or ''-e''"}, }, abl_e_i = { -- cannabis, senapis, sinapis [acc -im]; -- Baetis, Tigris [acc -im, -in]; -- aqualis, clavis, lens, navis [acc -em, -im]; -- finis, mugilis, occiput, pugil, rus, supellex, vectis [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or ''-ī''"}, }, abl_e_occ_i = { -- amnis, anguis, avis, civis, classis, fustis, ignis, imber, orbis, pars, postis, sors, unguis, vesper [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or occasionally ''-ī''"}, }, } local function extract_stem(form, ending) local base = match(form, "^(.*)" .. ending .. "$") if not base then error("Form " .. form .. " should end in -" .. ending) end return base end local function count_vowels(stem) return select(2, toNFD(stem):gsub("[aeiouyAEIOUY]", "")) end noun_decl["3"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] -- local function non_i_stem_type() -- return (count_vowels(stem1) > count_vowels(stem2) and "parisyllabic" or "imparisyllabic") .. " non-i-stem" -- end insert_if_not(data.title, "tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") --normal 3rd forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "is" forms["dat_sg"] = stem2 .. "ī" forms["acc_sg"] = stem2 .. "em" forms["abl_sg"] = stem2 .. "e" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ēs" forms["gen_pl"] = stem2 .. "um" forms["dat_pl"] = stem2 .. "ibus" forms["acc_pl"] = stem2 .. "ēs" forms["abl_pl"] = stem2 .. "ibus" forms["voc_pl"] = stem2 .. "ēs" local acc_sg_i_stem_subtype = false local not_acc_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if acc_sg_i_stem_subtypes[subtype] then acc_sg_i_stem_subtype = true break end end for acc_sg_subtype, _ in pairs(acc_sg_i_stem_subtypes) do if types["not_" .. acc_sg_subtype] then not_acc_sg_i_stem_subtype = true break end end local abl_sg_i_stem_subtype = false local not_abl_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if abl_sg_i_stem_subtypes[subtype] then abl_sg_i_stem_subtype = true break end end for abl_sg_subtype, _ in pairs(abl_sg_i_stem_subtypes) do if types["not_" .. abl_sg_subtype] then not_abl_sg_i_stem_subtype = true break end end -- all Greek if types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") -- Greek er if types.er then stem1 = extract_stem(stem1, "ēr") forms["nom_sg"] = stem1 .. "ēr" forms["gen_sg"] = stem1 .. "eris" forms["dat_sg"] = stem1 .. "erī" forms["acc_sg"] = {stem1 .. "era", stem1 .. "erem"} forms["abl_sg"] = stem1 .. "ere" forms["voc_sg"] = stem1 .. "ēr" forms["nom_pl"] = stem1 .. "erēs" forms["gen_pl"] = stem1 .. "erum" forms["dat_pl"] = stem1 .. "eribus" forms["acc_pl"] = stem1 .. "erēs" forms["abl_pl"] = stem1 .. "eribus" forms["voc_pl"] = stem1 .. "erēs" -- Greek on elseif types.on then stem1 = extract_stem(stem1, "ōn") forms["nom_sg"] = stem1 .. "ōn" forms["gen_sg"] = {stem1 .. "ontis", stem1 .. "ontos"} forms["dat_sg"] = stem1 .. "ontī" forms["acc_sg"] = stem1 .. "onta" forms["abl_sg"] = stem1 .. "onte" forms["voc_sg"] = stem1 .. "ōn" forms["nom_pl"] = stem1 .. "ontēs" forms["gen_pl"] = {stem1 .. "ontum", stem1 .. "ontium"} forms["dat_pl"] = stem1 .. "ontibus" forms["acc_pl"] = {stem1 .. "ontēs", stem1 .. "ontās"} forms["abl_pl"] = stem1 .. "ontibus" forms["voc_pl"] = stem1 .. "ontēs" -- Greek i-stem elseif types.I then forms["gen_sg"] = {stem2 .. "is", stem2 .. "eōs", stem2 .. "ios"} forms["acc_sg"] = {stem2 .. "im", stem2 .. "in", stem2 .. "em{MED}"} forms["abl_sg"] = {stem2 .. "ī", stem2 .. "e{MED}"} forms["voc_sg"] = {stem2 .. "is", stem2 .. "i"} forms["nom_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["gen_pl"] = {stem2 .. "ium", stem2 .. "eōn"} forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["voc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} if types.poetic_esi then forms["dat_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} forms["abl_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} end -- normal Greek else forms["gen_sg"] = stem2 .. "os" if match(toNFD(stem2), "[yY]" .. ACCENT .. "*$") then forms["acc_sg"] = stem2 .. "n" else forms["acc_sg"] = stem2 .. "a" end forms["nom_pl"] = stem2 .. "es" forms["acc_pl"] = stem2 .. "as" forms["voc_pl"] = stem2 .. "es" if match(toNFD(stem1), "[iyIY]" .. ACCENT .. "*s$") then -- Per Hiley, words in -is and -ys have a poetic vocative -- without the -s, but otherwise the vocative is the same -- as the nominative. forms["voc_sg"] = {stem1, (stem1:gsub("s$", "")).."{L}"} end end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- polis if types.polis then stem1 = extract_stem(stem1, "polis") insert_if_not(data.title, "parcialmente griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "polis" forms["gen_sg"] = stem1 .. "polis" forms["dat_sg"] = stem1 .. "polī" forms["acc_sg"] = {stem1 .. "polim", stem1 .. "polin"} forms["abl_sg"] = stem1 .. "polī" forms["voc_sg"] = {stem1 .. "polis", stem1 .. "polī"} end -- all neuter if types.N then forms["acc_sg"] = stem1 -- neuter I stem if types.I then -- pure variety if types.pure then forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "ia" forms["gen_pl"] = stem2 .. "ium" forms["acc_pl"] = stem2 .. "ia" forms["voc_pl"] = stem2 .. "ia" -- non-pure variety (rare) else forms["nom_pl"] = stem2 .. "a" forms["gen_pl"] = {stem2 .. "ium", stem2 .. "um"} forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- normal neuter else forms["nom_pl"] = stem2 .. "a" forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- I stem elseif types.I or acc_sg_i_stem_subtype or abl_sg_i_stem_subtype then forms["gen_pl"] = stem2 .. "ium" -- Per Allen and Greenough, Hiley and others, the acc_pl in -īs -- applied originally to all i-stem nouns, and was current as an -- alternative form up through Caesar. forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "īs"} -- pure variety if types.pure then forms["acc_sg"] = stem2 .. "im" forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "īs" end local num = data.num for subtype, _ in pairs(types) do local acc_sg_i_stem_props = acc_sg_i_stem_subtypes[subtype] if acc_sg_i_stem_props then forms["acc_sg"] = {} for _, ending in ipairs(acc_sg_i_stem_props.acc_sg) do insert_if_not(forms["acc_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(acc_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end -- FIXME: needs to be done for neuter nouns as well. for subtype, _ in pairs(types) do local abl_sg_i_stem_props = abl_sg_i_stem_subtypes[subtype] if abl_sg_i_stem_props then forms["abl_sg"] = {} for _, ending in ipairs(abl_sg_i_stem_props.abl_sg) do insert_if_not(forms["abl_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(abl_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end end -- with locative if data.loc then -- As far as I can tell, in general both dative singular and -- ablative singular could be used for the third-declension locative, -- with different time periods preferring different forms. -- http://dcc.dickinson.edu/grammar/latin/3rd-declension-locative-case -- mentions rūrī along with either Carthāginī or Carthāgine. -- Wikipedia in https://en.wikipedia.org/wiki/Locative_case#Latin -- says this: -- -- In archaic times, the locative singular of third declension nouns -- was still interchangeable between ablative and dative forms, but in -- the Augustan Period the use of the ablative form became fixed. -- Therefore, both forms "rūrī" and "rūre" may be encountered. -- -- Lewis and Short confirm this. local loc_sg = forms["dat_sg"] if type(loc_sg) == "table" then loc_sg = deep_copy(loc_sg) else loc_sg = {loc_sg} end local abl_sg = forms["abl_sg"] if type(abl_sg) == "table" then for _, form in ipairs(abl_sg) do insert_if_not(loc_sg, deep_copy(form)) end else insert_if_not(loc_sg, abl_sg) end forms["loc_sg"] = loc_sg forms["loc_pl"] = deep_copy(forms["abl_pl"]) --The following is what we used to have, but I simply cannot believe it. --if types.Greek and not types.s then -- forms["loc_pl"] = stem2 .. "ēs" --end end end noun_decl["4"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "cuarta declinación") insert_if_not(data.categories, "LA:Sustantivos de la cuarta declinación") -- normal 4th forms["nom_sg"] = stem .. "us" forms["gen_sg"] = stem .. "ūs" forms["dat_sg"] = stem .. "uī" forms["acc_sg"] = stem .. "um" forms["abl_sg"] = stem .. "ū" forms["voc_sg"] = stem .. "us" forms["nom_pl"] = stem .. "ūs" forms["gen_pl"] = stem .. "uum" forms["dat_pl"] = stem .. "ibus" forms["acc_pl"] = stem .. "ūs" forms["abl_pl"] = stem .. "ibus" forms["voc_pl"] = stem .. "ūs" if types.echo then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end add_form(forms, "acc_sg", stem, "ōn") elseif types.Callisto then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end end -- neuter if types.N then forms["nom_sg"] = stem .. "ū̆{?}" forms["gen_sg"] = {stem .. "ūs{C}", stem .. "ū{S}"} forms["dat_sg"] = {stem .. "uī{C}", stem .. "ū{S}"} forms["acc_sg"] = stem .. "ū̆{?}" forms["voc_sg"] = stem .. "ū̆{?}" forms["nom_pl"] = stem .. "ua" forms["acc_pl"] = stem .. "ua" forms["voc_pl"] = stem .. "ua" end -- ubus if types.ubus then forms["dat_pl"] = stem .. "ubus" forms["abl_pl"] = stem .. "ubus" end -- with locative if data.loc then forms["loc_sg"] = forms["abl_sg"] forms["loc_pl"] = forms["abl_pl"] end end noun_decl["5"] = function(data, args) local forms, types = data.forms, data.types local stem = args[1] insert_if_not(data.title, "quinta declinación") insert_if_not(data.categories, "LA:Sustantivos de la quinta declinación") -- ies if types.i then stem = stem .. "i" end forms["nom_sg"] = stem .. "ēs" forms["gen_sg"] = stem .. "eī" forms["dat_sg"] = stem .. "eī" forms["acc_sg"] = stem .. "em" forms["abl_sg"] = stem .. "ē" forms["voc_sg"] = stem .. "ēs" forms["nom_pl"] = stem .. "ēs" forms["gen_pl"] = stem .. "ērum" forms["dat_pl"] = stem .. "ēbus" forms["acc_pl"] = stem .. "ēs" forms["abl_pl"] = stem .. "ēbus" forms["voc_pl"] = stem .. "ēs" -- ies if types.i then forms["gen_sg"] = stem .. "ēī" forms["dat_sg"] = stem .. "ēī" end --with locative if data.loc then forms["loc_sg"] = stem .. "ē" forms["loc_pl"] = stem .. "ēbus" end end noun_decl["sgpl"] = function(data, args) local forms = data.forms local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem1 forms["gen_sg"] = stem1 forms["dat_sg"] = stem1 forms["acc_sg"] = stem1 forms["abl_sg"] = stem1 forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 forms["gen_pl"] = stem2 forms["dat_pl"] = stem2 forms["acc_pl"] = stem2 forms["abl_pl"] = stem2 forms["voc_pl"] = stem2 -- with locative if data.loc then forms["loc_sg"] = stem1 forms["loc_pl"] = stem2 end end noun_decl["indecl"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = stem forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} -- with locative (for multiword terms) if data.loc then forms["loc_sg"] = {} forms["loc_pl"] = {} end data.num = "sg" end noun_decl["irreg"] = function(data, args) local forms, subtitles, notes = data.forms, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "irregular") insert_if_not(data.categories, "LA:Sustantivos irregulares") forms["nom_sg"] = {} forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = {} forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} if stem == "bōs" then data.decl = "3" local stem1, stem2 = "bōs", "bov" noun_decl["3"](data, {stem1, stem2}) add_form(forms, "abl_sg", stem2, "īd{†}") add_form(forms, "gen_pl", "bo", "um") add_form(forms, "gen_pl", stem2, "erum") add_form(forms, "dat_pl", "", "bōbus") add_form(forms, "dat_pl", "", "būbus") add_form(forms, "abl_pl", "", "bōbus") add_form(forms, "abl_pl", "", "būbus") elseif stem:match("^[dD]eus$") then data.decl = "2" local dD = stem:sub(1, 1) forms["nom_sg"] = dD .. "eus" forms["gen_sg"] = dD .. "eī" forms["dat_sg"] = dD .. "eō" forms["acc_sg"] = dD .. "eum" forms["abl_sg"] = dD .. "eō" forms["voc_sg"] = {dD .. "eus", dD .. "ee"} if stem == "deus" then forms["nom_pl"] = {"dī", "diī", "deī"} forms["gen_pl"] = {"deōrum", "deum"} forms["dat_pl"] = {"dīs", "diīs", "deīs"} forms["acc_pl"] = "deōs" forms["abl_pl"] = {"dīs", "diīs", "deīs"} forms["voc_pl"] = {"dī", "diī", "deī"} end elseif stem == "domus" then data.decl = "4,2" insert_if_not(data.title, "cuarta/segunda declinación") forms["nom_sg"] = "domus" forms["gen_sg"] = {"domūs", "domī"} forms["dat_sg"] = {"domuī", "domō", "domū"} forms["acc_sg"] = "domum" forms["abl_sg"] = {"domū", "domō"} forms["voc_sg"] = "domus" forms["loc_sg"] = "domī" forms["nom_pl"] = "domūs" forms["gen_pl"] = {"domuum", "domōrum"} forms["dat_pl"] = "domibus" forms["acc_pl"] = {"domūs", "domōs"} forms["abl_pl"] = "domibus" forms["voc_pl"] = "domūs" forms["loc_pl"] = {} data.loc = true elseif match(stem, "^[IÏJ]ēs[uū]" .. BREVE .. "?s$") then local ij = sub(stem, 1, 1) local uu = match(stem, "[uū]" .. BREVE .. "?") forms["nom_sg"] = stem forms["gen_sg"] = ij .. "ēsū" forms["dat_sg"] = ij .. "ēsū" forms["acc_sg"] = ij .. "ēs" .. uu .. "m" forms["abl_sg"] = ij .. "ēsū" forms["voc_sg"] = ij .. "ēsū" data.num = "sg" elseif stem == "Mōsēs" or stem == "Moesēs" or match(stem, "^M[oō]" .. BREVE .. "?[īȳ]sēs$") then local mos = sub(stem, 1, -3) forms["nom_sg"] = stem forms["gen_sg"] = {mos .. "ī", mos .. "ēī", mos .. "is", mos .. "ēn", mos .. "eōs"} forms["dat_sg"] = mos .. "ī" forms["acc_sg"] = {mos .. "ēn", mos .. "em"} forms["abl_sg"] = {mos .. "e", mos .. "ēn", mos .. "ī"} forms["voc_sg"] = {mos .. "ēs", mos .. "ē"} data.num = "sg" elseif stem:match("^[ij]ūgerum$") then data.decl = "2,3" local ij = stem:sub(1, 1) insert_if_not(data.title, "segunda/tercera declinación híbrido") forms["nom_sg"] = ij .. "ūgerum" forms["gen_sg"] = ij .. "ūgerī" forms["dat_sg"] = ij .. "ūgerō" forms["acc_sg"] = ij .. "ūgerum" forms["abl_sg"] = ij .. "ūgerō" forms["voc_sg"] = ij .. "ūgerum" forms["nom_pl"] = ij .. "ūgera" forms["gen_pl"] = ij .. "ūgerum" forms["dat_pl"] = ij .. "ūgeribus" forms["acc_pl"] = ij .. "ūgera" forms["abl_pl"] = {ij .. "ūgeribus", ij .. "ūgerīs{†}"} forms["voc_pl"] = ij .. "ūgera" elseif stem == "sūs" then data.decl = "3" forms["nom_sg"] = "sūs" forms["gen_sg"] = "suis" forms["dat_sg"] = "suī" forms["acc_sg"] = "suem" forms["abl_sg"] = "sue" forms["voc_sg"] = "sūs" forms["nom_pl"] = "suēs" forms["gen_pl"] = "suum" forms["dat_pl"] = {"suibus", "sūbus", "subus"} forms["acc_pl"] = "suēs" forms["abl_pl"] = {"suibus", "sūbus", "subus"} forms["voc_pl"] = "suēs" elseif stem == "ēthos" then data.decl = "3" insert_if_not(data.title, "tercera declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "ēthos" forms["gen_sg"] = "ētheos" forms["acc_sg"] = "ēthos" forms["voc_sg"] = "ēthos" forms["nom_pl"] = {"ēthea", "ēthē"} forms["dat_pl"] = {"ēthesi", "ēthesin"} forms["acc_pl"] = {"ēthea", "ēthē"} forms["abl_pl"] = {"ēthesi", "ēthesin"} forms["voc_pl"] = {"ēthea", "ēthē"} elseif stem == "Athōs" then data.decl = "2" insert_if_not(data.title, "segunda declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "Athōs" forms["gen_sg"] = "Athō" forms["dat_sg"] = "Athō" forms["acc_sg"] = {"Athō", "Athōn"} forms["abl_sg"] = "Athō" forms["voc_sg"] = "Athōs" data.num = "sg" elseif stem:match("^[uv]ēnum$") then data.decl = "4,2" local uv = stem:sub(1, 1) insert_if_not(data.title, "cuarta/segunda declinación, defectivo") forms["dat_sg"] = {uv .. "ēnuī", uv .. "ēnō"} forms["acc_sg"] = uv .. "ēnum" data.num = "sg" elseif stem:match("^[uv]īs$") then data.decl = "3" local uv = stem:sub(1, 1) insert_if_not(data.title, "defectivo") forms["nom_sg"] = uv .. "īs" forms["gen_sg"] = uv .. "īs" forms["dat_sg"] = uv .. "ī" forms["acc_sg"] = uv .. "im" forms["abl_sg"] = uv .. "ī" forms["voc_sg"] = uv .. "īs" forms["nom_pl"] = uv .. "īrēs" forms["gen_pl"] = uv .. "īrium" forms["dat_pl"] = uv .. "īribus" forms["acc_pl"] = {uv .. "īrēs", uv .. "īrīs"} forms["abl_pl"] = uv .. "īribus" forms["voc_pl"] = uv .. "īrēs" else error("Stem " .. stem .. " not recognized.") end end local adj_decl = {} adj_decl["0+"] = function(data, args) local forms, categories = data.forms, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = stem forms["gen_sg_m"] = stem forms["gen_pl_m"] = stem forms["dat_sg_m"] = stem forms["dat_pl_m"] = stem forms["acc_sg_m"] = stem forms["acc_pl_m"] = stem forms["abl_sg_m"] = stem forms["abl_pl_m"] = stem forms["voc_sg_m"] = stem forms["voc_pl_m"] = stem forms["loc_sg_m"] = stem forms["loc_pl_m"] = stem end adj_decl["1&2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera y segunda declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local original if types.er then local final2 = stem:sub(-2) if final2 == "er" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") elseif final2 == "ur" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") else error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem) end stem, original = args[2], stem end local us = "us" local a_sf = "a" local um = "um" local ae_gsf = "ae" local am = "am" local a_macron = "ā" local i_pl = stem .. "ī" if types.greekA or types.greekE then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") if types.greekA then us = "os" um = "on" am = "ān" else us = "os" a_sf = "ē" um = "on" ae_gsf = "ēs" am = "ēn" a_macron = "ē" end i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = original or (stem .. us) forms["nom_sg_f"] = stem .. a_sf forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_f"] = stem .. ae_gsf forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_f"] = stem .. "ae" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_f"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_f"] = stem .. am forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_f"] = stem .. a_macron forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_f"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = original or (stem .. "e") forms["voc_sg_f"] = stem .. a_sf forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" if types.ius then insert_if_not(data.title, "pronominal") --insert_if_not(subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''") forms["gen_sg_m"] = stem .. "ī̆us" forms["gen_sg_f"] = stem .. "ī̆us" forms["gen_sg_n"] = stem .. "ī̆us" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_f"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" elseif types.not_ius then insert_if_not(data.title, "no pronominal") --insert_if_not(subtitles, "with normal genitive and dative singular") end if stem == "me" then forms["voc_sg_m"] = "mī" end if types.ic then --insert_if_not(subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''") local oc = "oc" local oc_macron = "ōc" if stem == "ill" then oc = "uc" oc_macron = "ūc" end forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = stem .. oc forms["nom_pl_n"] = stem .. "aec" forms["gen_sg_m"] = stem .. "uius" forms["gen_sg_f"] = stem .. "uius" forms["gen_sg_n"] = stem .. "uius" forms["dat_sg_m"] = stem .. "uic" forms["dat_sg_f"] = stem .. "uic" forms["dat_sg_n"] = stem .. "uic" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = stem .. oc forms["acc_pl_n"] = stem .. "aec" forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. oc_macron forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} end if types.distr then if stem:sub(-1) == "n" then forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum{R}"} forms["gen_pl_f"] = {stem .. "um", stem .. "ārum{R}"} forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum{R}"} else error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem) end end forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["1-1+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") forms["nom_sg_m"] = stem .. "a" forms["nom_pl_m"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ae" forms["gen_pl_m"] = stem .. "ārum" forms["dat_sg_m"] = stem .. "ae" forms["dat_pl_m"] = stem .. "īs" forms["acc_sg_m"] = stem .. "am" forms["acc_sg_n"] = stem .. "a" forms["acc_pl_m"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ā" forms["abl_pl_m"] = stem .. "īs" forms["voc_sg_m"] = stem .. "a" forms["voc_pl_m"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["2-2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "segunda declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local us = "us" local um = "um" local i_pl = stem .. "ī" if types.greek then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") us = "os" um = "on" i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = stem .. us forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = stem .. "e" forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end local function abl_i_e(...) local function update_slot(forms, slot, f, do_copy) if not forms[slot] then return do_copy elseif do_copy then f = deep_copy(f) end forms[slot] = f return true end function abl_i_e(stem, forms, types) local f, do_copy if types["abl_e_i"] then f = {stem .. "e", stem .. "ī"} elseif types["abl_i_e"] then f = {stem .. "ī", stem .. "e"} else return end do_copy = update_slot(forms, "abl_sg_m", f, do_copy) do_copy = update_slot(forms, "abl_sg_f", f, do_copy) -- Neuter doesn't take -e with i-stems. if not types.I then update_slot(forms, "abl_sg_n", f, do_copy) end end return abl_i_e(...) end adj_decl["3-1+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) if types.par then forms["nom_pl_n"] = stem2 .. "a" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["abl_sg_m"] = stem2 .. "e" forms["abl_sg_n"] = stem2 .. "e" forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"} -- Really? forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"} -- Why does this happen? forms["acc_pl_n"] = stem2 .. "a" forms["voc_pl_n"] = stem2 .. "a" end local es_base = stem1:match("^(.-)ēs$") if es_base and es_base == stem2 then if types.greek then forms["nom_sg_n"] = {stem2 .. "ē̆s{?}"} forms["acc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_m"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["nom_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["acc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["voc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["abl_sg_m"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["abl_sg_n"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["gen_pl_m"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} forms["gen_pl_n"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Adjetivos griegos") elseif types.not_greek then insert_if_not(data.title, "no griego") end end end adj_decl["3-def+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, defectivo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = stem2 .. "ēs" forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" if types.tor then insert_if_not(data.title, "tercera declinación, solo en masculino") insert_if_not(categories, "LA:Adjetivos solo en masculino") remove_forms(forms, {"_f$", "_n$"}) forms["nom_sg_m"] = stem1 forms["gen_sg_m"] = stem2 .. "is" forms["dat_sg_m"] = stem2 .. "ī" forms["acc_sg_m"] = stem2 .. "em" forms["abl_sg_m"] = stem2 .. "e" forms["voc_sg_m"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["gen_pl_m"] = stem2 .. "um" forms["dat_pl_m"] = stem2 .. "ibus" forms["acc_pl_m"] = stem2 .. "ēs" forms["abl_pl_m"] = stem2 .. "ibus" forms["voc_pl_m"] = stem2 .. "ēs" end if types.trix then insert_if_not(data.title, "tercera declinación, solo en femenino o en neutro plural") insert_if_not(categories, "LA:Adjetivos solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en neutro") remove_forms(forms, {"_m$", "sg_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.trixf then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.idis then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = {stem2 .. "is", stem2 .. "os"} forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = {stem2 .. "em", stem2 .. "a"} forms["abl_sg_f"] = stem2 .. "e" forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} forms["gen_pl_f"] = stem2 .. "um" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = {stem2 .. "ēs", stem2 .. "as"} forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} end forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-C+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1 = args[1] local stem2 = stem1 .. "ōr" insert_if_not(data.title, "tercera declinación, comparativo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos comparativos") forms["nom_sg_m"] = stem1 .. "or" forms["nom_sg_n"] = stem1 .. "us" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "a" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 .. "us" forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} forms["acc_pl_n"] = stem2 .. "a" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 .. "or" forms["voc_sg_n"] = stem1 .. "us" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "a" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-P+"] = function(data, args) local forms, notes = data.forms, data.notes local stem2 = args[2] adj_decl["3-1+"](data, args) insert_if_not(data.title, "tercera declinación, participio") insert_if_not(data.categories, "LA:Adjetivos de la tercera declinación") forms["abl_sg_m"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["abl_sg_n"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} end adj_decl["3-2+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem = args[1] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem .. "is" forms["nom_sg_n"] = stem .. "e" forms["nom_pl_m"] = stem .. "ēs" forms["nom_pl_n"] = stem .. "ia" forms["gen_sg_m"] = stem .. "is" forms["gen_sg_n"] = stem .. "is" forms["gen_pl_m"] = stem .. "ium" forms["gen_pl_n"] = stem .. "ium" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" forms["dat_pl_m"] = stem .. "ibus" forms["dat_pl_n"] = stem .. "ibus" forms["acc_sg_m"] = stem .. "em" forms["acc_sg_n"] = stem .. "e" forms["acc_pl_m"] = {stem .. "īs", stem .. "ēs"} forms["acc_pl_n"] = stem .. "ia" forms["abl_sg_m"] = stem .. "ī" forms["abl_sg_n"] = stem .. "ī" forms["abl_pl_m"] = stem .. "ibus" forms["abl_pl_n"] = stem .. "ibus" -- abl_i_e(stem, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem .. "is" forms["voc_sg_n"] = stem .. "e" forms["voc_pl_m"] = stem .. "ēs" forms["voc_pl_n"] = stem .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-3+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con tres terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_f"] = stem2 .. "is" forms["nom_sg_n"] = stem2 .. "e" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_f"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_f"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_f"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_f"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_f"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_f"] = stem2 .. "em" forms["acc_sg_n"] = stem2 .. "e" forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_f"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_f"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_f"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" -- abl_i_e(stem2, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem1 forms["voc_sg_f"] = stem2 .. "is" forms["voc_sg_n"] = stem2 .. "e" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_f"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["indecl+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = {} forms["gen_sg_m"] = {} forms["gen_pl_m"] = {} forms["dat_sg_m"] = {} forms["dat_pl_m"] = {} forms["acc_sg_m"] = stem forms["acc_pl_m"] = {} forms["abl_sg_m"] = {} forms["abl_pl_m"] = {} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["irreg+"] = function(data,args) local forms, types, pos, notes, categories = data.forms, data.types, data.pos, data.notes, data.categories local arg1 = args[1] insert_if_not(data.title, "irregular") insert_if_not(categories, "LA:Adjetivos irregulares") if arg1 == "duo" or arg1 == "ambō" then local stem = sub(arg1, 1, -2) -- data.title = stem == "amb" and "irregular adjective" or "numeral" data.num = "pl" local stem_with_o = stem .. (stem == "amb" and "ō" or "o") forms["nom_pl_m"] = stem_with_o forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem_with_o forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_pl_m"] = stem .. "ōbus" forms["dat_pl_f"] = stem .. "ābus" forms["dat_pl_n"] = stem .. "ōbus" forms["acc_pl_m"] = {stem .. "ōs", stem_with_o} forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem_with_o forms["abl_pl_m"] = stem .. "ōbus" forms["abl_pl_f"] = stem .. "ābus" forms["abl_pl_n"] = stem .. "ōbus" forms["voc_pl_m"] = stem_with_o forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem_with_o if stem == "du" then forms["gen_pl_m"] = {forms["gen_pl_m"], "duum", "duom{†}"} forms["gen_pl_n"] = {forms["gen_pl_n"], "duum", "duom{†}"} end elseif arg1:sub(-6) == "mīlle" then insert_if_not(data.title, "numeral semiindeclinable") local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "le" forms["nom_pl_m"] = {stem .. "ia", stem .. "lia"} forms["gen_sg_m"] = stem .. "le" forms["gen_pl_m"] = {stem .. "ium", stem .. "lium"} forms["dat_sg_m"] = stem .. "le" forms["dat_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["acc_sg_m"] = stem .. "le" forms["acc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["abl_sg_m"] = stem .. "le" forms["abl_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["voc_sg_m"] = stem .. "le" forms["voc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) elseif arg1 == "ille" or arg1 == "iste" or arg1 == "ipse" or arg1 == "olle" then local stem = arg1:sub(1, -2) types.ius = true adj_decl["1&2+"](data, {stem}) insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) forms["nom_sg_m"] = arg1 if arg1 == "ipse" then add_form(forms, "nom_sg_n", stem, "ud{MED}") add_form(forms, "acc_sg_n", stem, "ud{MED}") else forms["nom_sg_n"] = stem .. "ud" forms["acc_sg_n"] = stem .. "ud" end forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} elseif arg1 == "illic" or arg1 == "istic" or arg1 == "isthic" then insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["gen_sg_m"] = stem .. "ī̆usce" forms["gen_sg_f"] = stem .. "ī̆usce" forms["gen_sg_n"] = stem .. "ī̆usce" forms["dat_sg_m"] = stem .. "īc" forms["dat_sg_f"] = stem .. "īc" forms["dat_sg_n"] = stem .. "īc" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. "ōc" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["nom_pl_m"] = stem .. "īsce" forms["nom_pl_f"] = stem .. "aec" forms["nom_pl_n"] = stem .. "aec" forms["gen_pl_m"] = stem .. "ōrunc{?}" forms["gen_pl_f"] = stem .. "ārunc{?}" forms["gen_ok_n"] = stem .. "ōrunc{?}" forms["dat_pl_m"] = stem .. "īsce" forms["dat_pl_f"] = stem .. "īsce" forms["dat_pl_n"] = stem .. "īsce" forms["acc_pl_m"] = stem .. "ōsce" forms["acc_pl_f"] = stem .. "āsce" forms["acc_pl_n"] = stem .. "aec" forms["abl_pl_m"] = stem .. "īsce" forms["abl_pl_f"] = stem .. "īsce" forms["abl_pl_n"] = stem .. "īsce" forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "hice" then insert_if_not(data.title, "demostrativo") -- .. " pronoun" forms["nom_sg_m"] = "hice" forms["nom_sg_f"] = "haece" forms["nom_sg_n"] = "hoce" forms["nom_pl_m"] = "hīce" forms["nom_pl_f"] = "haece" forms["nom_pl_n"] = "haece" forms["gen_sg_m"] = "huiusce" forms["gen_sg_f"] = "huiusce" forms["gen_sg_n"] = "huiusce" forms["gen_pl_m"] = {"hōrunce", "hōrumce"} forms["gen_pl_f"] = {"hārunce", "hārumce"} forms["gen_pl_n"] = {"hōrunce", "hōrumce"} forms["dat_sg_m"] = "huīce" forms["dat_sg_f"] = "huīce" forms["dat_sg_n"] = "huīce" forms["dat_pl_m"] = "hīsce" forms["dat_pl_f"] = "hīsce" forms["dat_pl_n"] = "hīsce" forms["acc_sg_m"] = "hunce" forms["acc_sg_f"] = "hance" forms["acc_sg_n"] = "hoce" forms["acc_pl_m"] = "hōsce" forms["acc_pl_f"] = "hāsce" forms["acc_pl_n"] = "haece" forms["abl_sg_m"] = "hōce" forms["abl_sg_f"] = "hāce" forms["abl_sg_n"] = "hōce" forms["abl_pl_m"] = "hīsce" forms["abl_pl_f"] = "hīsce" forms["abl_pl_n"] = "hīsce" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "plūs" then insert_if_not(data.title, "comparativo") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación con una terminación") data.note = "Ninguna de las formas en singular se usaron en latín clásico" forms["nom_sg_n"] = "plūs" forms["nom_pl_m"] = "plūrēs" forms["nom_pl_n"] = "plūra" forms["gen_sg_m"] = "plūris" forms["gen_sg_n"] = "plūris" forms["gen_pl_m"] = "plūrium" forms["gen_pl_n"] = "plūrium" forms["dat_sg_m"] = "plūrī" forms["dat_sg_n"] = "plūrī" forms["dat_pl_m"] = "plūribus" forms["dat_pl_n"] = "plūribus" forms["acc_sg_m"] = "plūrem" forms["acc_sg_f"] = "plūrem" forms["acc_sg_n"] = "plūs" forms["acc_pl_m"] = {"plūrēs", "plūrīs"} forms["acc_pl_n"] = "plūra" forms["abl_sg_m"] = {"plūrī", "plūre"} forms["abl_sg_f"] = {"plūrī", "plūre"} forms["abl_sg_n"] = {"plūrī", "plūre"} forms["abl_pl_m"] = "plūribus" forms["abl_pl_n"] = "plūribus" forms["voc_sg_n"] = "plūs" forms["voc_pl_m"] = "plūrēs" forms["voc_pl_n"] = "plūra" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif match(arg1, "^egō̆?$") or arg1 == "nōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "nōs" forms["gen_sg_m"] = "meī" forms["gen_pl_m"] = {"nostrī", "nostrum"} forms["dat_sg_m"] = "mihī̆" forms["dat_pl_m"] = "nōbīs" forms["acc_sg_m"] = {"mē", "mēmē"} forms["acc_pl_m"] = "nōs" forms["abl_sg_m"] = {"mē", "mēmē"} forms["abl_pl_m"] = "nōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "nōs" elseif arg1 == "tū" or arg1 == "vōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "vōs" forms["gen_sg_m"] = "tuī" forms["gen_pl_m"] = {"vestrī", "vestrum"} forms["dat_sg_m"] = "tibī̆" forms["dat_pl_m"] = "vōbīs" forms["acc_sg_m"] = {"tē", "tētē"} forms["acc_pl_m"] = "vōs" forms["abl_sg_m"] = {"tē", "tētē"} forms["abl_pl_m"] = "vōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "vōs" elseif arg1 == "suī" then insert_if_not(data.title, "pronombre reflexivo") forms["nom_sg_m"] = {} forms["nom_pl_m"] = {} forms["gen_sg_m"] = arg1 forms["gen_pl_m"] = forms["gen_sg_m"] forms["dat_sg_m"] = "sibī̆" forms["dat_pl_m"] = forms["dat_sg_m"] forms["acc_sg_m"] = {"sē", "sēsē"} forms["acc_pl_m"] = {"sē", "sēsē"} forms["abl_sg_m"] = {"sē", "sēsē"} forms["abl_pl_m"] = {"sē", "sēsē"} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} elseif arg1 == "is" or arg1 == "īdem" then insert_if_not(data.title, "pronombre demostrativo") forms["nom_sg_m"] = "is" forms["nom_sg_f"] = "ea" forms["nom_sg_n"] = "id" forms["nom_pl_m"] = {"iī", "eī", "ī"} forms["nom_pl_f"] = "eae" forms["nom_pl_n"] = "ea" forms["gen_sg_m"] = {"eius", "ejus"} forms["gen_sg_f"] = {"eius", "ejus"} forms["gen_sg_n"] = {"eius", "ejus"} forms["gen_pl_m"] = {"eōrum", "eum"} forms["gen_pl_f"] = "eārum" forms["gen_pl_n"] = {"eōrum", "eum"} forms["dat_sg_m"] = {"eī", "e͡i", "ēī"} forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"} forms["dat_sg_n"] = {"eī", "e͡i", "ēī"} forms["dat_pl_m"] = {"iīs", "eīs", "īs"} forms["dat_pl_f"] = {"iīs", "eīs", "īs", "eābus"} forms["dat_pl_n"] = {"iīs", "eīs", "īs"} forms["acc_sg_m"] = "eum" forms["acc_sg_f"] = "eam" forms["acc_sg_n"] = "id" forms["acc_pl_m"] = "eōs" forms["acc_pl_f"] = "eās" forms["acc_pl_n"] = "ea" forms["abl_sg_m"] = "eō" forms["abl_sg_f"] = "eā" forms["abl_sg_n"] = "eō" forms["abl_pl_m"] = {"iīs", "eīs", "īs"} forms["abl_pl_f"] = {"iīs", "eīs", "īs"} forms["abl_pl_n"] = {"iīs", "eīs", "īs"} if arg1 == "īdem" then forms["nom_sg_m"] = "ī" forms["nom_sg_n"] = "i" forms["acc_sg_n"] = "i" end elseif arg1 == "quis" or arg1 == "quī" then data.note = "La forma ''qua'' es preferida frente a ''quae'' cuando se usa como indefinido" local id = "id" if arg1 == "quī" then insert_if_not(data.title, "determinante relativo/interrogativo") id = "od" forms["nom_sg_m"] = {"quī", "quis", "quei{†}"} forms["nom_sg_f"] = {"quae", "qua"} forms["acc_sg_f"] = "quam" forms["abl_sg_m"] = "quō" forms["abl_sg_f"] = "quā" forms["abl_sg_n"] = "quō" else insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = {"quis", "quī"} forms["nom_sg_f"] = {"quae", "qua", "quis{†}"} forms["acc_sg_f"] = {"quam", "quem{†}"} forms["abl_sg_m"] = {"quō", "quī"} forms["abl_sg_f"] = {"quā", "quī"} forms["abl_sg_n"] = {"quō", "quī"} end forms["nom_sg_n"] = "qu"..id forms["nom_pl_m"] = {"quī", "quei{†}"} forms["nom_pl_f"] = "quae" forms["nom_pl_n"] = {"quae", "qua"} forms["gen_sg_m"] = {"cuius", "quoius{†}"} forms["gen_sg_f"] = {"cuius", "quoius{†}"} forms["gen_sg_n"] = {"cuius", "quoius{†}"} forms["gen_pl_m"] = "quōrum" forms["gen_pl_f"] = "quārum" forms["gen_pl_n"] = "quōrum" forms["dat_sg_m"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_f"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_n"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_n"] = {"quibus", "quīs", "queis{†}"} forms["acc_sg_m"] = "quem" forms["acc_sg_n"] = "qu"..id forms["acc_pl_m"] = "quōs" forms["acc_pl_f"] = "quās" forms["acc_pl_n"] = {"quae", "qua"} forms["abl_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_n"] = {"quibus", "quīs", "queis{†}"} elseif arg1 == "aliquī" then insert_if_not(data.title, "determinante indefinido") forms["nom_sg_m"] = {"aliquī{DET/ADJ}", "aliquis{PRON/SUST}"} forms["nom_sg_f"] = {"aliqua", "aliquae{R}"} forms["nom_sg_n"] = "aliquod" forms["nom_pl_m"] = "aliquī" forms["nom_pl_f"] = "aliquae" forms["nom_pl_n"] = "aliqua" forms["gen_sg_m"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_f"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_n"] = {"alicuius", "aliquoius{†}"} forms["gen_pl_m"] = "aliquōrum" forms["gen_pl_f"] = "aliquārum" forms["gen_pl_n"] = "aliquōrum" forms["dat_sg_m"] = {"alicui", "aliquoi{†}"} forms["dat_sg_f"] = {"alicui", "aliquoi{†}"} forms["dat_sg_n"] = {"alicui", "aliquoi{†}"} forms["dat_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["acc_sg_m"] = "aliquem" forms["acc_sg_f"] = "aliquam" forms["acc_sg_n"] = "aliquod" forms["acc_pl_m"] = "aliquōs" forms["acc_pl_f"] = "aliquās" forms["acc_pl_n"] = "aliqua" forms["abl_sg_m"] = "aliquō" forms["abl_sg_f"] = "aliquā" forms["abl_sg_n"] = "aliquō" forms["abl_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} elseif arg1 == "quisquam" then insert_if_not(data.title, "determinante indefinido, concordancia en negativo") data.note = "En latín clásico, era preferidas las formas de ''ūllus'' en lugar de las esta voz para el femenino y el neutro." forms["nom_sg_m"] = "quisquam" forms["nom_sg_f"] = {"quaequam", "quisquam{†}"} forms["nom_sg_n"] = "quodquam" forms["nom_pl_m"] = "quīquam" forms["nom_pl_f"] = "quaequam" forms["nom_pl_n"] = "quaequam" forms["gen_sg_m"] = "cuiusquam" forms["gen_sg_f"] = "cuiusquam" forms["gen_sg_n"] = "cuiusquam" forms["gen_pl_m"] = "quōrumquam" forms["gen_pl_f"] = "quārumquam" forms["gen_pl_n"] = "quōrumquam" forms["dat_sg_m"] = "cuiquam" forms["dat_sg_f"] = "cuiquam" forms["dat_sg_n"] = "cuiquam" forms["dat_pl_m"] = "quibusquam" forms["dat_pl_f"] = "quibusquam" forms["dat_pl_n"] = "quibusquam" forms["acc_sg_m"] = "quemquam" forms["acc_sg_f"] = {"quamquam", "quemquam{†}"} forms["acc_sg_n"] = "quodquam" forms["acc_pl_m"] = "quōsquam" forms["acc_pl_f"] = "quāsquam" forms["acc_pl_n"] = "quaequam" forms["abl_sg_m"] = {"quōquam", "quīquam{†}"} forms["abl_sg_f"] = "quāquam" forms["abl_sg_n"] = "quōquam" forms["abl_pl_m"] = "quibusquam" forms["abl_pl_f"] = "quibusquam" forms["abl_pl_n"] = "quibusquam" forms["voc_sg_m"] = "quisquam" forms["voc_sg_f"] = "quaequam" forms["voc_sg_n"] = "quodquam" forms["voc_pl_m"] = "quīquam" forms["voc_pl_f"] = "quaequam" forms["voc_pl_n"] = "quaequam" elseif arg1 == "quisquis" then insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = "quisquis" forms["nom_sg_f"] = "quisquis" forms["nom_sg_n"] = {"quidquid", "quicquid"} forms["nom_pl_m"] = "quīquī" forms["nom_pl_f"] = "quaequae" forms["nom_pl_n"] = "quaequae" forms["gen_sg_m"] = "cuiuscuius" forms["gen_sg_f"] = "cuiuscuius" forms["gen_sg_n"] = "cuiuscuius" forms["gen_pl_m"] = "quōrumquōrum" forms["gen_pl_f"] = "quārumquārum" forms["gen_pl_n"] = "quōrumquōrum" forms["dat_sg_m"] = "cuicui" forms["dat_sg_f"] = "cuicui" forms["dat_sg_n"] = "cuicui" forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"} forms["acc_sg_m"] = "quemquem" forms["acc_sg_f"] = "quamquam" forms["acc_sg_n"] = {"quidquid", "quicquid"} forms["acc_pl_m"] = "quōsquōs" forms["acc_pl_f"] = "quāsquās" forms["acc_pl_n"] = "quaequae" forms["abl_sg_m"] = "quōquō" forms["abl_sg_f"] = "quāquā" forms["abl_sg_n"] = "quōquō" forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"} forms["voc_sg_m"] = "quisquis" forms["voc_sg_f"] = "quisquis" forms["voc_sg_n"] = {"quidquid", "quicquid"} forms["voc_pl_m"] = "quīquī" forms["voc_pl_f"] = "quaequae" forms["voc_pl_n"] = "quaequae" elseif arg1 == "ecquis" then insert_if_not(data.title, "pronombre interrogativo") forms["nom_sg_m"] = {"ecquis", "ecquī"} forms["nom_sg_f"] = {"ecqua", "ecquae"} forms["nom_sg_n"] = "ecquid" forms["nom_pl_m"] = "ecquī" forms["nom_pl_f"] = "ecquae" forms["nom_pl_n"] = {"ecqua", "ecquae"} forms["gen_sg_m"] = "eccuius" forms["gen_sg_f"] = "eccuius" forms["gen_sg_n"] = "eccuius" forms["dat_sg_m"] = "eccui" forms["dat_sg_f"] = "eccui" forms["dat_sg_n"] = "eccui" forms["acc_sg_m"] = "ecquem" forms["acc_sg_f"] = "ecquam" forms["acc_sg_n"] = "ecquod" forms["acc_pl_m"] = "ecquōs" forms["acc_pl_f"] = "ecquās" forms["acc_pl_n"] = {"ecqua", "ecquae"} forms["abl_sg_m"] = {"ecquō", "ecquī"} forms["abl_sg_f"] = {"ecquā", "ecquī"} forms["abl_sg_n"] = {"ecquō", "ecquī"} elseif arg1 == "quīdam" then insert_if_not(data.title, "pronombre indefinido") forms["nom_sg_m"] = "quīdam" forms["nom_sg_f"] = "quaedam" forms["nom_sg_n"] = "quiddam" forms["nom_pl_m"] = {"quīdam", "quēsdam{†}"} forms["nom_pl_f"] = "quaedam" forms["nom_pl_n"] = "quaedam" forms["gen_sg_m"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_f"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_n"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_pl_m"] = {"quōrundam", "quōrumdam"} forms["gen_pl_f"] = {"quārundam", "quārumdam"} forms["gen_pl_n"] = {"quōrundam", "quōrumdam"} forms["dat_sg_m"] = {"cuidam", "quoidam{†}"} forms["dat_sg_f"] = {"cuidam", "quoidam{†}"} forms["dat_sg_n"] = {"cuidam", "quoidam{†}"} forms["dat_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_n"] = {"quibusdam", "quīsdam{†}"} forms["acc_sg_m"] = {"quendam", "quemdam"} forms["acc_sg_f"] = {"quandam", "quamdam"} forms["acc_sg_n"] = "quiddam" forms["acc_pl_m"] = {"quōsdam", "quēsdam{†}"} forms["acc_pl_f"] = "quāsdam" forms["acc_pl_n"] = "quaedam" forms["abl_sg_m"] = "quōdam" forms["abl_sg_f"] = "quādam" forms["abl_sg_n"] = "quōdam" forms["abl_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_n"] = {"quibusdam", "quīsdam{†}"} elseif arg1 == "nēmō" then insert_if_not(data.title, "Determinante y pronombre, concordancia en negativo") forms["nom_sg_m"] = "nēmō" forms["nom_sg_f"] = "nēmō" forms["gen_sg_m"] = {"nūllī̆us", "nēminis{R}"} forms["gen_sg_f"] = {"nūllī̆us", "nēminis{R}"} forms["dat_sg_m"] = "nēminī" forms["dat_sg_f"] = "nēminī" forms["acc_sg_m"] = "nēminem" forms["acc_sg_f"] = "nēminem" forms["abl_sg_m"] = {"nūllō", "nēmine{R}"} forms["abl_sg_f"] = {"nūllā", "nēmine{R}"} else error('adjective ' .. arg1 .. ' not recognized') end end local function extract_base(lemma, ending) if ending:find("(", nil, true) then return match(lemma, ending) end return match(lemma, "^(.*)" .. ending .. "$") end local function get_noun_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local subtypes = ending_and_subtypes[2] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. -- In addition, M or F as a subtype is canceled by N, and -- vice-versa, but M doesn't cancel F or vice-versa; instead, -- we simply ignore the conflicting gender specification when -- constructing the combination of specified and inferred subtypes. -- The reason for this is that neuters have distinct declensions -- from masculines and feminines, but masculines and feminines have -- the same declension, and various nouns in Latin that are -- normally masculine are exceptionally feminine and vice-versa -- (nauta, agricola, fraxinus, malus "apple tree", manus, rēs, -- etc.). -- -- In addition, sg as a subtype is canceled by pl and vice-versa. -- It's also possible to specify both, which will override sg but -- not cancel it (in the sense that it won't prevent the relevant -- rule from matching). For example, there's a rule specifying that -- lemmas beginning with a capital letter and ending in -ius take -- the ius.voci.sg subtypes. Specifying such a lemma with the -- subtype both will result in the ius.voci.both subtypes, whereas -- specifying such a lemma with the subtype pl will cause this rule -- not to match, and it will fall through to a less specific rule -- that returns just the ius subtype, which will be combined with -- the explicitly specified pl subtype to produce ius.pl. if specified_subtypes["-" .. subtype] or subtype == "N" and (specified_subtypes.M or specified_subtypes.F) or (subtype == "M" or subtype == "F") and specified_subtypes.N or subtype == "sg" and specified_subtypes.pl or subtype == "pl" and specified_subtypes.sg then not_this_subtype = true break end end end if not not_this_subtype then if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] local base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending == stem2 then return base, stem2, subtypes end else local base = extract_base(lemma, ending) if base then return base, stem2, subtypes end end end end if decltype then error("Unrecognized ending for declension-" .. decltype .. " noun: " .. lemma) end return lemma, stem2, keys_to_list(specified_subtypes) end local patterns = { {"[mM]a", "%0t"}, {"e", ""}, {"([aoAO])([lr])", "%1" .. MACRON .. "%2"}, {"[eE]l", "%0l"}, {"([mM])en", "%1in"}, {"([tT]ūd)ō", "%1in"}, {"([gG])ō", "%1in"}, {"[ōŌ]", "%1n"}, {"er", "r"}, {"[ēi]s", ""}, {"([āēīōūȳĀĒĪŌŪȲ]n)s", function(v) return (gsub(toNFD(v), MACRON, "") .. "t") end}, {"([cC])eps", "%1ipit"}, {"([bp])s", "%1"}, {"us", "or"}, {"s", "t"}, {"ex", "ic"}, {"x", "c"}, } local function make_stem2(stem) local n for _, pattern in ipairs(patterns) do local key = pattern[1] stem, n = gsub(stem, key .. "$", pattern[2]) if n > 0 then -- debug_track("la-utilities/" .. key) REVISAR return toNFC(stem) end end -- debug_track("la-utilities") REVISAR return stem end local function detect_noun_subtype(lemma, stem2, typ, subtypes) local base, _ if typ == "1" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ām", {"F", "am"}}, {"ās", {"M", "Greek", "Ma"}}, {"ēs", {"M", "Greek", "Me"}}, {"ē", {"F", "Greek"}}, {"ae", {"F", "pl"}}, {"a", {"F"}}, }) elseif typ == "2" then local detected_subtypes lemma, stem2, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(.*r)$", {"M", "er"}}, {"^(.*v)os$", {"M", "vos"}}, {"^(.*v)om$", {"N", "vom"}}, -- If the lemma ends in -os and the user said N or -M, then the -- following won't apply, and the second (neuter) -os will applly. {"os", {"M", "Greek"}}, {"os", {"N", "Greek", "us"}}, {"on", {"N", "Greek"}}, -- -ius beginning with a capital letter is assumed a proper name, -- and takes the voci subtype (vocative in -ī) along with the ius -- subtype and sg-only. Other nouns in -ius just take the ius -- subtype. Explicitly specify "sg" so that if .pl is given, -- this rule won't apply. {"^(%u.*)ius$", {"M", "ius", "voci", "sg"}}, {"ius", {"M", "ius"}}, {"ium", {"N", "ium"}}, -- If the lemma ends in -us and the user said N or -M, then the -- following won't apply, and the second (neuter) -us will applly. {"us", {"M"}}, {"us", {"N", "us"}}, {"um", {"N"}}, {"iī", {"M", "ius", "pl"}}, {"ia", {"N", "ium", "pl"}}, -- If the lemma ends in -ī and the user said N or -M, then the -- following won't apply, and the second (neuter) -ī will applly. {"ī", {"M", "pl"}}, {"ī", {"N", "us", "pl"}}, {"oe", {"M", "Greek", "pl"}}, {"a", {"N", "pl"}}, }) stem2 = stem2 or lemma return lemma, stem2, detected_subtypes elseif typ == "3" then if subtypes.pl then if subtypes.Greek then base = lemma:match("^(.*)erēs$") if base then return base .. "ēr", base .. "er", {"er"} end base = lemma:match("^(.*)ontēs$") if base then return base .. "ōn", base .. "ont", {"on"} end base = lemma:match("^(.*)es$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural Greek noun: " .. lemma) end base = lemma:match("^(.*)ia$") if base then return base, stem2 or base, {"N", "I", "pure"} end base = lemma:match("^(.*)a$") if base then return base, stem2 or base, {"N"} end base = lemma:match("^(.*)ēs$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural noun: " .. lemma) end stem2 = stem2 or make_stem2(lemma) local detected_subtypes if subtypes.Greek then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"is", ""}, {"I"}}, {"ēr", {"er"}}, {"ōn", {"on"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} end if not subtypes.N then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"^(%u.*pol)is$", ""}, {"F", "polis", "sg", "loc"}}, {{"tūdō", "tūdin"}, {"F"}}, {{"tās", "tāt"}, {"F"}}, {{"tūs", "tūt"}, {"F"}}, {{"tiō", "tiōn"}, {"F"}}, {{"siō", "siōn"}, {"F"}}, {{"xiō", "xiōn"}, {"F"}}, {{"gō", "gin"}, {"F"}}, {{"or", "ōr"}, {"M"}}, {{"tr[iī]x", "trīc"}, {"F"}}, {{"is", ""}, {"I"}}, {{"^(%l.*)ēs$", ""}, {"I"}}, }) if base then return lemma, stem2, detected_subtypes end end base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"us", "or"}, {"N"}}, {{"us", "er"}, {"N"}}, {{"ma", "mat"}, {"N"}}, {{"men", "min"}, {"N"}}, {{"^(%u.*)e$", ""}, {"N", "sg"}}, {{"e", ""}, {"N", "I", "pure"}}, {{"al", "āl"}, {"N", "I", "pure"}}, {{"ar", "ār"}, {"N", "I", "pure"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} elseif typ == "4" then if subtypes.echo or subtypes.Callisto then base = lemma:match("^(.*)ō$") if not base then error("Declension-4 noun of subtype .echo or .Callisto should end in -ō: " .. lemma) end if subtypes.Callisto then return base, nil, {"F", "sg"} else return base, nil, {"F"} end end return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", {"M"}}, {"ū̆", {"N"}}, {"ūs", {"M", "pl"}}, {"ua", {"N", "pl"}}, }) elseif typ == "5" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"iēs", {"F", "i"}}, {"iēs", {"F", "i", "pl"}}, {"ēs", {"F"}}, {"ēs", {"F", "pl"}}, }) elseif typ == "sgpl" then return lemma, stem2, {} elseif typ == "irreg" and lemma == "domus" then -- [[domus]] auto-sets data.loc = true, but we need to know this -- before declining the noun so we can propagate it to other segments. return lemma, nil, {"loc"} elseif typ == "indecl" or typ == "irreg" and ( lemma == "Deus" or match(lemma, "^[IJ]ēs[uū]s$") or lemma == "Athōs" or lemma == "vēnum" ) then -- Indeclinable nouns, and certain irregular nouns, set data.num = "sg", -- but we need to know this before declining the noun so we can -- propagate it to other segments. return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", {"both"}}, {"", {"sg"}}, {"", {"pl"}}, }) elseif typ == "indecl" or typ == "irreg" then return lemma, nil, {} else return nil, nil, {} end end -- Given ENDINGS_AND_SUBTYPES (a list of four-tuples of ENDING, RETTYPE, -- SUBTYPES, PROCESS_RETVAL), check each ENDING in turn against LEMMA and -- STEM2. If it matches, return a four-tuple BASE, STEM2, RETTYPE, NEW_SUBTYPES -- where BASE is normally the remainder of LEMMA minus the ending, STEM2 is -- as passed in, RETTYPE is as passed in, and NEW_SUBTYPES is the same as -- SUBTYPES minus any subtypes beginning with a hyphen. If no endings match, -- throw an error if DECLTYPPE is non-nil, mentioning the DECLTYPE -- (user-specified declension); but if DECLTYPE is nil, just return the tuple -- nil, nil, nil, nil. -- -- In order for a given entry to match, ENDING must match and also the subtypes -- in SUBTYPES (a list) must not be incompatible with the passed-in -- user-specified subtypes SPECIFIED_SUBTYPES (a set, i.e. a table where the -- keys are strings and the value is always true). "Incompatible" means that -- a given SUBTYPE is specified in either one and -SUBTYPE in the other, or -- that "pl" is found in SPECIFIED_SUBTYPES and not in SUBTYPES. -- -- The ending spec in ENDINGS_AND_SUBTYPES is one of the following: -- -- 1. A simple string, e.g. "tūdō", specifying an ending. -- 2. A regex that should match the entire lemma (it should be anchored at -- the beginning with ^ and at the end with $), and contains a single -- capturing group to match the base. -- 3. A pair {SIMPLE_STRING_OR_REGEX, STEM2_ENDING} where -- SIMPLE_STRING_OR_REGEX is one of the previous two possibilities and -- STEM2_ENDING is a string specifying the corresponding ending that must -- be present in STEM2. If this form is used, the combination of -- base + STEM2_ENDING must exactly match STEM2 in order for this entry -- to be considered a match. An example is {"is", ""}, which will match -- lemma == "follis", stem2 == "foll", but not lemma == "lapis", -- stem2 == "lapid". -- -- If PROCESS_STEM2 is given and the returned STEM2 would be nil, call -- process_stem2(BASE) to get the STEM2 to return. local function get_adj_type_and_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes, process_stem2) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local rettype = ending_and_subtypes[2] local subtypes = ending_and_subtypes[3] local process_retval = ending_and_subtypes[4] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. if specified_subtypes["-" .. subtype] then not_this_subtype = true break end -- A subtype is canceled if the user specified SUBTYPE and -- -SUBTYPE is given in the to-be-returned subtypes. local must_not_be_present = subtype:match("^%-(.*)$") if must_not_be_present and specified_subtypes[must_not_be_present] then not_this_subtype = true break end end end if not not_this_subtype then local base if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending ~= stem2 then base = nil end else base = extract_base(lemma, ending) end if base then -- Remove subtypes of the form -SUBTYPE from the subtypes -- to be returned. local new_subtypes = {} for _, subtype in ipairs(subtypes) do if subtype:sub(1, 1) ~= "-" then insert(new_subtypes, subtype) end end if process_retval then base, stem2 = process_retval(base, stem2) end if process_stem2 then stem2 = stem2 or process_stem2(base) end return base, stem2, rettype, new_subtypes end end end if not decltype then return lemma, stem2, nil, keys_to_list(specified_subtypes) elseif decltype == "" then error("Unrecognized ending for adjective: " .. lemma) else error("Unrecognized ending for declension-" .. decltype .. " adjective: " .. lemma) end end -- Autodetect the type and subtype of an adjective given all the information -- specified by the user: lemma, stem2, declension type and specified subtypes. -- Four values are returned: the lemma base (i.e. the stem of the lemma, as -- required by the declension functions), the value of stem2 to pass to the -- declension function, the declension type and the autodetected subtypes. -- Note that this will not detect a given subtype if -SUBTYPE is specified for -- any subtype that would be returned, or if SUBTYPE is specified and -SUBTYPE -- is among the subtypes that would be returned (such subtypes are filtered out -- of the returned subtypes). local function detect_adj_type_and_subtype(lemma, stem2, typ, subtypes) local function base_as_stem2(base, stem2) return base, base end local function constant_base(baseval) return function(base, stem2) return baseval, nil end end local function decl12_stem2(base) return base end local function decl3_stem2(base) return make_stem2(base) end local decl12_entries = { {"us", "1&2+", {}}, {"a", "1&2+", {}}, {"um", "1&2+", {}}, {"ī", "1&2+", {"pl"}}, {"ae", "1&2+", {"pl"}}, {"a", "1&2+", {"pl"}}, -- Nearly all -os adjectives are greekA {"os", "1&2+", {"greekA", "-greekE"}}, {"os", "1&2+", {"greekE", "-greekA"}}, {"ē", "1&2+", {"greekE", "-greekA"}}, {"on", "1&2+", {"greekA", "-greekE"}}, {"on", "1&2+", {"greekE", "-greekA"}}, {"^(.*er)$", "1&2+", {"er"}}, {"^(.*ur)$", "1&2+", {"er"}}, {"^(h)ic$", "1&2+", {"ic"}}, } local decl3_entries = { {"^(.*er)$", "3-3+", {"I"}}, {"^(.*er)$", "3-3+", {}}, {"is", "3-2+", {"I"}}, {"is", "3-2+", {}}, {"e", "3-2+", {"I"}}, {"e", "3-2+", {}}, {"^(.*[ij])or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(.*[ij])or$", "3-C+", {}}, {"^(min)or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(min)or$", "3-C+", {}}, {"^(.*trīx)$", "3-def+", {"trix", "abl_i_e", "-abl_e_i"}}, {"^(.*trīx)$", "3-def+", {"trix"}}, {"^(.*tor)$", "3-def+", {"tor", "abl_i_e", "-abl_e_i"}}, {"^(.*tor)$", "3-def+", {"tor"}}, -- Detect -ēs as 3-1 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like quadripēs, volucripēs). -- Essentially, for declension-3 adjectives, we require that -- .pl is given if the lemma is plural. -- -- Most 3-1 adjectives are i-stem (e.g. audāx) so we require -I -- to be given with non-i-stem adjectives. The first entry below -- will apply when -I isn't given, the second when it is given. {"^(.*ēs)$", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"I"}}, {"^(.*ēs)$", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"par"}}, {"^(.*[ij])ōrēs$", "3-C+", {"pl"}}, {"^(min)ōrēs$", "3-C+", {"pl"}}, -- If .pl with -ēs, we don't know if the adjective is 3-1, 3-2 -- or 3-3. Since 3-2 is probably the most common, we infer it -- (as well as the fact that these adjectives *are* in a sense -- 3-2 since they have a distinct neuter in -(i)a. Note that -- we have two entries here; the first one will apply unless -- -I is given, and will infer an i-stem adjective; the second -- one will apply otherwise (and infer a non-i-stem 3-1 adjective). {"ēs", "3-2+", {"pl", "I"}, base_as_stem2}, {"ēs", "3-1+", {"pl", "par"}, base_as_stem2}, -- Same for neuters. {"ia", "3-2+", {"pl", "I"}, base_as_stem2}, {"a", "3-1+", {"pl", "par"}, base_as_stem2}, -- As above for -ēs but for miscellaneous singulars. {"", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"I"}}, {"", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"par"}}, } local function get_subtypes_and_endings(typ, f) local subtypes_and_endings = {} for _, v in ipairs(decl3_entries) do if f(v) then v = deep_copy(v) v[2] = typ insert(subtypes_and_endings, v) end end return subtypes_and_endings end local function compare(spec) return spec[2] == typ end if typ == "+" then local base, new_stem2, rettype, new_subtypes = get_adj_type_and_subtype_by_ending(lemma, stem2, nil, subtypes, decl12_entries, decl12_stem2) if rettype then return base, new_stem2, rettype, new_subtypes else return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) end elseif typ == "3+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) elseif typ == "1&2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl12_entries, decl12_stem2) elseif typ == "1-1+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"a", typ, {}}, {"ae", typ, {"pl"}}, }) elseif typ == "2-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", typ, {}}, {"um", typ, {}}, {"ī", typ, {"pl"}}, {"a", typ, {"pl"}}, {"os", typ, {"greek"}}, {"on", typ, {"greek"}}, {"oe", typ, {"greek", "pl"}}, }) elseif typ == "3-1+" then -- Use the specs from `decl3_entries`, but add the two i-stem 3-2+ specs when plural-only, as they're the same when 3-1+. local subtypes_and_endings = get_subtypes_and_endings(typ, function(spec) local spec1, spec2 = spec[1], spec[2] return spec2 == typ or (spec2 == "3-2+" and spec1 == "ēs" or spec1 == "ia") end) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-def+" then -- Like 3-1+ but defective in gender local subtypes_and_endings = get_subtypes_and_endings(typ, compare) insert(subtypes_and_endings, {"", typ, {"I"}}) insert(subtypes_and_endings, {"", typ, {"par"}}) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"is", typ, {}}, {"e", typ, {}}, -- Detect -ēs as 3-2 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like isoscelēs). Essentially, -- for declension-3 adjectives, we require that .pl is given -- if the lemma is plural. {"ēs", typ, {}}, {"ēs", typ, {"pl"}}, {"ia", typ, {"pl"}}, }, decl3_stem2) elseif typ == "3-3+" or typ == "3-P+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ēs", typ, {"pl"}, base_as_stem2}, {"ia", typ, {"pl"}, base_as_stem2}, {"", typ, {}}, }, decl3_stem2) elseif typ == "3-C+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, get_subtypes_and_endings(typ, compare), decl3_stem2) elseif typ == "irreg+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(duo)$", typ, {"pl"}}, {"^(ambō)$", typ, {"pl"}}, {"^(mīll?ia)$", typ, {"N", "pl"}, constant_base("mīlle")}, -- match ea {"^(ea)$", typ, {}, constant_base("is")}, -- match id {"^(id)$", typ, {}, constant_base("is")}, -- match plural eī, iī {"^([ei]ī)$", typ, {"pl"}, constant_base("is")}, -- match plural ea, eae {"^(eae?)$", typ, {"pl"}, constant_base("is")}, -- match eadem {"^(eadem)$", typ, {}, constant_base("īdem")}, -- match īdem, idem {"^([īi]dem)$", typ, {}, constant_base("īdem")}, -- match plural īdem {"^(īdem)$", typ, {"pl"}}, -- match plural eadem, eaedem {"^(eae?dem)$", typ, {"pl"}, constant_base("īdem")}, -- match illa, ipsa, ista; it doesn't matter if we overmatch because -- we'll get an error as we use the stem itself in the returned base {"^(i[lps][lst])a$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match illud, istud; as above, it doesn't matter if we overmatch {"^(i[ls][lt])ud$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match ipsum {"^(ipsum)$", typ, {}, constant_base("ipse")}, -- match plural illī, ipsī, istī; as above, it doesn't matter if we -- overmatch {"^(i[lps][lst])ī$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- match plural illa, illae, ipsa, ipsae, ista, istae; as above, it -- doesn't matter if we overmatch {"^(i[lps][lst])ae?$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- Detect quī as non-plural unless .pl specified. {"^(quī)$", typ, {}}, -- Otherwise detect quī as plural. {"^(quī)$", typ, {"pl"}}, -- Same for quae. {"^(quae)$", typ, {}, constant_base("quī")}, {"^(quae)$", typ, {"pl"}, constant_base("quī")}, {"^(quid)$", typ, {}, constant_base("quis")}, {"^(quod)$", typ, {}, constant_base("quī")}, {"^(qui[cd]quid)$", typ, {}, constant_base("quisquis")}, {"^(quīquī)$", typ, {"pl"}, constant_base("quisquis")}, {"^(quaequae)$", typ, {"pl"}, constant_base("quisquis")}, -- match all remaining lemmas in lemma form {"", typ, {}}, }) elseif typ == "indecl+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", typ, {"both"}}, {"", typ, {"sg"}}, {"", typ, {"pl"}}, }) else -- 0+ return lemma, nil, typ, {} end end local noun_lb = { nom_sg = "sg.", gen_sg = "sg.", dat_sg = "sg.", acc_sg = "sg.", abl_sg = "sg.", voc_sg = "sg.", loc_sg = "sg.", nom_pl = "pl.", gen_pl = "pl.", dat_pl = "pl.", acc_pl = "pl.", abl_pl = "pl.", voc_pl = "pl.", loc_pl = "pl." } function export.sust(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de = "num"}, ["nota"] = {}, } for form,_ in pairs(noun_lb) do params[form] = {lista=true} end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local genero local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, detected_subtypes = detect_noun_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end if not genero then if types.M then genero = "m" end if types.N then genero = "n" end if types.F then genero = "f" end end local es_adj if not r1 and genero then local typ r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) if r1 then c = typ es_adj = true end end assert(r1, "forma no reconocida: "..r[1]) local cb = es_adj and adj_decl[c] or noun_decl[c] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) if es_adj then local forms_ = {} for form,arr in pairs(data.forms) do local f1, f2 = form:match("^(.*)(_"..genero..")$") if f1 then forms_[f1] = arr end end data.forms = forms_ end if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, noun_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if declinfo["loc_sg"] and #declinfo["loc_sg"] == 0 then declinfo["loc_sg"] = nil end if declinfo["loc_pl"] and #declinfo["loc_pl"] == 0 then declinfo["loc_pl"] = nil end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local forms = sobreescribir_formas(declinfo, args, false, {}) comprobar_defectivo(forms, {}) forms = desactivar_formas(forms, function (form) return (form:find("pl$") and nopl) or (form:find("sg$") and nosg) end ) local raiz_nom = f(forms["nom_sg"][1] or forms["nom_pl"][1] or "?") local raiz_gen = f(forms["gen_sg"][1] or forms["gen_pl"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, noun_lb) local t = {} insert(t, {{""}, {"Singular"}, {"Plural"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg"], forms["nom_pl"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg"], forms["gen_pl"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg"], forms["dat_pl"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg"], forms["acc_pl"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg"], forms["abl_pl"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg"], forms["voc_pl"]}) if (forms["loc_sg"] and forms["loc_sg"][1]) or (forms["loc_pl"] and forms["loc_pl"][1]) then insert(t, {{"Locativo", header=true, color=COLOR_H}, forms["loc_sg"], forms["loc_pl"]}) end insert(t, {{args["nota"] or "", colspan=3}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_nom..", "..raiz_gen.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local adj_lb = { nom_sg_m = "m.", nom_sg_n = "n.", nom_sg_f = "f.", nom_pl_m = "m.", nom_pl_n = "n.", nom_pl_f = "f.", gen_sg_m = "m.", gen_sg_n = "n.", gen_sg_f = "f.", gen_pl_m = "m.", gen_pl_n = "n.", gen_pl_f = "f.", dat_sg_m = "m.", dat_sg_n = "n.", dat_sg_f = "f.", dat_pl_m = "m.", dat_pl_n = "n.", dat_pl_f = "f.", acc_sg_m = "m.", acc_sg_n = "n.", acc_sg_f = "f.", acc_pl_m = "m.", acc_pl_n = "n.", acc_pl_f = "f.", abl_sg_m = "m.", abl_sg_n = "n.", abl_sg_f = "f.", abl_pl_m = "m.", abl_pl_n = "n.", abl_pl_f = "f.", voc_sg_m = "m.", voc_sg_n = "n.", voc_sg_f = "f.", voc_pl_m = "m.", voc_pl_n = "n.", voc_pl_f = "f.", } function export.adj(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de="num"}, ["gen"] = {por_defecto="mfn"}, ["nota"] = {}, } for form,_ in pairs(adj_lb) do params[form] = {lista=true} end params["dat_pl"] = {lista=true} params["abl_pl"] = {lista=true} params["loc_pl"] = {lista=true} local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) if args["dat_pl"][1] then args["dat_pl_m"] = deep_copy(args["dat_pl"]) args["dat_pl_n"] = deep_copy(args["dat_pl"]) args["dat_pl_f"] = deep_copy(args["dat_pl"]) end if args["abl_pl"][1] then args["abl_pl_m"] = deep_copy(args["abl_pl"]) args["abl_pl_n"] = deep_copy(args["abl_pl"]) args["abl_pl_f"] = deep_copy(args["abl_pl"]) end if args["loc_pl"][1] then args["loc_pl_m"] = deep_copy(args["loc_pl"]) args["loc_pl_n"] = deep_copy(args["loc_pl"]) args["loc_pl_f"] = deep_copy(args["loc_pl"]) end args["dat_pl"] = nil args["abl_pl"] = nil args["loc_pl"] = nil assert(not find(title, " "), "locuciones no soportadas aún") -- REVISAR local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") a = a or subarg b = b or "+" local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end local cb = adj_decl[typ] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) local formas_ = {} -- necesario crear otro arreglo para no modificar las claves durante la iteración for form,arr in pairs(data.forms) do local pref = match(form, "^(.*)_m$") if pref and not data.forms[pref.."_f"] then formas_[pref.."_f"] = deep_copy(arr) end if pref and not data.forms[pref.."_n"] then formas_[pref.."_n"] = deep_copy(arr) end formas_[form] = arr end data.forms = formas_ if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, adj_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local m = find(args["gen"], "m") local fem = find(args["gen"], "f") local n = find(args["gen"], "n") local forms = sobreescribir_formas(declinfo, args, false, {}, adj_lb) comprobar_defectivo(forms) forms = desactivar_formas(forms, function (form) return (form:find("pl") and nopl) or (form:find("sg") and nosg) or (form:find("m$") and not m) or (form:find("f$") and not fem) or (form:find("n$") and not n) end ) local raiz_m = f(forms["nom_sg_m"][1] or forms["nom_pl_m"][1] or "?") local raiz_f = f(forms["nom_sg_f"][1] or forms["nom_pl_f"][1] or "?") local raiz_n = f(forms["nom_sg_n"][1] or forms["nom_pl_n"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, adj_lb) local t = {} insert(t, {{"Singular", colspan=4}, header=true, color=COLOR_H}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg_m"], forms["nom_sg_f"], forms["nom_sg_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg_m"], forms["gen_sg_f"], forms["gen_sg_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg_m"], forms["dat_sg_f"], forms["dat_sg_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg_m"], forms["acc_sg_f"], forms["acc_sg_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg_m"], forms["abl_sg_f"], forms["abl_sg_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg_m"], forms["voc_sg_f"], forms["voc_sg_n"]}) insert(t, {{"Plural", colspan=4, header=true, color=COLOR_H}}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_pl_m"], forms["nom_pl_f"], forms["nom_pl_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_pl_m"], forms["gen_pl_f"], forms["gen_pl_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_pl_m"], forms["dat_pl_f"], forms["dat_pl_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_pl_m"], forms["acc_pl_f"], forms["acc_pl_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_pl_m"], forms["abl_pl_f"], forms["abl_pl_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_pl_m"], forms["voc_pl_f"], forms["voc_pl_n"]}) insert(t, {{args["nota"] or "", colspan=4}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_m..", "..raiz_f..", "..raiz_n.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local EGO, TU, IS, NOS, VOS, EI = 1, 2, 3, 4, 5, 6 local tostr = {"1", "2", "3", "4", "5", "6"} local PRONOMBRES = {"ego", "tū", "is, ea, id", "nōs", "vōs", "eī, eae, ea"} local PRONOMBRES_SUBJ = {"ut ego", "ut tū", "ut is, ut ea, ut id", "ut nōs", "ut vōs", "ut eī, ut eae, ut ea"} local PRONOMBRES_IMP = {"―", "(tū)", "(is, ea, id)", "―", "(vōs)", "(eī, eae, ea)"} local IMPERSONALES = {"", "", "(id)", "", "", ""} local function obtener_pronombre(forma, impers) local conj, p = match(forma, "^(.*)(%d)$") if not p then return nil end p = tonumber(p) if impers then return IMPERSONALES[p] else if find(conj, "^subj") then return PRONOMBRES_SUBJ[p] end if find(conj, "^imper") then return PRONOMBRES_IMP[p] end return PRONOMBRES[p] end end local sufijos = { ["1"] = { inf_act = {"āre","isse"}, inf_pas = {"ārī"}, part_act = {"āns","ūrus"}, part_pas = {"andus","us"}, ger = {"andī","andō","andum"}, sup = {"um","ū"}, ind_pres = {"ō","ās","at","āmus","ātis","ant"}, ind_imp = {"ābam","ābās","ābat","ābāmus","ābātis","ābant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ābō","ābis","ābit","ābimus","ābitis","ābunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","āris","ātur","āmur","āminī","antur", nil,"āre"}, ind_imp_pas = {"ābar","ābāris","ābātur","ābāmur","ābāminī","ābantur", nil,"ābāre"}, ind_fut_pas = {"ābor","āberis","ābitur","ābimur","ābiminī","ābuntur", nil,"ābere"}, subj_pres = {"em","ēs","et","ēmus","ētis","ent"}, subj_imp = {"ārem","ārēs","āret","ārēmus","ārētis","ārent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"er","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_imp_pas = {"ārer","ārēris","ārētur","ārēmur","ārēminī","ārentur", nil,"ārēre"}, imper_pres = {nil,"ā",nil,nil,"āte",nil}, imper_fut = {nil,"ātō","ātō",nil,"ātōte","antō"}, imper_pres_pas = {nil,"āre",nil,nil,"āminī",nil}, imper_fut_pas = {nil,"ātor","ātor",nil,nil,"antor"}, }, ["2"] = { inf_act = {"ēre","isse"}, inf_pas = {"ērī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"eō","ēs","et","ēmus","ētis","ent"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ēbō","ēbis","ēbit","ēbimus","ēbitis","ēbunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"eor","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ēbor","ēberis","ēbitur","ēbimur","ēbiminī","ēbuntur", nil,"ēbere"}, subj_pres = {"eam","eās","eat","eāmus","eātis","eant"}, subj_imp = {"ērem","ērēs","ēret","ērēmus","ērētis","ērent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ear","eāris","eātur","eāmur","eāminī","eantur", nil,"eāre"}, subj_imp_pas = {"ērer","ērēris","ērētur","ērēmur","ērēminī","ērentur", nil,"ērēre"}, imper_pres = {nil,"ē",nil,nil,"ēte",nil}, imper_fut = {nil,"ētō","ētō",nil,"ētōte","entō"}, imper_pres_pas = {nil,"ēre",nil,nil,"ēminī",nil}, imper_fut_pas = {nil,"ētor","ētor",nil,nil,"entor"}, }, ["3"] = { -- 3 (comparar [[capio]] con [[lego]], las raíces con capi- y leg- pero hay que eliminar la doble ii) inf_act = {"ere","isse"}, inf_pas = {"ī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", nil,"ere"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_pres = {"am","ās","at","āmus","ātis","ant"}, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", nil,"āre"}, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", nil,"erēre"}, imper_pres = {nil,"e",nil,nil,"ite",nil}, imper_fut = {nil,"itō","itō",nil,"itōte","untō"}, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil}, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor"}, }, ["3/4"] = { inf_act = {"ere","isse","īre","isse"}, inf_pas = {"ī","īrī"}, part_act = {"ēns","iēns","ūrus"}, part_pas = {"endus","iendus","us"}, ger = {"endī","endō","endum","iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt", "iō","īs",nil,"īmus","ītis","iunt" }, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant", "iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant" }, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent", "iam","iēs","iet","iēmus","iētis","ient" }, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", "ior","ere","ītur","īmur","īminī","iuntur", nil,"īris",nil,nil,nil,nil, nil,"īre" }, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", "iēbar","ēbāre","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāris",nil,nil,nil,nil, nil,"iēbāre" }, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", "iar","ēre","iētur","iēmur","iēminī","ientur", nil,"iēris",nil,nil,nil,nil, nil,"iēre" }, subj_pres = {"am","ās","at","āmus","ātis","ant", "iam","iās","iat","iāmus","iātis","iant", }, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent", "īrem","īrēs","īret","īrēmus","īrētis","īrent" }, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", "iar","āre","iātur","iāmur","iāminī","iantur", nil,"iāris",nil,nil,nil,nil, nil,"iāre" }, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", "īrer","erēre","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēris",nil,nil,nil,nil, nil,"īrēre" }, imper_pres = {nil,"e",nil,nil,"ite",nil, nil,"ī",nil,nil,"īte",nil }, imper_fut = {nil,"itō","itō",nil,"itōte","untō", nil,"ītō","ītō",nil,"ītōte","iuntō" }, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil, nil,"īre",nil,nil,"īminī",nil }, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor", nil,"ītor","ītor",nil,nil,"iuntor" }, }, ["4"] = { inf_act = {"īre","isse"}, inf_pas = {"īrī"}, part_act = {"iēns","ūrus"}, part_pas = {"iendus","us"}, ger = {"iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"iō","īs","it","īmus","ītis","iunt"}, ind_imp = {"iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"iam","iēs","iet","iēmus","iētis","ient"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"ior","īris","ītur","īmur","īminī","iuntur", nil,"īre"}, ind_imp_pas = {"iēbar","iēbāris","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāre"}, ind_fut_pas = {"iar","iēris","iētur","iēmur","iēminī","ientur", nil,"iēre"}, subj_pres = {"iam","iās","iat","iāmus","iātis","iant"}, subj_imp = {"īrem","īrēs","īret","īrēmus","īrētis","īrent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"iar","iāris","iātur","iāmur","iāminī","iantur", nil,"iāre"}, subj_imp_pas = {"īrer","īrēris","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēre"}, imper_pres = {nil,"ī",nil,nil,"īte",nil}, imper_fut = {nil,"ītō","ītō",nil,"ītōte","iuntō"}, imper_pres_pas = {nil,"īre",nil,nil,"īminī",nil}, imper_fut_pas = {nil,"ītor","ītor",nil,nil,"iuntor"}, } } local formas_no_personales = { inf_act = true, inf_pas = true, part_act = true, part_pas = true, ger = true, sup = true, } local formas_personales = { ind_pres = true, ind_imp = true, ind_perf = true, ind_pluperf = true, ind_fut = true, ind_fut_perf = true, ind_fut_sig = true, ind_pres_pas = true, ind_imp_pas = true, ind_fut_pas = true, subj_pres = true, subj_imp = true, subj_perf = true, subj_pluperf = true, subj_aor_sig = true, subj_pres_pas = true, subj_imp_pas = true, imper_pres = true, imper_fut = true, imper_pres_pas = true, imper_fut_pas = true, } local formas = merge(formas_no_personales, formas_personales) local verbos_irregulares = { {"aiō", {"aiō", "aiiō", "aijō", "ajō"}, { desactivar = {"inf_pas","part_pas","ger","sup","ind_pluperf","ind_fut","ind_fut_perf", "ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_perf","subj_pluperf","subj_pres_pas", "subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {"ai"}, nucleoperf = {"a"}, nucleosup = {}, nucleosigm = {}, inf_act = {"aiere"}, ind_pres = {nil,nil,nil,{}}, ind_perf = {{},nil,nil,{},{}}, subj_pres = {nil,nil,nil,{},{}}, subj_imp = {{},{},nil,{},{},{}}, imper_pres = {{},{"ai"},{},{},{},{}}, }}, {"cedo", {"cedo"}, { desactivar = {"inf_act","inf_pas","part_act","part_pas","ger","sup","ind_pluperf","ind_pres","ind_imp","ind_perf", "ind_fut","ind_fut_perf","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres","subj_imp","subj_perf", "subj_pluperf","subj_pres_pas","subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, imper_pres = {nil,{"cedo"},nil,nil,{"cette","cedile"},nil}, }}, {"dīcō", {"dīcō"}, { conj = "3", nucleopres = {"dīc"}, nucleoperf = {"dīx"}, nucleosup = {"dict"}, nucleosigm = {"dīx"}, desactivar = {}, imper_pres = {nil, {"dīc", "dīce"}}, inf_pas = {"dīcī", "dīcier{L}"}, }}, {"dō", {"dō"}, { conj = "1", nucleopres = {"d"}, nucleoperf = {"ded"}, nucleosup = {"dat"}, nucleosigm = {}, desactivar = {}, inf_act = {"dare","dedisse"}, inf_pas = {"darī"}, ind_pres = {nil,nil,nil,{"damus"},{"datis"},nil}, ind_imp = {{"dabam"},{"dabās"},{"dabat"},{"dabāmus"},{"dabātis"},{"dabant"}}, ind_fut = {{"dabō"},{"dabis"},{"dabit"},{"dabimus"},{"dabitis"},{"dabunt"}}, ind_imp_pas = {{"dabar"},{"dabāris","dabāre"},{"dabātur"},{"dabāmur"},{"dabāminī"},{"dabantur"}}, ind_fut_pas = {{"dabor"},{"daberis","dabere"},{"dabitur"},{"dabimur"},{"dabiminī"},{"dabuntur"}}, subj_imp = {{"darem"},{"darēs"},{"daret"},{"darēmus"},{"darētis"},{"darent"}}, subj_imp_pas = {{"darer"},{"darēris","darēre"},{"darētur"},{"darēmur"},{"darēminī"},{"darentur"}}, imper_pres = {nil,nil,nil,nil,{"date"},nil}, imper_fut = {nil,{"datō"},{"datō"},nil,{"datōte"},{"dantō"}}, imper_pres_pas = {nil,{"dare"},nil,nil,{"daminī"},nil}, imper_fut_pas = {nil,{"dator"},{"dator"},nil,nil,{"dator"}}, }}, {"dūcō", {"dūcō"}, { conj = "3", nucleopres = {"dūc"}, nucleoperf = {"dūx"}, nucleosup = {"duct"}, nucleosigm = {}, desactivar = {}, imper_pres = {nil, {"dūc", "dūce"}}, }}, {"edō", {"edō", "ëdō"}, { conj = "3", nucleopres = {"ed"}, nucleoperf = {"ed"}, nucleosup = {""}, nucleosigm = {}, desactivar = {}, inf_act = {"edere","ēsse"}, part_act = {"edēns","ēsūrus","ēssūrus","ēstūrus"}, part_pas = {"edendus","edundus","ēsus","ēssus","ēstus"}, sup = {"ēsum","ēssum","ēstum","ēsū","ēssū","ēstū"}, ind_pres = {nil,{"edis","ēs"},{"edit","ēst"},nil,{"editis","ēstis"},nil}, ind_pres_pas = {nil,{"ederis","edere","ēssis","ēsse"},{"editur","ēstur"}}, subj_pres = {{"edam","edim"},{"edās","edīs"},{"edat","edit","ēst"},{"edāmus","edīmus"},{"edātis","edītis"},{"edant","edint"}}, subj_imp = {{"ederem","ēssem"},{"ederēs","ēssēs"},{"ederet","ēsset"},{"ederēmus","ēssēmus"},{"ederētis","ēssētis"},{"ederent","ēssent"}}, subj_imp_pas = {{"ederer","ēsser"},{"ederēris","ederēre","ēssēris","ēssēre"},{"ederetur","ēssetur"},{"ederēmur","ēssēmur"},{"ederēminī","ēssēminī"},{"ederentur","ēssentur"}}, imper_pres = {nil,{"ede","ēs"},nil,nil,{"edite","ēste"},nil}, imper_fut = {nil,{"editō","ēstō"},{"editō","ēstō"},nil,{"editōte","ēstōte"},{"eduntō"}}, imper_pres_pas = {nil,{"edere","ēsse"},nil,nil,{"ediminī"},nil}, imper_fut_pas = {nil,{"editor","ēstor"},{"editor","ēstor"},nil,nil,{"eduntor"}}, }}, {"eō", {"eō", "ëō"}, { conj = "4", nucleopres = {""}, nucleoperf = {""}, nucleosup = {""}, nucleosigm = {}, desactivar = {"imper_pres_pas"}, inf_act = {"īre","īsse","iisse","īvisse"}, inf_pas = {"īrī","īrier"}, part_act = {"iēns","itūrus"}, part_pas = {"eundum","itum"}, ger = {"eundī","eundō","eundum"}, sup = {"itum","itū"}, ind_pres = {{"eō"},{"īs"},{"it"},{"īmus"},{"ītis"},{"eunt"}}, ind_imp = {{"ībam"},{"ībās"},{"ībat"},{"ībāmus"},{"ībātis"},{"ībant"}}, ind_perf = {{"iī","īvī"},{"īstī","iistī","īvistī"},{"iit","īvit"},{"iimus","īvimus"},{"īstis","iistis","īvistis"},{"iērunt","iēre","īvērunt","īvēre"}}, ind_pluperf = {{"ieram","īveram"},{"ierās","īverās"},{"ierat","īverat"},{"ierāmus","īverāmus"},{"ierātis","īverātis"},{"ierant","īverant"}}, ind_fut = {{"ībō"},{"ībis"},{"ībit"},{"ībimus"},{"ībitis"},{"ībunt"}}, ind_fut_perf = {{"ierō","īverō"},{"ieris","īveris"},{"ierit","īverit"},{"ierimus","īverimus"},{"ieritis","īveritis"},{"ierint","īverint"}}, ind_fut_sig = {nil,nil,nil,nil,nil,nil}, ind_pres_pas = {{},{},{"ītur"},{},{},{}}, ind_imp_pas = {{},{},{"ībātur"},{},{},{}}, ind_fut_pas = {{},{},{"ībitur"},{},{},{}}, subj_pres = {{"eam"},{"eās"},{"eat"},{"eāmus"},{"eātis"},{"eant"}}, subj_imp = {{"īrem"},{"īrēs"},{"īret"},{"īrēmus"},{"īrētis"},{"īrent"}}, subj_perf = {{"ierim","īverim"},{"ierīs","īverīs"},{"ierit","īverit"},{"ierīmus","īverīmus"},{"ierītis","īverītis"},{"ierint","īverint"}}, subj_pluperf = {{"īssem","iissem","īvissem"},{"īssēs","iissēs","īvissēs"},{"īsset","iisset","īvisset"},{"īssēmus","iissēmus","īvissēmus"},{"īssētis","iissētis","īvissētis"},{"īssent","iissent","īvissent"}}, subj_aor_sig = {nil,nil,nil,nil,nil,nil}, subj_pres_pas = {{},{},{"eātur"},{},{},{}}, subj_imp_pas = {{},{},{"īrētur"},{},{},{}}, imper_pres = {nil,nil,nil,nil,nil,nil}, imper_fut = {nil,nil,nil,nil,nil,{"euntō"}}, imper_fut_pas = {nil,{},nil,nil,nil,{}}, }}, {"faciō", {"faciō"}, { conj = "3", I = true, inf_act = {"facere", "fāre", "fēcisse"}, inf_pas = {"fierī"}, part_pas = {"faciendus", "faciundus", "factus"}, nucleopres = {"fac"}, nucleoperf = {"fēc"}, nucleosup = {"fact"}, nucleosigm = {"fax","faxs","facs"}, desactivar = {}, ind_pres_pas = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, ind_imp_pas = {{"fīēbam"},{"fīēbās"},{"fīēbat"},{"fīēbāmus"},{"fīēbātis"},{"fīēbant"}}, ind_fut_pas = {{"fīam"},{"fīēs"},{"fīet"},{"fīēmus"},{"fīētis"},{"fīent"}}, subj_pres_pas = {{"fīam"},{"fīās"},{"fīat"},{"fīāmus"},{"fīātis"},{"fīant"}}, subj_imp_pas = {{"fierem"},{"fierēs"},{"fieret"},{"fierēmus"},{"fierētis"},{"fierent"}}, imper_pres = {nil,{"fac","face"},nil,nil,nil,nil}, imper_pres_pas = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut_pas = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"ferō", {"ferō"}, { conj = "3", nucleopres = {"fer"}, nucleoperf = {"tul", "tetul{†}"}, nucleosup = {"lāt"}, nucleosigm = {}, desactivar = {}, inf_act = {"ferre", "tulisse", "tetulisse{†}"}, inf_pas = {"ferrī"}, ind_pres = {nil,{"fers"},{"fert"},nil,{"fertis"}}, ind_pres_pas = {nil,{"ferris","ferre"}}, subj_imp = {{"ferrem"},{"ferrēs"},{"ferret"},{"ferrēmus"},{"ferrētis"},{"ferrent"}}, subj_imp_pas = {{"ferrer"},{"ferrēris","ferrēre"},{"ferrētur"},{"ferrēmur"},{"ferrēminī"},{"ferrentur"}}, imper_pres = {nil,{"fer"},nil,nil,{"ferte"},nil}, imper_pres_pas = {nil,{"ferre"},nil,nil,nil,nil}, imper_fut = {nil,{"fertō"},{"fertō"},nil,{"fertōte"},{"feruntō"}}, imper_fut_pas = {nil,{"fertor"},{"fertor"},nil,nil,nil}, }}, {"fīō", {"fīō"}, { conj = "3", nucleopres = {"fī"}, nucleoperf = {}, nucleosup = {"fact"}, nucleosigm = {}, semidep = true, desactivar = {}, ind_pres = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, imper_pres = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"feruntō"}}, }}, {"inquam", {"inquam"}, { conj = "3", nucleopres = {"inqui"}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, nopasivo = true, desactivar = {"inf_act","inf_pas","part_pas","ger"}, ind_pres = {{"inquam"}}, }}, {"possum", {"possum"}, { conj = "3", nucleopres = {"pot"}, nucleoperf = {"pot"}, nucleosup = {}, nucleosigm = {}, pres = "possō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"posse","potesse{†}"}, part_act = {"potēns"}, ind_pres = {{"possum"},{"potes"},{"potest"},{"possumus"},{"potestis"},{"possunt"}}, ind_imp = {{"poteram"},{"poterās"},{"poterat"},{"poterāmus"},{"poterātis"},{"poterant"}}, ind_fut = {{"poterō"},{"poteris","potere"},{"poterit"},{"poterimus"},{"poteritis"},{"poterunt"}}, ind_perf = {{"potuī"},{"potuistī"},{"potuit"},{"potuimus"},{"potuistis"},{"potuērunt","potuēre"}}, ind_pluperf = {{"potueram"},{"potuerās"},{"potuerat"},{"potuerāmus"},{"potuerātis"},{"potuerant"}}, ind_fut_perf = {{"potuerō"},{"potueris"},{"potuerit"},{"potuerimus"},{"potueritis"},{"potuerunt"}}, subj_pres = {{"possem"},{"possēs"},{"possēt"},{"possēmus"},{"possētis"},{"possent"}}, subj_imp = {{"possim"},{"possīs"},{"possit"},{"possīmus"},{"possītis"},{"possint"}}, subj_perf = {{"potuerim"},{"potuerīs"},{"potuerit"},{"potuerīmus"},{"potuerītis"},{"potuerint"}}, subj_pluperf = {{"potuissem"},{"potuissēs"},{"potuisset"},{"potuissēmus"},{"potuissētis"},{"potuissent"}}, }}, {"sum", {"sum"}, { conj = "3", nucleopres = {"s"}, nucleoperf = {"fu"}, nucleosup = {}, nucleosigm = {}, pres = "sō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres_pas","imper_fut_pas"}, inf_act = {"esse"}, part_act = {"futūrus"}, ind_pres = {{"sum"},{"es"},{"est"},{"sumus"},{"estis"},{"sunt"}}, ind_imp = {{"eram"},{"erās"},{"erat"},{"erāmus"},{"erātis"},{"erant"}}, ind_fut = {{"erō"},{"eris","ere"},{"erit"},{"erimus"},{"eritis"},{"erunt"}}, subj_pres = {{"sim","siem","fuam{†}"},{"sīs","siēs","fuās{†}"},{"sit","siet","fuat{†}"},{"sīmus","siēmus","fuāmus{†}"},{"sītis","siētis","fuātis{†}"},{"sint","sient","fuant{†}"}}, subj_imp = {{"essem","forem"},{"essēs","forēs"},{"esset","foret"},{"essēmus","forēmus"},{"essētis","forētis"},{"essent","forent"}}, imper_pres = {nil,{"es"},nil,nil,{"este"},nil}, imper_fut = {nil,{"estō"},{"estō"},nil,{"estōte"},nil}, }}, {"mālō", {"mālō"}, { conj = "3", nucleopres = {"māl"}, nucleoperf = {"mālu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"mālle","māluisse"}, ind_pres = {{"mālō"},{"māvīs"},{"māvult"},{"mālumus"},{"māvultis"},{"mālunt"}}, subj_pres = {{"mālim"},{"mālīs"},{"mālit"},{"mālīmus"},{"mālītis"},{"mālint"}}, subj_imp = {{"māllem"},{"māllēs"},{"māllet"},{"māllēmus"},{"māllētis"},{"māllent"}}, }}, {"nōlō", {"nōlō"}, { conj = "3", nucleopres = {"nōl"}, nucleoperf = {"nōlu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"nōlle","nōluisse"}, ind_pres = {{"nōlō"},{"nōn vīs","nevīs{†}"},{"nōn vult","nōn volt","nevolt{†}"},{"nōlumus"},{"nōn vultis","nōn voltis","nōltis{†}"},{"nōlunt"}}, subj_pres = {{"nōlim"},{"nōlīs"},{"nōlit"},{"nōlīmus"},{"nōlītis"},{"nōlint"}}, subj_imp = {{"nōllem"},{"nōllēs"},{"nōllet"},{"nōllēmus"},{"nōllētis"},{"nōllent"}}, }}, {"volō", {"volō"}, { conj = "3", nucleopres = {"vol"}, nucleoperf = {"volu"}, nucleosup = {"volit"}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"velle","voluisse"}, ind_pres = {{"volō"},{"vīs"},{"vult","volt{†}"},{"volumus"},{"vultis","voltis{†}"},{"volunt"}}, subj_pres = {{"velim","volim{†}"},{"velīs","volīs{†}"},{"velit","volit{†}"},{"velīmus","volīmus{†}"},{"velītis","volītis{†}"},{"velint","volint{†}"}}, subj_imp = {{"vellem"},{"vellēs"},{"vellet"},{"vellēmus"},{"vellētis"},{"vellent"}}, }}, } local function combinar_prefijo_nucleosufijo(prefijo, nucleosufijo) return prefijo..nucleosufijo end local function combinar_nucleo_sufijo(nucleo, sufijo, agregar_i) if agregar_i and (not find(sufijo, "^[iī]")) and (sufijo ~= "e") and (not find(sufijo, "^er")) then return nucleo.."~i~"..sufijo end return nucleo..sufijo end local function agregar_forma(conjugado, conjinfo, forma) conjinfo[forma] = conjinfo[forma] or {} local sufijos_ = sufijos[conjinfo.conj][forma] local nucleos local prefijo if forma == "sup" then nucleos = conjinfo.nucleosup prefijo = conjinfo.prefijosup or conjinfo.prefijo elseif find(forma, "sig") then nucleos = conjinfo.nucleosigm prefijo = conjinfo.prefijosigm or conjinfo.prefijo elseif find(forma, "perf") then nucleos = conjinfo.nucleoperf prefijo = conjinfo.prefijoperf or conjinfo.prefijo else nucleos = conjinfo.nucleopres prefijo = conjinfo.prefijo end if formas_no_personales[forma] then if conjinfo[forma][1] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma]) do insert_if_not(conjugado[forma], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else for _, sufijo in ipairs(sufijos_) do local nucleos_ = nucleos if forma == "inf_act" and sufijo == "isse" then nucleos_ = conjinfo.nucleoperf elseif forma == "part_act" and sufijo == "ūrus" then nucleos_ = conjinfo.nucleosup elseif forma == "part_pas" and sufijo == "us" then nucleos_ = conjinfo.nucleosup end local agregar_i = conjinfo.I and nucleos_ == conjinfo.nucleopres for _,nucleo in ipairs(nucleos_) do insert_if_not(conjugado[forma], combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(nucleo, sufijo, agregar_i))) end end end return end for i = EGO, EI do local p = tostr[i] if conjinfo[forma][i] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma][i]) do insert_if_not(conjugado[forma..p], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else local k = i while sufijos_[k] do local agregar_i = conjinfo.I and nucleos == conjinfo.nucleopres for j, n in ipairs(nucleos) do local x = combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(n, sufijos_[k], agregar_i)) if conjinfo.always_sync_perf and (forma == "ind_perf" or forma == "ind_pluperf" or forma == "ind_fut_perf" or forma == "subj_perf" or forma == "subj_pluperf") then x = x:gsub("īvī", "iī") x = x:gsub("īvi", "ī") x = x:gsub("īve", "ī") x = x:gsub("īvē", "ē") end insert_if_not(conjugado[forma..p], x) end k = k + 6 end end end end local function get_subtype_by_ending(pres, conjinfo, specs) for _, spec in ipairs(specs) do local base = extract_base(pres, spec[1]) if base then for _,s in ipairs(spec[2]) do if conjinfo[s] == nil then conjinfo[s] = true end end return base end end error("Unrecognized ending for conjugation " .. conjinfo["conj"]) end local function detect_v_type_and_subtypes(conjinfo) local pres = conjinfo["v"] local conj_arg = conjinfo["conj"] pres = toNFC(pres) local base_conj_arg, auto_perf_supine = conj_arg:match("^([124]/?4?)(%+%+?)$") if base_conj_arg then if auto_perf_supine == "++" and base_conj_arg ~= "4" then error("Conjugation types 1++ and 2++ not allowed") end conj_arg = base_conj_arg end conjinfo.conj = conj_arg if conj_arg == "1" then local base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"at", {"impers"}}, {"ātur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "āv" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "āt" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "āss" end end elseif conj_arg == "2" then local base = get_subtype_by_ending(pres, conjinfo, { {"eō", {}}, {"eor", {"dep"}}, {"et", {"impers"}}, {"ētur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "u" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "it" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3" then local base if conjinfo.I == false then -- si explícitamente se indicó que no es del tipo -io, hay que excluir sufijos base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) else base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) end if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end assert(conjinfo["nucleoperf"][1], "especifique todos los núcleos para verbos de la tercera conjugación") assert(conjinfo["nucleosup"][1], "especifique todos los núcleos para verbos de la tercera conjugación") if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3/4" then local base base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "4" then local base = get_subtype_by_ending(pres, conjinfo, { {"iō", {}}, {"ior", {"dep"}}, {"it", {"impers"}}, {"ītur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "irreg" then for _,p in ipairs(verbos_irregulares) do for _,rx in ipairs(p[2]) do local pref, verb = match(conjinfo.v, "^(.*)("..rx..")$") if verb then conjinfo.v = verb conjinfo.prefijo = pref if conjinfo.nucleoperf[1] and conjinfo.nucleoperf[1] ~= "-" then -- [[ecfero]] conjinfo.prefijoperf = conjinfo.nucleoperf[1] conjinfo.nucleoperf = {} end if conjinfo.nucleosup[1] and conjinfo.nucleosup[1] ~= "-" then conjinfo.prefijosup = conjinfo.nucleosup[1] conjinfo.nucleosup = {} end if conjinfo.nucleosigm[1] and conjinfo.nucleosigm[1] ~= "-" then conjinfo.prefijosigm = conjinfo.nucleosigm[1] conjinfo.nucleosigm = {} end conjinfo.irreg = true conjinfo.conj = p[3].conj for k,val in pairs(p[3]) do if not conjinfo[k] or (type(conjinfo[k]) == "table" and not conjinfo[k][1]) then conjinfo[k] = deep_copy(val) end end return conjinfo end end end error("Unrecognized conjugation '" .. conj_arg .. "'") else error("Unrecognized conjugation '" .. conj_arg .. "'") end return conjinfo end function export.v(frame) local title_ = mw.title.getCurrentTitle() local tit = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {alias_de = "conj"}, [2] = {alias_de = "pres"}, [3] = {alias_de = "nucleoperf"}, [4] = {alias_de = "nucleosup"}, [5] = {alias_de = "nucleosigm"}, ["impers"] = {}, -- pas para formas pasivas solamente ["impersonal"] = {alias_de = "impers"}, ["dep"] = {tipo="bool"}, ["depon"] = {alias_de="dep"}, ["deponente"] = {alias_de="dep"}, ["semidep"] = {tipo="bool"}, ["semidepon"] = {alias_de="semidep"}, ["semideponente"] = {alias_de="semidep"}, ["sigm"] = {tipo="bool"}, ["nopasivo"] = {tipo="bool"}, ["soloperf"] = {tipo="bool"}, ["I"] = {tipo="bool"}, ["p3inf"] = {tipo="bool"}, -- sin uso ["poet_sync_perf"] = {tipo="bool"}, -- sin uso ["always_sync_perf"] = {tipo="bool"}, -- solo en [[saevio]] ["conj"] = {requerido=true}, ["pres"] = {requerido=true}, ["nucleopres"] = {lista = true}, ["nucleoperf"] = {lista = true}, ["nucleosup"] = {lista = true}, ["nucleosigm"] = {lista = true}, ["núcleopres"] = {alias_de="nucleopres"}, ["núcleoperf"] = {alias_de="nucleoperf"}, ["núcleosup"] = {alias_de="nucleosup"}, ["paradigma"] = {lista = true}, ["desactivarnucleos"] = {tipo="bool", por_defecto=true}, -- para [[-o]] ["nota"] = {}, } local conjugado = {} for forma,_ in pairs(formas_no_personales) do params[forma] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma] = {} end for forma,_ in pairs(formas_personales) do for i,s in ipairs(tostr) do params[forma..s] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma..s] = {} if i == 1 then params[forma] = {alias_de=forma..s} end end end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) assert(not find(tit, " "), "locuciones no soportadas aún") assert(not (args["dep"] and args["semidep"]), "un verbo no puede ser deponente y semideponente a la vez") local conjinfo = { conj = args.conj, prefijo="", v=args.pres, desactivar = {}, dep=args.dep, semidep=args.semidep, sigm=args.sigm, impers=args.impers, nopasivo=args.nopasivo, soloperf=args.soloperf, I=args.I, p3inf=args.p3inf, poet_sync_perf=args.poet_sync_perf, -- sin uso always_sync_perf=args.always_sync_perf, nucleopres = deep_copy(args.nucleopres), nucleoperf = deep_copy(args.nucleoperf), nucleosup = deep_copy(args.nucleosup), nucleosigm = deep_copy(args.nucleosigm) } conjinfo = detect_v_type_and_subtypes(conjinfo) conjinfo.conj = conjinfo.conj if conjinfo.impers == true then conjinfo.impers = "3" end -- no puede ir conjinfo acá abajo porque si es un sufijo va a quedar "-" en la raíz, lo que anularía todas las formas conjugadas, tiene que venir directo de args if args.desactivarnucleos then if args.nucleopres[1] == "-" then conjinfo.nucleopres = {} end if args.nucleoperf[1] == "-" then conjinfo.nucleoperf = {} end if args.nucleosup[1] == "-" then conjinfo.nucleosup = {} end if args.nucleosigm[1] == "-" then conjinfo.nucleosigm = {} end end local es_irregular = conjinfo.irreg for _,d in ipairs(conjinfo.desactivar) do if formas_no_personales[d] then args[d] = {"no"} else args[d.."2"] = {"no"} end end for forma,_ in pairs(formas) do agregar_forma(conjugado, conjinfo, forma) end local resultante = sobreescribir_formas(conjugado, args) local mostrar_fut_sig = #resultante["ind_fut_sig1"] > 0 local mostrar_aor_sig = #resultante["subj_aor_sig1"] > 0 local defectivo = comprobar_defectivo(resultante, {"^imper", "_sig"}, tostr) local defect2 resultante, defect2 = desactivar_formas(resultante, function (form) return (conjinfo.nopasivo and form:find("_pas")) or (conjinfo.soloperf and not form:find("perf")) or (conjinfo.impers == "pas" and form:find("_pas[^3]")) or (conjinfo.impers == "pas3" and form:find("_pas[^3]")) or (conjinfo.impers == "pas36" and form:find("_pas[^36]")) end ) if defect2 then defectivo = true end -- por ahora innecesario -- local part_no_adj = {} -- for _,e in ipairs(resultante.part) do -- if (find(e, 'PART') or not find(e, 'ADJ')) and not find(e, "†") then -- insert(part_no_adj, gsub1(e, '%b{}', '')) -- end -- end local tit_pres = f(resultante["ind_pres1"][1] or "―") local tit_inf = f(resultante["inf_act"][1] or "―") local tit_perf = f(resultante["ind_perf1"][1] or "―") local tit_sup = f(resultante["sup"][1] or "―") resultante = agregar_enlaces(resultante, tit, normalizar_enlace) local es_impersonal = conjinfo.impers resultante = formatear_formas(resultante, function (x) return obtener_pronombre(x, es_impersonal) end) local impers = conjinfo.impers local cs, cs1, cs2, fila_pronombres_ind, fila_pronombres_subj, fila_pronombres_imper, mostrar_imper if impers == "3" then fila_pronombres_ind = {"", "(id)", color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", "(quod id)", color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", "(id)", color=COLOR_IMPER, header=true, class="pc"} cs = 2 elseif impers == "36" then error("no soportado actualmente") cs = 3 else fila_pronombres_ind = {"", PRONOMBRES[1], PRONOMBRES[2], PRONOMBRES[3], PRONOMBRES[4], PRONOMBRES[5], PRONOMBRES[6], color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", PRONOMBRES_SUBJ[1], PRONOMBRES_SUBJ[2], PRONOMBRES_SUBJ[3], PRONOMBRES_SUBJ[4], PRONOMBRES_SUBJ[5], PRONOMBRES_SUBJ[6], color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", PRONOMBRES_IMP[1], PRONOMBRES_IMP[2], PRONOMBRES_IMP[3], PRONOMBRES_IMP[4], PRONOMBRES_IMP[5], PRONOMBRES_IMP[6], color=COLOR_IMPER, header=true, class="pc"} cs = 7 mostrar_imper = true end cs1 = cs -- math.floor(cs / 2) -- cs2 = cs - cs1 local t = {} insert(t, {{"Formas no personales (verboides)", colspan=cs}, color=COLOR_H, header=true}) if impers == "3" then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else resultante.inf_act.colspan = cs1-1 resultante.inf_pas.colspan = cs1-1 resultante.part_act.colspan = cs1-1 resultante.part_pas.colspan = cs1-1 resultante.ger.colspan = cs1-1 resultante.sup.colspan = cs1-1 if not conjinfo.dep then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) end if not conjinfo.semidep then insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) end if not conjinfo.dep then insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) end if not conjinfo.semidep then insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) end insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) end local function ic(tiempo) if impers == "3" then return resultante[tiempo.."3"] elseif impers == "36" then return resultante[tiempo.."3"], resultante[tiempo.."6"] end return resultante[tiempo.."1"], resultante[tiempo.."2"], resultante[tiempo.."3"], resultante[tiempo.."4"], resultante[tiempo.."5"], resultante[tiempo.."6"] end insert(t, {{"Formas personales", colspan=cs}, color=COLOR_H, header=true}) insert(t, {{"Modo indicativo", colspan=cs}, color=COLOR_IND, header=true}) insert(t, fila_pronombres_ind) if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) end if not conjinfo.dep and not conjinfo.semidep then insert(t, {{"Pretérito perfecto", color=COLOR_IND, header=true}, ic("ind_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_IND, header=true}, ic("ind_pluperf")}) insert(t, {{"Futuro perfecto", color=COLOR_IND, header=true}, ic("ind_fut_perf")}) end if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) end insert(t, {{"Modo subjuntivo", colspan=cs}, color=COLOR_SUBJ, header=true}) insert(t, fila_pronombres_subj) if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) end if not conjinfo.dep and not conjinfo.semidep then insert(t, {{"Pretérito perfecto", color=COLOR_SUBJ, header=true}, ic("subj_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_SUBJ, header=true}, ic("subj_pluperf")}) end if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) end insert(t, {{"Modo imperativo", colspan=cs}, color=COLOR_IMPER, header=true}) insert(t, fila_pronombres_imper) if mostrar_imper then if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) end else insert(t, {{"Como verbo "..(impers == "3" and "impersonal" or "terciopersonal")..", ''"..tit.."'' CARECE de imperativo", color=COLOR_IMPER, header=true, colspan=cs}}) end insert(t, {{f("Leyenda: † arcaico, x no normativo, ~■~ cambio ortográfico, #■# irregularidad"), colspan=cs}}) args["nota"] = args["nota"] or "" if conjinfo.impers == "utc3" then args["nota"] = args["nota"].." NOTA: se usa también como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "umc3" then args["nota"] = args["nota"].." NOTA: se usa más como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "utc36" then args["nota"] = args["nota"].." NOTA: se usa también como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "umc36" then args["nota"] = args["nota"].." NOTA: se usa más como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "pas" or conjinfo.imeprs == "pas3" then args["nota"] = args["nota"].." NOTA: impersonal para las formas pasivas" end if conjinfo.impers == "pas36" then args["nota"] = args["nota"].." NOTA: formas pasivas terciopersonales (solamente tercera persona singular y plural)" end if conjinfo.soloperf then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas del perfecto y pluscuamperfecto con valor de presente, imperfecto o futuro" end if conjinfo.nopasivo then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas activas" end insert(t, {{args["nota"] and args["nota"] or "", colspan=cs}}) local cats = {} local subtits = {} local conj_str if conjinfo.conj == "1" then conj_str = "primera conjugación" elseif conjinfo.conj == "2" then conj_str = "segunda conjugación" elseif conjinfo.conj == "3" then conj_str = "tercera conjugación" elseif conjinfo.conj == "3/4" then conj_str = "tercera/cuarta conjugación" else conj_str = "cuarta conjugación" end insert(cats, "LA:Verbos de la "..conj_str) insert(subtits, conj_str) impers = impers or "" if impers == "3" or find(impers, "^u[tm]c3$") then insert(subtits, "impersonal") insert(cats, "LA:Verbos impersonales") end if defectivo then insert(subtits, "defectivo") insert(cats, "LA:Verbos defectivos") end if conjinfo.dep then insert(subtits, "deponente") insert(cats, "LA:Verbos deponentes") end if conjinfo.semidep then insert(subtits, "semideponente") insert(cats, "LA:Verbos semideponentes") end if es_irregular then insert(subtits, "irregular") insert(cats, "LA:Verbos irregulares") else insert(subtits, "regular") insert(cats, "LA:Verbos regulares") end return renderizar_tabla( frame, "'''Conjugación de ''"..tit_pres..", "..tit_inf..", "..tit_perf..", "..tit_sup.."'''''&emsp;&emsp;("..concat(subtits, ", ")..")", t, ns == 0 and cats or {}) end function export.adv(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { ["n"] = {}, ["nota"] = {alias_de = "n"}, ["comp"] = {lista = true}, ["comparativo"] = {alias_de = "comp"}, ["compnota"] = {lista = true}, ["sup"] = {lista = true}, ["superlativo"] = {alias_de = "sup"}, ["supnota"] = {lista = true}, } local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local head = args[1] local modo = args[2] local enc local cats = {} local cat_pref = "LA:Adverbios" if modo == "-" then enc = "sin comparativo ni superlativo" insert(cats, cat_pref.." incomparables") return renderizar_encabezado( frame, head, enc, args["n"], {}, ns == 0 and cats or {}, normalizar_enlace ) end local flex = {comp={},sup={}} local stem for _, suff in ipairs{"iter", "nter", "ter", "er", "iē", "ē", "rā", "im", "ō"} do stem = match(head, "^(.*)" .. suff .. "$") if stem ~= nil then local comp_suff, sup_suff = "ius", "issimē" if suff == "nter" then stem = stem .. "nt" end if suff == "rā" then comp_suff = "er" .. comp_suff sup_suff = "imē" end insert(flex.comp, stem .. comp_suff) insert(flex.sup, stem .. sup_suff) break end end if not stem and not args.comp[1] and not args.sup[1] then error("Unrecognized adverb type, recognized types are “-ē”, “-er”, “-ter”, “-iter”, “-im”, or “-ō”, “-ra” or specify irregular forms or “-” if incomparable.") end local formas, irr = sobreescribir_formas(flex, args) if args["comp"][1] == "no" then enc = "sin comparativo" insert(cats, cat_pref.." sin comparativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) elseif args["sup"][1] == "no" then enc = "sin superlativo" insert(cats, cat_pref.." sin superlativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end if irr then enc = f("#irregular#") insert(cats, cat_pref.." irregulares") end return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}, {"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end return export skhugozj848fgucm5rw2rgb16odkgqr 6123483 6123482 2026-07-24T22:46:32Z Tmagc 158167 6123483 Scribunto text/plain -- FLEXIÓN DEL LATÍN -- Adaptado desde en.wikt por Tmagc local export = {} local unpack = unpack or table.unpack local insert = table.insert local concat = table.concat local m_table = require("Módulo:tabla") local keys_to_list = m_table.keysToList local insert_if_not = m_table.insertIfNot local deep_copy = m_table.deepCopy local contains = m_table.contains local merge = m_table.merge local m_str = require("Módulo:string") local u = m_str.char local match = m_str.match local sub = m_str.sub local gsub = m_str.gsub local split = m_str.split local gsplit = m_str.gsplit local find = m_str.find local m_str_avanzado = require("Módulo:string/avanzado") local toNFD = m_str_avanzado.toNFD local toNFC = m_str_avanzado.toNFC local m_flex = require("Módulo:flex") local f = m_flex.f local f_links = m_flex.f_links local parsear_arreglo = m_flex.parsear_arreglo local separar_palabras = m_flex.separar_palabras local combinar_copulativa = m_flex.combinar_copulativa local sobreescribir_formas = m_flex.sobreescribir_formas local desactivar_formas = m_flex.desactivar_formas local agregar_enlaces = m_flex.agregar_enlaces local formatear_formas = m_flex.formatear_formas local comprobar_defectivo = m_flex.comprobar_defectivo local renderizar_tabla = m_flex.renderizar_tabla local renderizar_encabezado = m_flex.renderizar_encabezado local COLOR_H = m_flex.COLOR_H local COLOR_NP = m_flex.COLOR_NP local COLOR_IND = m_flex.COLOR_IND local COLOR_SUBJ = m_flex.COLOR_SUBJ local COLOR_IMPER = m_flex.COLOR_IMPER local MACRON = u(0x304) local BREVE = u(0x306) local DIAER = u(0x308) local DBREVE = u(0x361) local ACCENT = "[" .. MACRON .. BREVE .. DIAER .. DBREVE .. "]" local VOWEL = "[aæeioœuyAÆEIOŒUY]" local cons_to_vowel = { ["j"] = "i", ["J"] = "I", ["v"] = "u", ["V"] = "U", } local function normalizar_enlace(x) x = toNFD(x) x = gsub(x, ACCENT, "") return toNFC(x) end local function join(a, b) a, b = toNFD(a), toNFD(b) -- If the first part ends in "j" or "v", convert it to "i" or "u" unless -- the second part begins with a vowel. if not match(b, "^" .. VOWEL) then a = gsub(a, "[jvJV]$", cons_to_vowel) end return toNFC(a..b) end local function add_form(decl, slot, stem, suf) if type(slot) == "string" then slot = {slot} end for _,slt in ipairs(slot) do if type(decl[slt]) == "nil" or decl[slt] == "" then decl[slt] = {} elseif type(decl[slt]) == "string" then decl[slt] = {decl[slt]} end insert_if_not(decl[slt], join(stem, suf)) end end local function remove_forms(decl, forms) for form,_ in pairs(decl) do for _,rx in ipairs(forms) do if form:find(rx) then forms[form] = {} break end end end end local function merge_forms(forms, forms2, keys) keys = keys or forms2 for key,arr in pairs(keys) do if not forms[key] then forms[key] = {} end if type(forms2[key]) == "string" then insert_if_not(forms[key], forms2[key]) elseif type(forms2[key]) == "table" then for _,a in ipairs(forms2[key]) do insert_if_not(forms[key], a) end end end end local noun_decl = {} noun_decl["0"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = stem forms["dat_sg"] = stem forms["acc_sg"] = stem forms["abl_sg"] = stem forms["voc_sg"] = stem forms["nom_pl"] = stem forms["gen_pl"] = stem forms["dat_pl"] = stem forms["acc_pl"] = stem forms["abl_pl"] = stem forms["voc_pl"] = stem -- with locative if data.loc then forms["loc_sg"] = stem forms["loc_pl"] = stem end end local function alt_gen_pl_in_um(stem, forms, types, subtitles, i_stem) if types.genplum then add_form(forms, "gen_pl", stem, (i_stem and "i" or "") .. "um") elseif types.not_genplum then -- FIXME: not a contraction. -- insert_if_not(subtitles, "uncontracted genitive plural") end end noun_decl["1"] = function(data, args) local forms, types, loc, subtitles = data.forms, data.types, data.loc, data.subtitles local stem = args[1] -- normal 1st local nom_sg = "a" local gen_loc_sg = "ae" local dat_sg = "ae" local acc_sg = "am" local abl_sg = "ā" local voc_sg = "a" local nom_voc_pl = "ae" local gen_pl = "ārum" local dat_abl_loc_pl = "īs" local acc_pl = "ās" insert_if_not(data.title, "primera declinación") insert_if_not(data.categories, "LA:Sustantivos de la primera declinación") -- ām if types.am then nom_sg = "ām" acc_sg = "ām" abl_sg = {"ām", "ā"} voc_sg = "ām" -- all Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") --Greek Ma if types.Ma then nom_sg = "ās" acc_sg = "ān" voc_sg = "ā" -- Greek Me elseif types.Me then nom_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" -- Greek else nom_sg = "ē" gen_loc_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" end end -- ābus if types.abus then dat_abl_loc_pl = "ābus" end add_form(forms, "nom_sg", stem, nom_sg) add_form(forms, "gen_sg", stem, gen_loc_sg) add_form(forms, "dat_sg", stem, dat_sg) add_form(forms, "acc_sg", stem, acc_sg) add_form(forms, "abl_sg", stem, abl_sg) add_form(forms, "voc_sg", stem, voc_sg) add_form(forms, {"nom_pl", "voc_pl"}, stem, nom_voc_pl) add_form(forms, "gen_pl", stem, gen_pl) add_form(forms, {"dat_pl", "abl_pl"}, stem, dat_abl_loc_pl) add_form(forms, "acc_pl", stem, acc_pl) -- with locative if loc then add_form(forms, "loc_sg", stem, gen_loc_sg) add_form(forms, "loc_pl", stem, dat_abl_loc_pl) end end noun_decl["2"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "segunda declinación") insert_if_not(data.categories, "LA:Sustantivos de la segunda declinación") -- normal 2nd forms["nom_sg"] = stem1 .. "us" forms["gen_sg"] = stem1 .. "ī" forms["dat_sg"] = stem1 .. "ō" forms["acc_sg"] = stem1 .. "um" forms["abl_sg"] = stem1 .. "ō" forms["voc_sg"] = stem1 .. "e" forms["nom_pl"] = stem1 .. "ī" forms["gen_pl"] = stem1 .. "ōrum" forms["dat_pl"] = stem1 .. "īs" forms["acc_pl"] = stem1 .. "ōs" forms["abl_pl"] = stem1 .. "īs" forms["voc_pl"] = stem1 .. "ī" -- all neuter if types.N then forms["nom_sg"] = stem1 .. "um" forms["voc_sg"] = stem1 .. "um" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- neuter ium if types.ium then forms["nom_sg"] = stem1 .. "ium" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" forms["voc_sg"] = stem1 .. "ium" forms["nom_pl"] = stem1 .. "ia" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "ia" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "ia" -- neuter us, plural a elseif types.a then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- -vom (aevom, etc.) elseif types.vom then forms["nom_sg"] = stem1 .. "om" forms["acc_sg"] = stem1 .. "om" forms["voc_sg"] = stem1 .. "om" -- neuter Greek in -os (cētos) elseif types.Greek and types.us then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "os" forms["voc_sg"] = stem1 .. "os" forms["nom_pl"] = stem1 .. "ē" forms["gen_pl"] = stem1 .. "ōn" forms["acc_pl"] = stem1 .. "ē" forms["voc_pl"] = stem1 .. "ē" -- neuter Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "on" forms["acc_sg"] = stem1 .. "on" forms["voc_sg"] = stem1 .. "on" -- neuter us elseif types.us then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "ī" forms["acc_pl"] = stem1 .. "ōs" forms["voc_pl"] = stem1 .. "ī" end -- er elseif types.er then forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "ī" forms["dat_sg"] = stem2 .. "ō" forms["acc_sg"] = stem2 .. "um" forms["abl_sg"] = stem2 .. "ō" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ī" forms["gen_pl"] = stem2 .. "ōrum" forms["dat_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "ōs" forms["abl_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "ī" -- ius elseif types.ius then forms["nom_sg"] = stem1 .. "ius" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" if types.voci then -- Only for proper names and fīlius, genius forms["voc_sg"] = stem1 .. "ī" else forms["voc_sg"] = stem1 .. "ie" end forms["nom_pl"] = stem1 .. "iī" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "iōs" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "iī" -- -vos (servos, etc.) elseif types.vos then forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "om" -- Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "on" if data.num == "pl" then forms["nom_pl"] = stem1 .. "oe" forms["voc_pl"] = stem1 .. "oe" else forms["nom_pl"] = {stem1 .. "ī", stem1 .. "oe"} forms["voc_pl"] = {stem1 .. "ī", stem1 .. "oe"} end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- with -um genitive plural alt_gen_pl_in_um(stem2, forms, types, subtitles, types.ius or types.ium) -- with locative if data.loc then if types.ius or types.ium then forms["loc_sg"] = stem2 .. "iī" forms["loc_pl"] = stem2 .. "iīs" else forms["loc_sg"] = stem2 .. "ī" forms["loc_pl"] = stem2 .. "īs" end end end local acc_sg_i_stem_subtypes = { acc_im = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [abl -ī]; -- cannabis, senapis, sinapis [abl -e, -ī] acc_sg = {"im"}, title = {"accusative singular in ''-im''"}, }, acc_im_in = { -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [abl -ī]; -- Baetis, Tigris [acc -e, -ī] acc_sg = {"im", "in"}, title = {"accusative singular in ''-im'' or ''-in''"}, }, acc_im_in_em = { -- e.g. tigris, river Līris acc_sg = {"im", "in", "em"}, title = {"accusative singular in ''-im'', ''-in'' or ''-em''"}, }, acc_im_em = { acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or ''-em''"}, }, acc_im_occ_em = { -- febris, pelvis, puppis, restis, securis, turris [abl -ī, -e] acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or occasionally ''-em''"}, }, acc_em_im = { -- aqualis, clavis, lens, navis [abl -e, -ī]; -- cutis, restis [abl -e] acc_sg = {"em", "im"}, title = {"accusative singular in ''-em'' or ''-im''"}, }, } local abl_sg_i_stem_subtypes = { abl_i = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [acc -im]; -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [acc -im or -in]; -- canalis "water pipe", months in -is or -er, nouns originally i-stem adjectives such as aedilis, affinis, bipennis, familiaris, sodalis, volucris, etc. [acc -em] abl_sg = {"ī"}, title = {"ablative singular in ''-ī''"}, }, abl_i_e = { -- febris, pelvis, puppis, restis, securis, turris [acc -im, -em] abl_sg = {"ī", "e"}, title = {"ablative singular in ''-ī'' or ''-e''"}, }, abl_e_i = { -- cannabis, senapis, sinapis [acc -im]; -- Baetis, Tigris [acc -im, -in]; -- aqualis, clavis, lens, navis [acc -em, -im]; -- finis, mugilis, occiput, pugil, rus, supellex, vectis [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or ''-ī''"}, }, abl_e_occ_i = { -- amnis, anguis, avis, civis, classis, fustis, ignis, imber, orbis, pars, postis, sors, unguis, vesper [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or occasionally ''-ī''"}, }, } local function extract_stem(form, ending) local base = match(form, "^(.*)" .. ending .. "$") if not base then error("Form " .. form .. " should end in -" .. ending) end return base end local function count_vowels(stem) return select(2, toNFD(stem):gsub("[aeiouyAEIOUY]", "")) end noun_decl["3"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] -- local function non_i_stem_type() -- return (count_vowels(stem1) > count_vowels(stem2) and "parisyllabic" or "imparisyllabic") .. " non-i-stem" -- end insert_if_not(data.title, "tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") --normal 3rd forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "is" forms["dat_sg"] = stem2 .. "ī" forms["acc_sg"] = stem2 .. "em" forms["abl_sg"] = stem2 .. "e" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ēs" forms["gen_pl"] = stem2 .. "um" forms["dat_pl"] = stem2 .. "ibus" forms["acc_pl"] = stem2 .. "ēs" forms["abl_pl"] = stem2 .. "ibus" forms["voc_pl"] = stem2 .. "ēs" local acc_sg_i_stem_subtype = false local not_acc_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if acc_sg_i_stem_subtypes[subtype] then acc_sg_i_stem_subtype = true break end end for acc_sg_subtype, _ in pairs(acc_sg_i_stem_subtypes) do if types["not_" .. acc_sg_subtype] then not_acc_sg_i_stem_subtype = true break end end local abl_sg_i_stem_subtype = false local not_abl_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if abl_sg_i_stem_subtypes[subtype] then abl_sg_i_stem_subtype = true break end end for abl_sg_subtype, _ in pairs(abl_sg_i_stem_subtypes) do if types["not_" .. abl_sg_subtype] then not_abl_sg_i_stem_subtype = true break end end -- all Greek if types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") -- Greek er if types.er then stem1 = extract_stem(stem1, "ēr") forms["nom_sg"] = stem1 .. "ēr" forms["gen_sg"] = stem1 .. "eris" forms["dat_sg"] = stem1 .. "erī" forms["acc_sg"] = {stem1 .. "era", stem1 .. "erem"} forms["abl_sg"] = stem1 .. "ere" forms["voc_sg"] = stem1 .. "ēr" forms["nom_pl"] = stem1 .. "erēs" forms["gen_pl"] = stem1 .. "erum" forms["dat_pl"] = stem1 .. "eribus" forms["acc_pl"] = stem1 .. "erēs" forms["abl_pl"] = stem1 .. "eribus" forms["voc_pl"] = stem1 .. "erēs" -- Greek on elseif types.on then stem1 = extract_stem(stem1, "ōn") forms["nom_sg"] = stem1 .. "ōn" forms["gen_sg"] = {stem1 .. "ontis", stem1 .. "ontos"} forms["dat_sg"] = stem1 .. "ontī" forms["acc_sg"] = stem1 .. "onta" forms["abl_sg"] = stem1 .. "onte" forms["voc_sg"] = stem1 .. "ōn" forms["nom_pl"] = stem1 .. "ontēs" forms["gen_pl"] = {stem1 .. "ontum", stem1 .. "ontium"} forms["dat_pl"] = stem1 .. "ontibus" forms["acc_pl"] = {stem1 .. "ontēs", stem1 .. "ontās"} forms["abl_pl"] = stem1 .. "ontibus" forms["voc_pl"] = stem1 .. "ontēs" -- Greek i-stem elseif types.I then forms["gen_sg"] = {stem2 .. "is", stem2 .. "eōs", stem2 .. "ios"} forms["acc_sg"] = {stem2 .. "im", stem2 .. "in", stem2 .. "em{MED}"} forms["abl_sg"] = {stem2 .. "ī", stem2 .. "e{MED}"} forms["voc_sg"] = {stem2 .. "is", stem2 .. "i"} forms["nom_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["gen_pl"] = {stem2 .. "ium", stem2 .. "eōn"} forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["voc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} if types.poetic_esi then forms["dat_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} forms["abl_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} end -- normal Greek else forms["gen_sg"] = stem2 .. "os" if match(toNFD(stem2), "[yY]" .. ACCENT .. "*$") then forms["acc_sg"] = stem2 .. "n" else forms["acc_sg"] = stem2 .. "a" end forms["nom_pl"] = stem2 .. "es" forms["acc_pl"] = stem2 .. "as" forms["voc_pl"] = stem2 .. "es" if match(toNFD(stem1), "[iyIY]" .. ACCENT .. "*s$") then -- Per Hiley, words in -is and -ys have a poetic vocative -- without the -s, but otherwise the vocative is the same -- as the nominative. forms["voc_sg"] = {stem1, (stem1:gsub("s$", "")).."{L}"} end end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- polis if types.polis then stem1 = extract_stem(stem1, "polis") insert_if_not(data.title, "parcialmente griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "polis" forms["gen_sg"] = stem1 .. "polis" forms["dat_sg"] = stem1 .. "polī" forms["acc_sg"] = {stem1 .. "polim", stem1 .. "polin"} forms["abl_sg"] = stem1 .. "polī" forms["voc_sg"] = {stem1 .. "polis", stem1 .. "polī"} end -- all neuter if types.N then forms["acc_sg"] = stem1 -- neuter I stem if types.I then -- pure variety if types.pure then forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "ia" forms["gen_pl"] = stem2 .. "ium" forms["acc_pl"] = stem2 .. "ia" forms["voc_pl"] = stem2 .. "ia" -- non-pure variety (rare) else forms["nom_pl"] = stem2 .. "a" forms["gen_pl"] = {stem2 .. "ium", stem2 .. "um"} forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- normal neuter else forms["nom_pl"] = stem2 .. "a" forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- I stem elseif types.I or acc_sg_i_stem_subtype or abl_sg_i_stem_subtype then forms["gen_pl"] = stem2 .. "ium" -- Per Allen and Greenough, Hiley and others, the acc_pl in -īs -- applied originally to all i-stem nouns, and was current as an -- alternative form up through Caesar. forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "īs"} -- pure variety if types.pure then forms["acc_sg"] = stem2 .. "im" forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "īs" end local num = data.num for subtype, _ in pairs(types) do local acc_sg_i_stem_props = acc_sg_i_stem_subtypes[subtype] if acc_sg_i_stem_props then forms["acc_sg"] = {} for _, ending in ipairs(acc_sg_i_stem_props.acc_sg) do insert_if_not(forms["acc_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(acc_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end -- FIXME: needs to be done for neuter nouns as well. for subtype, _ in pairs(types) do local abl_sg_i_stem_props = abl_sg_i_stem_subtypes[subtype] if abl_sg_i_stem_props then forms["abl_sg"] = {} for _, ending in ipairs(abl_sg_i_stem_props.abl_sg) do insert_if_not(forms["abl_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(abl_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end end -- with locative if data.loc then -- As far as I can tell, in general both dative singular and -- ablative singular could be used for the third-declension locative, -- with different time periods preferring different forms. -- http://dcc.dickinson.edu/grammar/latin/3rd-declension-locative-case -- mentions rūrī along with either Carthāginī or Carthāgine. -- Wikipedia in https://en.wikipedia.org/wiki/Locative_case#Latin -- says this: -- -- In archaic times, the locative singular of third declension nouns -- was still interchangeable between ablative and dative forms, but in -- the Augustan Period the use of the ablative form became fixed. -- Therefore, both forms "rūrī" and "rūre" may be encountered. -- -- Lewis and Short confirm this. local loc_sg = forms["dat_sg"] if type(loc_sg) == "table" then loc_sg = deep_copy(loc_sg) else loc_sg = {loc_sg} end local abl_sg = forms["abl_sg"] if type(abl_sg) == "table" then for _, form in ipairs(abl_sg) do insert_if_not(loc_sg, deep_copy(form)) end else insert_if_not(loc_sg, abl_sg) end forms["loc_sg"] = loc_sg forms["loc_pl"] = deep_copy(forms["abl_pl"]) --The following is what we used to have, but I simply cannot believe it. --if types.Greek and not types.s then -- forms["loc_pl"] = stem2 .. "ēs" --end end end noun_decl["4"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "cuarta declinación") insert_if_not(data.categories, "LA:Sustantivos de la cuarta declinación") -- normal 4th forms["nom_sg"] = stem .. "us" forms["gen_sg"] = stem .. "ūs" forms["dat_sg"] = stem .. "uī" forms["acc_sg"] = stem .. "um" forms["abl_sg"] = stem .. "ū" forms["voc_sg"] = stem .. "us" forms["nom_pl"] = stem .. "ūs" forms["gen_pl"] = stem .. "uum" forms["dat_pl"] = stem .. "ibus" forms["acc_pl"] = stem .. "ūs" forms["abl_pl"] = stem .. "ibus" forms["voc_pl"] = stem .. "ūs" if types.echo then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end add_form(forms, "acc_sg", stem, "ōn") elseif types.Callisto then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end end -- neuter if types.N then forms["nom_sg"] = stem .. "ū̆{?}" forms["gen_sg"] = {stem .. "ūs{C}", stem .. "ū{S}"} forms["dat_sg"] = {stem .. "uī{C}", stem .. "ū{S}"} forms["acc_sg"] = stem .. "ū̆{?}" forms["voc_sg"] = stem .. "ū̆{?}" forms["nom_pl"] = stem .. "ua" forms["acc_pl"] = stem .. "ua" forms["voc_pl"] = stem .. "ua" end -- ubus if types.ubus then forms["dat_pl"] = stem .. "ubus" forms["abl_pl"] = stem .. "ubus" end -- with locative if data.loc then forms["loc_sg"] = forms["abl_sg"] forms["loc_pl"] = forms["abl_pl"] end end noun_decl["5"] = function(data, args) local forms, types = data.forms, data.types local stem = args[1] insert_if_not(data.title, "quinta declinación") insert_if_not(data.categories, "LA:Sustantivos de la quinta declinación") -- ies if types.i then stem = stem .. "i" end forms["nom_sg"] = stem .. "ēs" forms["gen_sg"] = stem .. "eī" forms["dat_sg"] = stem .. "eī" forms["acc_sg"] = stem .. "em" forms["abl_sg"] = stem .. "ē" forms["voc_sg"] = stem .. "ēs" forms["nom_pl"] = stem .. "ēs" forms["gen_pl"] = stem .. "ērum" forms["dat_pl"] = stem .. "ēbus" forms["acc_pl"] = stem .. "ēs" forms["abl_pl"] = stem .. "ēbus" forms["voc_pl"] = stem .. "ēs" -- ies if types.i then forms["gen_sg"] = stem .. "ēī" forms["dat_sg"] = stem .. "ēī" end --with locative if data.loc then forms["loc_sg"] = stem .. "ē" forms["loc_pl"] = stem .. "ēbus" end end noun_decl["sgpl"] = function(data, args) local forms = data.forms local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem1 forms["gen_sg"] = stem1 forms["dat_sg"] = stem1 forms["acc_sg"] = stem1 forms["abl_sg"] = stem1 forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 forms["gen_pl"] = stem2 forms["dat_pl"] = stem2 forms["acc_pl"] = stem2 forms["abl_pl"] = stem2 forms["voc_pl"] = stem2 -- with locative if data.loc then forms["loc_sg"] = stem1 forms["loc_pl"] = stem2 end end noun_decl["indecl"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = stem forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} -- with locative (for multiword terms) if data.loc then forms["loc_sg"] = {} forms["loc_pl"] = {} end data.num = "sg" end noun_decl["irreg"] = function(data, args) local forms, subtitles, notes = data.forms, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "irregular") insert_if_not(data.categories, "LA:Sustantivos irregulares") forms["nom_sg"] = {} forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = {} forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} if stem == "bōs" then data.decl = "3" local stem1, stem2 = "bōs", "bov" noun_decl["3"](data, {stem1, stem2}) add_form(forms, "abl_sg", stem2, "īd{†}") add_form(forms, "gen_pl", "bo", "um") add_form(forms, "gen_pl", stem2, "erum") add_form(forms, "dat_pl", "", "bōbus") add_form(forms, "dat_pl", "", "būbus") add_form(forms, "abl_pl", "", "bōbus") add_form(forms, "abl_pl", "", "būbus") elseif stem:match("^[dD]eus$") then data.decl = "2" local dD = stem:sub(1, 1) forms["nom_sg"] = dD .. "eus" forms["gen_sg"] = dD .. "eī" forms["dat_sg"] = dD .. "eō" forms["acc_sg"] = dD .. "eum" forms["abl_sg"] = dD .. "eō" forms["voc_sg"] = {dD .. "eus", dD .. "ee"} if stem == "deus" then forms["nom_pl"] = {"dī", "diī", "deī"} forms["gen_pl"] = {"deōrum", "deum"} forms["dat_pl"] = {"dīs", "diīs", "deīs"} forms["acc_pl"] = "deōs" forms["abl_pl"] = {"dīs", "diīs", "deīs"} forms["voc_pl"] = {"dī", "diī", "deī"} end elseif stem == "domus" then data.decl = "4,2" insert_if_not(data.title, "cuarta/segunda declinación") forms["nom_sg"] = "domus" forms["gen_sg"] = {"domūs", "domī"} forms["dat_sg"] = {"domuī", "domō", "domū"} forms["acc_sg"] = "domum" forms["abl_sg"] = {"domū", "domō"} forms["voc_sg"] = "domus" forms["loc_sg"] = "domī" forms["nom_pl"] = "domūs" forms["gen_pl"] = {"domuum", "domōrum"} forms["dat_pl"] = "domibus" forms["acc_pl"] = {"domūs", "domōs"} forms["abl_pl"] = "domibus" forms["voc_pl"] = "domūs" forms["loc_pl"] = {} data.loc = true elseif match(stem, "^[IÏJ]ēs[uū]" .. BREVE .. "?s$") then local ij = sub(stem, 1, 1) local uu = match(stem, "[uū]" .. BREVE .. "?") forms["nom_sg"] = stem forms["gen_sg"] = ij .. "ēsū" forms["dat_sg"] = ij .. "ēsū" forms["acc_sg"] = ij .. "ēs" .. uu .. "m" forms["abl_sg"] = ij .. "ēsū" forms["voc_sg"] = ij .. "ēsū" data.num = "sg" elseif stem == "Mōsēs" or stem == "Moesēs" or match(stem, "^M[oō]" .. BREVE .. "?[īȳ]sēs$") then local mos = sub(stem, 1, -3) forms["nom_sg"] = stem forms["gen_sg"] = {mos .. "ī", mos .. "ēī", mos .. "is", mos .. "ēn", mos .. "eōs"} forms["dat_sg"] = mos .. "ī" forms["acc_sg"] = {mos .. "ēn", mos .. "em"} forms["abl_sg"] = {mos .. "e", mos .. "ēn", mos .. "ī"} forms["voc_sg"] = {mos .. "ēs", mos .. "ē"} data.num = "sg" elseif stem:match("^[ij]ūgerum$") then data.decl = "2,3" local ij = stem:sub(1, 1) insert_if_not(data.title, "segunda/tercera declinación híbrido") forms["nom_sg"] = ij .. "ūgerum" forms["gen_sg"] = ij .. "ūgerī" forms["dat_sg"] = ij .. "ūgerō" forms["acc_sg"] = ij .. "ūgerum" forms["abl_sg"] = ij .. "ūgerō" forms["voc_sg"] = ij .. "ūgerum" forms["nom_pl"] = ij .. "ūgera" forms["gen_pl"] = ij .. "ūgerum" forms["dat_pl"] = ij .. "ūgeribus" forms["acc_pl"] = ij .. "ūgera" forms["abl_pl"] = {ij .. "ūgeribus", ij .. "ūgerīs{†}"} forms["voc_pl"] = ij .. "ūgera" elseif stem == "sūs" then data.decl = "3" forms["nom_sg"] = "sūs" forms["gen_sg"] = "suis" forms["dat_sg"] = "suī" forms["acc_sg"] = "suem" forms["abl_sg"] = "sue" forms["voc_sg"] = "sūs" forms["nom_pl"] = "suēs" forms["gen_pl"] = "suum" forms["dat_pl"] = {"suibus", "sūbus", "subus"} forms["acc_pl"] = "suēs" forms["abl_pl"] = {"suibus", "sūbus", "subus"} forms["voc_pl"] = "suēs" elseif stem == "ēthos" then data.decl = "3" insert_if_not(data.title, "tercera declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "ēthos" forms["gen_sg"] = "ētheos" forms["acc_sg"] = "ēthos" forms["voc_sg"] = "ēthos" forms["nom_pl"] = {"ēthea", "ēthē"} forms["dat_pl"] = {"ēthesi", "ēthesin"} forms["acc_pl"] = {"ēthea", "ēthē"} forms["abl_pl"] = {"ēthesi", "ēthesin"} forms["voc_pl"] = {"ēthea", "ēthē"} elseif stem == "Athōs" then data.decl = "2" insert_if_not(data.title, "segunda declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "Athōs" forms["gen_sg"] = "Athō" forms["dat_sg"] = "Athō" forms["acc_sg"] = {"Athō", "Athōn"} forms["abl_sg"] = "Athō" forms["voc_sg"] = "Athōs" data.num = "sg" elseif stem:match("^[uv]ēnum$") then data.decl = "4,2" local uv = stem:sub(1, 1) insert_if_not(data.title, "cuarta/segunda declinación, defectivo") forms["dat_sg"] = {uv .. "ēnuī", uv .. "ēnō"} forms["acc_sg"] = uv .. "ēnum" data.num = "sg" elseif stem:match("^[uv]īs$") then data.decl = "3" local uv = stem:sub(1, 1) insert_if_not(data.title, "defectivo") forms["nom_sg"] = uv .. "īs" forms["gen_sg"] = uv .. "īs" forms["dat_sg"] = uv .. "ī" forms["acc_sg"] = uv .. "im" forms["abl_sg"] = uv .. "ī" forms["voc_sg"] = uv .. "īs" forms["nom_pl"] = uv .. "īrēs" forms["gen_pl"] = uv .. "īrium" forms["dat_pl"] = uv .. "īribus" forms["acc_pl"] = {uv .. "īrēs", uv .. "īrīs"} forms["abl_pl"] = uv .. "īribus" forms["voc_pl"] = uv .. "īrēs" else error("Stem " .. stem .. " not recognized.") end end local adj_decl = {} adj_decl["0+"] = function(data, args) local forms, categories = data.forms, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = stem forms["gen_sg_m"] = stem forms["gen_pl_m"] = stem forms["dat_sg_m"] = stem forms["dat_pl_m"] = stem forms["acc_sg_m"] = stem forms["acc_pl_m"] = stem forms["abl_sg_m"] = stem forms["abl_pl_m"] = stem forms["voc_sg_m"] = stem forms["voc_pl_m"] = stem forms["loc_sg_m"] = stem forms["loc_pl_m"] = stem end adj_decl["1&2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera y segunda declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local original if types.er then local final2 = stem:sub(-2) if final2 == "er" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") elseif final2 == "ur" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") else error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem) end stem, original = args[2], stem end local us = "us" local a_sf = "a" local um = "um" local ae_gsf = "ae" local am = "am" local a_macron = "ā" local i_pl = stem .. "ī" if types.greekA or types.greekE then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") if types.greekA then us = "os" um = "on" am = "ān" else us = "os" a_sf = "ē" um = "on" ae_gsf = "ēs" am = "ēn" a_macron = "ē" end i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = original or (stem .. us) forms["nom_sg_f"] = stem .. a_sf forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_f"] = stem .. ae_gsf forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_f"] = stem .. "ae" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_f"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_f"] = stem .. am forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_f"] = stem .. a_macron forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_f"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = original or (stem .. "e") forms["voc_sg_f"] = stem .. a_sf forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" if types.ius then insert_if_not(data.title, "pronominal") --insert_if_not(subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''") forms["gen_sg_m"] = stem .. "ī̆us" forms["gen_sg_f"] = stem .. "ī̆us" forms["gen_sg_n"] = stem .. "ī̆us" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_f"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" elseif types.not_ius then insert_if_not(data.title, "no pronominal") --insert_if_not(subtitles, "with normal genitive and dative singular") end if stem == "me" then forms["voc_sg_m"] = "mī" end if types.ic then --insert_if_not(subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''") local oc = "oc" local oc_macron = "ōc" if stem == "ill" then oc = "uc" oc_macron = "ūc" end forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = stem .. oc forms["nom_pl_n"] = stem .. "aec" forms["gen_sg_m"] = stem .. "uius" forms["gen_sg_f"] = stem .. "uius" forms["gen_sg_n"] = stem .. "uius" forms["dat_sg_m"] = stem .. "uic" forms["dat_sg_f"] = stem .. "uic" forms["dat_sg_n"] = stem .. "uic" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = stem .. oc forms["acc_pl_n"] = stem .. "aec" forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. oc_macron forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} end if types.distr then if stem:sub(-1) == "n" then forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum{R}"} forms["gen_pl_f"] = {stem .. "um", stem .. "ārum{R}"} forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum{R}"} else error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem) end end forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["1-1+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") forms["nom_sg_m"] = stem .. "a" forms["nom_pl_m"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ae" forms["gen_pl_m"] = stem .. "ārum" forms["dat_sg_m"] = stem .. "ae" forms["dat_pl_m"] = stem .. "īs" forms["acc_sg_m"] = stem .. "am" forms["acc_sg_n"] = stem .. "a" forms["acc_pl_m"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ā" forms["abl_pl_m"] = stem .. "īs" forms["voc_sg_m"] = stem .. "a" forms["voc_pl_m"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["2-2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "segunda declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local us = "us" local um = "um" local i_pl = stem .. "ī" if types.greek then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") us = "os" um = "on" i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = stem .. us forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = stem .. "e" forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end local function abl_i_e(...) local function update_slot(forms, slot, f, do_copy) if not forms[slot] then return do_copy elseif do_copy then f = deep_copy(f) end forms[slot] = f return true end function abl_i_e(stem, forms, types) local f, do_copy if types["abl_e_i"] then f = {stem .. "e", stem .. "ī"} elseif types["abl_i_e"] then f = {stem .. "ī", stem .. "e"} else return end do_copy = update_slot(forms, "abl_sg_m", f, do_copy) do_copy = update_slot(forms, "abl_sg_f", f, do_copy) -- Neuter doesn't take -e with i-stems. if not types.I then update_slot(forms, "abl_sg_n", f, do_copy) end end return abl_i_e(...) end adj_decl["3-1+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) if types.par then forms["nom_pl_n"] = stem2 .. "a" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["abl_sg_m"] = stem2 .. "e" forms["abl_sg_n"] = stem2 .. "e" forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"} -- Really? forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"} -- Why does this happen? forms["acc_pl_n"] = stem2 .. "a" forms["voc_pl_n"] = stem2 .. "a" end local es_base = stem1:match("^(.-)ēs$") if es_base and es_base == stem2 then if types.greek then forms["nom_sg_n"] = {stem2 .. "ē̆s{?}"} forms["acc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_m"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["nom_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["acc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["voc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["abl_sg_m"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["abl_sg_n"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["gen_pl_m"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} forms["gen_pl_n"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Adjetivos griegos") elseif types.not_greek then insert_if_not(data.title, "no griego") end end end adj_decl["3-def+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, defectivo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = stem2 .. "ēs" forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" if types.tor then insert_if_not(data.title, "tercera declinación, solo en masculino") insert_if_not(categories, "LA:Adjetivos solo en masculino") remove_forms(forms, {"_f$", "_n$"}) forms["nom_sg_m"] = stem1 forms["gen_sg_m"] = stem2 .. "is" forms["dat_sg_m"] = stem2 .. "ī" forms["acc_sg_m"] = stem2 .. "em" forms["abl_sg_m"] = stem2 .. "e" forms["voc_sg_m"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["gen_pl_m"] = stem2 .. "um" forms["dat_pl_m"] = stem2 .. "ibus" forms["acc_pl_m"] = stem2 .. "ēs" forms["abl_pl_m"] = stem2 .. "ibus" forms["voc_pl_m"] = stem2 .. "ēs" end if types.trix then insert_if_not(data.title, "tercera declinación, solo en femenino o en neutro plural") insert_if_not(categories, "LA:Adjetivos solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en neutro") remove_forms(forms, {"_m$", "sg_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.trixf then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.idis then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = {stem2 .. "is", stem2 .. "os"} forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = {stem2 .. "em", stem2 .. "a"} forms["abl_sg_f"] = stem2 .. "e" forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} forms["gen_pl_f"] = stem2 .. "um" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = {stem2 .. "ēs", stem2 .. "as"} forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} end forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-C+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1 = args[1] local stem2 = stem1 .. "ōr" insert_if_not(data.title, "tercera declinación, comparativo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos comparativos") forms["nom_sg_m"] = stem1 .. "or" forms["nom_sg_n"] = stem1 .. "us" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "a" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 .. "us" forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} forms["acc_pl_n"] = stem2 .. "a" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 .. "or" forms["voc_sg_n"] = stem1 .. "us" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "a" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-P+"] = function(data, args) local forms, notes = data.forms, data.notes local stem2 = args[2] adj_decl["3-1+"](data, args) insert_if_not(data.title, "tercera declinación, participio") insert_if_not(data.categories, "LA:Adjetivos de la tercera declinación") forms["abl_sg_m"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["abl_sg_n"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} end adj_decl["3-2+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem = args[1] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem .. "is" forms["nom_sg_n"] = stem .. "e" forms["nom_pl_m"] = stem .. "ēs" forms["nom_pl_n"] = stem .. "ia" forms["gen_sg_m"] = stem .. "is" forms["gen_sg_n"] = stem .. "is" forms["gen_pl_m"] = stem .. "ium" forms["gen_pl_n"] = stem .. "ium" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" forms["dat_pl_m"] = stem .. "ibus" forms["dat_pl_n"] = stem .. "ibus" forms["acc_sg_m"] = stem .. "em" forms["acc_sg_n"] = stem .. "e" forms["acc_pl_m"] = {stem .. "īs", stem .. "ēs"} forms["acc_pl_n"] = stem .. "ia" forms["abl_sg_m"] = stem .. "ī" forms["abl_sg_n"] = stem .. "ī" forms["abl_pl_m"] = stem .. "ibus" forms["abl_pl_n"] = stem .. "ibus" -- abl_i_e(stem, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem .. "is" forms["voc_sg_n"] = stem .. "e" forms["voc_pl_m"] = stem .. "ēs" forms["voc_pl_n"] = stem .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-3+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con tres terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_f"] = stem2 .. "is" forms["nom_sg_n"] = stem2 .. "e" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_f"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_f"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_f"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_f"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_f"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_f"] = stem2 .. "em" forms["acc_sg_n"] = stem2 .. "e" forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_f"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_f"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_f"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" -- abl_i_e(stem2, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem1 forms["voc_sg_f"] = stem2 .. "is" forms["voc_sg_n"] = stem2 .. "e" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_f"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["indecl+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = {} forms["gen_sg_m"] = {} forms["gen_pl_m"] = {} forms["dat_sg_m"] = {} forms["dat_pl_m"] = {} forms["acc_sg_m"] = stem forms["acc_pl_m"] = {} forms["abl_sg_m"] = {} forms["abl_pl_m"] = {} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["irreg+"] = function(data,args) local forms, types, pos, notes, categories = data.forms, data.types, data.pos, data.notes, data.categories local arg1 = args[1] insert_if_not(data.title, "irregular") insert_if_not(categories, "LA:Adjetivos irregulares") if arg1 == "duo" or arg1 == "ambō" then local stem = sub(arg1, 1, -2) -- data.title = stem == "amb" and "irregular adjective" or "numeral" data.num = "pl" local stem_with_o = stem .. (stem == "amb" and "ō" or "o") forms["nom_pl_m"] = stem_with_o forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem_with_o forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_pl_m"] = stem .. "ōbus" forms["dat_pl_f"] = stem .. "ābus" forms["dat_pl_n"] = stem .. "ōbus" forms["acc_pl_m"] = {stem .. "ōs", stem_with_o} forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem_with_o forms["abl_pl_m"] = stem .. "ōbus" forms["abl_pl_f"] = stem .. "ābus" forms["abl_pl_n"] = stem .. "ōbus" forms["voc_pl_m"] = stem_with_o forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem_with_o if stem == "du" then forms["gen_pl_m"] = {forms["gen_pl_m"], "duum", "duom{†}"} forms["gen_pl_n"] = {forms["gen_pl_n"], "duum", "duom{†}"} end elseif arg1:sub(-6) == "mīlle" then insert_if_not(data.title, "numeral semiindeclinable") local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "le" forms["nom_pl_m"] = {stem .. "ia", stem .. "lia"} forms["gen_sg_m"] = stem .. "le" forms["gen_pl_m"] = {stem .. "ium", stem .. "lium"} forms["dat_sg_m"] = stem .. "le" forms["dat_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["acc_sg_m"] = stem .. "le" forms["acc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["abl_sg_m"] = stem .. "le" forms["abl_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["voc_sg_m"] = stem .. "le" forms["voc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) elseif arg1 == "ille" or arg1 == "iste" or arg1 == "ipse" or arg1 == "olle" then local stem = arg1:sub(1, -2) types.ius = true adj_decl["1&2+"](data, {stem}) insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) forms["nom_sg_m"] = arg1 if arg1 == "ipse" then add_form(forms, "nom_sg_n", stem, "ud{MED}") add_form(forms, "acc_sg_n", stem, "ud{MED}") else forms["nom_sg_n"] = stem .. "ud" forms["acc_sg_n"] = stem .. "ud" end forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} elseif arg1 == "illic" or arg1 == "istic" or arg1 == "isthic" then insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["gen_sg_m"] = stem .. "ī̆usce" forms["gen_sg_f"] = stem .. "ī̆usce" forms["gen_sg_n"] = stem .. "ī̆usce" forms["dat_sg_m"] = stem .. "īc" forms["dat_sg_f"] = stem .. "īc" forms["dat_sg_n"] = stem .. "īc" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. "ōc" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["nom_pl_m"] = stem .. "īsce" forms["nom_pl_f"] = stem .. "aec" forms["nom_pl_n"] = stem .. "aec" forms["gen_pl_m"] = stem .. "ōrunc{?}" forms["gen_pl_f"] = stem .. "ārunc{?}" forms["gen_ok_n"] = stem .. "ōrunc{?}" forms["dat_pl_m"] = stem .. "īsce" forms["dat_pl_f"] = stem .. "īsce" forms["dat_pl_n"] = stem .. "īsce" forms["acc_pl_m"] = stem .. "ōsce" forms["acc_pl_f"] = stem .. "āsce" forms["acc_pl_n"] = stem .. "aec" forms["abl_pl_m"] = stem .. "īsce" forms["abl_pl_f"] = stem .. "īsce" forms["abl_pl_n"] = stem .. "īsce" forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "hice" then insert_if_not(data.title, "demostrativo") -- .. " pronoun" forms["nom_sg_m"] = "hice" forms["nom_sg_f"] = "haece" forms["nom_sg_n"] = "hoce" forms["nom_pl_m"] = "hīce" forms["nom_pl_f"] = "haece" forms["nom_pl_n"] = "haece" forms["gen_sg_m"] = "huiusce" forms["gen_sg_f"] = "huiusce" forms["gen_sg_n"] = "huiusce" forms["gen_pl_m"] = {"hōrunce", "hōrumce"} forms["gen_pl_f"] = {"hārunce", "hārumce"} forms["gen_pl_n"] = {"hōrunce", "hōrumce"} forms["dat_sg_m"] = "huīce" forms["dat_sg_f"] = "huīce" forms["dat_sg_n"] = "huīce" forms["dat_pl_m"] = "hīsce" forms["dat_pl_f"] = "hīsce" forms["dat_pl_n"] = "hīsce" forms["acc_sg_m"] = "hunce" forms["acc_sg_f"] = "hance" forms["acc_sg_n"] = "hoce" forms["acc_pl_m"] = "hōsce" forms["acc_pl_f"] = "hāsce" forms["acc_pl_n"] = "haece" forms["abl_sg_m"] = "hōce" forms["abl_sg_f"] = "hāce" forms["abl_sg_n"] = "hōce" forms["abl_pl_m"] = "hīsce" forms["abl_pl_f"] = "hīsce" forms["abl_pl_n"] = "hīsce" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "plūs" then insert_if_not(data.title, "comparativo") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación con una terminación") data.note = "Ninguna de las formas en singular se usaron en latín clásico" forms["nom_sg_n"] = "plūs" forms["nom_pl_m"] = "plūrēs" forms["nom_pl_n"] = "plūra" forms["gen_sg_m"] = "plūris" forms["gen_sg_n"] = "plūris" forms["gen_pl_m"] = "plūrium" forms["gen_pl_n"] = "plūrium" forms["dat_sg_m"] = "plūrī" forms["dat_sg_n"] = "plūrī" forms["dat_pl_m"] = "plūribus" forms["dat_pl_n"] = "plūribus" forms["acc_sg_m"] = "plūrem" forms["acc_sg_f"] = "plūrem" forms["acc_sg_n"] = "plūs" forms["acc_pl_m"] = {"plūrēs", "plūrīs"} forms["acc_pl_n"] = "plūra" forms["abl_sg_m"] = {"plūrī", "plūre"} forms["abl_sg_f"] = {"plūrī", "plūre"} forms["abl_sg_n"] = {"plūrī", "plūre"} forms["abl_pl_m"] = "plūribus" forms["abl_pl_n"] = "plūribus" forms["voc_sg_n"] = "plūs" forms["voc_pl_m"] = "plūrēs" forms["voc_pl_n"] = "plūra" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif match(arg1, "^egō̆?$") or arg1 == "nōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "nōs" forms["gen_sg_m"] = "meī" forms["gen_pl_m"] = {"nostrī", "nostrum"} forms["dat_sg_m"] = "mihī̆" forms["dat_pl_m"] = "nōbīs" forms["acc_sg_m"] = {"mē", "mēmē"} forms["acc_pl_m"] = "nōs" forms["abl_sg_m"] = {"mē", "mēmē"} forms["abl_pl_m"] = "nōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "nōs" elseif arg1 == "tū" or arg1 == "vōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "vōs" forms["gen_sg_m"] = "tuī" forms["gen_pl_m"] = {"vestrī", "vestrum"} forms["dat_sg_m"] = "tibī̆" forms["dat_pl_m"] = "vōbīs" forms["acc_sg_m"] = {"tē", "tētē"} forms["acc_pl_m"] = "vōs" forms["abl_sg_m"] = {"tē", "tētē"} forms["abl_pl_m"] = "vōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "vōs" elseif arg1 == "suī" then insert_if_not(data.title, "pronombre reflexivo") forms["nom_sg_m"] = {} forms["nom_pl_m"] = {} forms["gen_sg_m"] = arg1 forms["gen_pl_m"] = forms["gen_sg_m"] forms["dat_sg_m"] = "sibī̆" forms["dat_pl_m"] = forms["dat_sg_m"] forms["acc_sg_m"] = {"sē", "sēsē"} forms["acc_pl_m"] = {"sē", "sēsē"} forms["abl_sg_m"] = {"sē", "sēsē"} forms["abl_pl_m"] = {"sē", "sēsē"} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} elseif arg1 == "is" or arg1 == "īdem" then insert_if_not(data.title, "pronombre demostrativo") forms["nom_sg_m"] = "is" forms["nom_sg_f"] = "ea" forms["nom_sg_n"] = "id" forms["nom_pl_m"] = {"iī", "eī", "ī"} forms["nom_pl_f"] = "eae" forms["nom_pl_n"] = "ea" forms["gen_sg_m"] = {"eius", "ejus"} forms["gen_sg_f"] = {"eius", "ejus"} forms["gen_sg_n"] = {"eius", "ejus"} forms["gen_pl_m"] = {"eōrum", "eum"} forms["gen_pl_f"] = "eārum" forms["gen_pl_n"] = {"eōrum", "eum"} forms["dat_sg_m"] = {"eī", "e͡i", "ēī"} forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"} forms["dat_sg_n"] = {"eī", "e͡i", "ēī"} forms["dat_pl_m"] = {"iīs", "eīs", "īs"} forms["dat_pl_f"] = {"iīs", "eīs", "īs", "eābus"} forms["dat_pl_n"] = {"iīs", "eīs", "īs"} forms["acc_sg_m"] = "eum" forms["acc_sg_f"] = "eam" forms["acc_sg_n"] = "id" forms["acc_pl_m"] = "eōs" forms["acc_pl_f"] = "eās" forms["acc_pl_n"] = "ea" forms["abl_sg_m"] = "eō" forms["abl_sg_f"] = "eā" forms["abl_sg_n"] = "eō" forms["abl_pl_m"] = {"iīs", "eīs", "īs"} forms["abl_pl_f"] = {"iīs", "eīs", "īs"} forms["abl_pl_n"] = {"iīs", "eīs", "īs"} if arg1 == "īdem" then forms["nom_sg_m"] = "ī" forms["nom_sg_n"] = "i" forms["acc_sg_n"] = "i" end elseif arg1 == "quis" or arg1 == "quī" then data.note = "La forma ''qua'' es preferida frente a ''quae'' cuando se usa como indefinido" local id = "id" if arg1 == "quī" then insert_if_not(data.title, "determinante relativo/interrogativo") id = "od" forms["nom_sg_m"] = {"quī", "quis", "quei{†}"} forms["nom_sg_f"] = {"quae", "qua"} forms["acc_sg_f"] = "quam" forms["abl_sg_m"] = "quō" forms["abl_sg_f"] = "quā" forms["abl_sg_n"] = "quō" else insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = {"quis", "quī"} forms["nom_sg_f"] = {"quae", "qua", "quis{†}"} forms["acc_sg_f"] = {"quam", "quem{†}"} forms["abl_sg_m"] = {"quō", "quī"} forms["abl_sg_f"] = {"quā", "quī"} forms["abl_sg_n"] = {"quō", "quī"} end forms["nom_sg_n"] = "qu"..id forms["nom_pl_m"] = {"quī", "quei{†}"} forms["nom_pl_f"] = "quae" forms["nom_pl_n"] = {"quae", "qua"} forms["gen_sg_m"] = {"cuius", "quoius{†}"} forms["gen_sg_f"] = {"cuius", "quoius{†}"} forms["gen_sg_n"] = {"cuius", "quoius{†}"} forms["gen_pl_m"] = "quōrum" forms["gen_pl_f"] = "quārum" forms["gen_pl_n"] = "quōrum" forms["dat_sg_m"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_f"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_n"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_n"] = {"quibus", "quīs", "queis{†}"} forms["acc_sg_m"] = "quem" forms["acc_sg_n"] = "qu"..id forms["acc_pl_m"] = "quōs" forms["acc_pl_f"] = "quās" forms["acc_pl_n"] = {"quae", "qua"} forms["abl_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_n"] = {"quibus", "quīs", "queis{†}"} elseif arg1 == "aliquī" then insert_if_not(data.title, "determinante indefinido") forms["nom_sg_m"] = {"aliquī{DET/ADJ}", "aliquis{PRON/SUST}"} forms["nom_sg_f"] = {"aliqua", "aliquae{R}"} forms["nom_sg_n"] = "aliquod" forms["nom_pl_m"] = "aliquī" forms["nom_pl_f"] = "aliquae" forms["nom_pl_n"] = "aliqua" forms["gen_sg_m"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_f"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_n"] = {"alicuius", "aliquoius{†}"} forms["gen_pl_m"] = "aliquōrum" forms["gen_pl_f"] = "aliquārum" forms["gen_pl_n"] = "aliquōrum" forms["dat_sg_m"] = {"alicui", "aliquoi{†}"} forms["dat_sg_f"] = {"alicui", "aliquoi{†}"} forms["dat_sg_n"] = {"alicui", "aliquoi{†}"} forms["dat_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["acc_sg_m"] = "aliquem" forms["acc_sg_f"] = "aliquam" forms["acc_sg_n"] = "aliquod" forms["acc_pl_m"] = "aliquōs" forms["acc_pl_f"] = "aliquās" forms["acc_pl_n"] = "aliqua" forms["abl_sg_m"] = "aliquō" forms["abl_sg_f"] = "aliquā" forms["abl_sg_n"] = "aliquō" forms["abl_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} elseif arg1 == "quisquam" then insert_if_not(data.title, "determinante indefinido, concordancia en negativo") data.note = "En latín clásico, era preferidas las formas de ''ūllus'' en lugar de las esta voz para el femenino y el neutro." forms["nom_sg_m"] = "quisquam" forms["nom_sg_f"] = {"quaequam", "quisquam{†}"} forms["nom_sg_n"] = "quodquam" forms["nom_pl_m"] = "quīquam" forms["nom_pl_f"] = "quaequam" forms["nom_pl_n"] = "quaequam" forms["gen_sg_m"] = "cuiusquam" forms["gen_sg_f"] = "cuiusquam" forms["gen_sg_n"] = "cuiusquam" forms["gen_pl_m"] = "quōrumquam" forms["gen_pl_f"] = "quārumquam" forms["gen_pl_n"] = "quōrumquam" forms["dat_sg_m"] = "cuiquam" forms["dat_sg_f"] = "cuiquam" forms["dat_sg_n"] = "cuiquam" forms["dat_pl_m"] = "quibusquam" forms["dat_pl_f"] = "quibusquam" forms["dat_pl_n"] = "quibusquam" forms["acc_sg_m"] = "quemquam" forms["acc_sg_f"] = {"quamquam", "quemquam{†}"} forms["acc_sg_n"] = "quodquam" forms["acc_pl_m"] = "quōsquam" forms["acc_pl_f"] = "quāsquam" forms["acc_pl_n"] = "quaequam" forms["abl_sg_m"] = {"quōquam", "quīquam{†}"} forms["abl_sg_f"] = "quāquam" forms["abl_sg_n"] = "quōquam" forms["abl_pl_m"] = "quibusquam" forms["abl_pl_f"] = "quibusquam" forms["abl_pl_n"] = "quibusquam" forms["voc_sg_m"] = "quisquam" forms["voc_sg_f"] = "quaequam" forms["voc_sg_n"] = "quodquam" forms["voc_pl_m"] = "quīquam" forms["voc_pl_f"] = "quaequam" forms["voc_pl_n"] = "quaequam" elseif arg1 == "quisquis" then insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = "quisquis" forms["nom_sg_f"] = "quisquis" forms["nom_sg_n"] = {"quidquid", "quicquid"} forms["nom_pl_m"] = "quīquī" forms["nom_pl_f"] = "quaequae" forms["nom_pl_n"] = "quaequae" forms["gen_sg_m"] = "cuiuscuius" forms["gen_sg_f"] = "cuiuscuius" forms["gen_sg_n"] = "cuiuscuius" forms["gen_pl_m"] = "quōrumquōrum" forms["gen_pl_f"] = "quārumquārum" forms["gen_pl_n"] = "quōrumquōrum" forms["dat_sg_m"] = "cuicui" forms["dat_sg_f"] = "cuicui" forms["dat_sg_n"] = "cuicui" forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"} forms["acc_sg_m"] = "quemquem" forms["acc_sg_f"] = "quamquam" forms["acc_sg_n"] = {"quidquid", "quicquid"} forms["acc_pl_m"] = "quōsquōs" forms["acc_pl_f"] = "quāsquās" forms["acc_pl_n"] = "quaequae" forms["abl_sg_m"] = "quōquō" forms["abl_sg_f"] = "quāquā" forms["abl_sg_n"] = "quōquō" forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"} forms["voc_sg_m"] = "quisquis" forms["voc_sg_f"] = "quisquis" forms["voc_sg_n"] = {"quidquid", "quicquid"} forms["voc_pl_m"] = "quīquī" forms["voc_pl_f"] = "quaequae" forms["voc_pl_n"] = "quaequae" elseif arg1 == "ecquis" then insert_if_not(data.title, "pronombre interrogativo") forms["nom_sg_m"] = {"ecquis", "ecquī"} forms["nom_sg_f"] = {"ecqua", "ecquae"} forms["nom_sg_n"] = "ecquid" forms["nom_pl_m"] = "ecquī" forms["nom_pl_f"] = "ecquae" forms["nom_pl_n"] = {"ecqua", "ecquae"} forms["gen_sg_m"] = "eccuius" forms["gen_sg_f"] = "eccuius" forms["gen_sg_n"] = "eccuius" forms["dat_sg_m"] = "eccui" forms["dat_sg_f"] = "eccui" forms["dat_sg_n"] = "eccui" forms["acc_sg_m"] = "ecquem" forms["acc_sg_f"] = "ecquam" forms["acc_sg_n"] = "ecquod" forms["acc_pl_m"] = "ecquōs" forms["acc_pl_f"] = "ecquās" forms["acc_pl_n"] = {"ecqua", "ecquae"} forms["abl_sg_m"] = {"ecquō", "ecquī"} forms["abl_sg_f"] = {"ecquā", "ecquī"} forms["abl_sg_n"] = {"ecquō", "ecquī"} elseif arg1 == "quīdam" then insert_if_not(data.title, "pronombre indefinido") forms["nom_sg_m"] = "quīdam" forms["nom_sg_f"] = "quaedam" forms["nom_sg_n"] = "quiddam" forms["nom_pl_m"] = {"quīdam", "quēsdam{†}"} forms["nom_pl_f"] = "quaedam" forms["nom_pl_n"] = "quaedam" forms["gen_sg_m"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_f"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_n"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_pl_m"] = {"quōrundam", "quōrumdam"} forms["gen_pl_f"] = {"quārundam", "quārumdam"} forms["gen_pl_n"] = {"quōrundam", "quōrumdam"} forms["dat_sg_m"] = {"cuidam", "quoidam{†}"} forms["dat_sg_f"] = {"cuidam", "quoidam{†}"} forms["dat_sg_n"] = {"cuidam", "quoidam{†}"} forms["dat_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_n"] = {"quibusdam", "quīsdam{†}"} forms["acc_sg_m"] = {"quendam", "quemdam"} forms["acc_sg_f"] = {"quandam", "quamdam"} forms["acc_sg_n"] = "quiddam" forms["acc_pl_m"] = {"quōsdam", "quēsdam{†}"} forms["acc_pl_f"] = "quāsdam" forms["acc_pl_n"] = "quaedam" forms["abl_sg_m"] = "quōdam" forms["abl_sg_f"] = "quādam" forms["abl_sg_n"] = "quōdam" forms["abl_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_n"] = {"quibusdam", "quīsdam{†}"} elseif arg1 == "nēmō" then insert_if_not(data.title, "Determinante y pronombre, concordancia en negativo") forms["nom_sg_m"] = "nēmō" forms["nom_sg_f"] = "nēmō" forms["gen_sg_m"] = {"nūllī̆us", "nēminis{R}"} forms["gen_sg_f"] = {"nūllī̆us", "nēminis{R}"} forms["dat_sg_m"] = "nēminī" forms["dat_sg_f"] = "nēminī" forms["acc_sg_m"] = "nēminem" forms["acc_sg_f"] = "nēminem" forms["abl_sg_m"] = {"nūllō", "nēmine{R}"} forms["abl_sg_f"] = {"nūllā", "nēmine{R}"} else error('adjective ' .. arg1 .. ' not recognized') end end local function extract_base(lemma, ending) if ending:find("(", nil, true) then return match(lemma, ending) end return match(lemma, "^(.*)" .. ending .. "$") end local function get_noun_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local subtypes = ending_and_subtypes[2] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. -- In addition, M or F as a subtype is canceled by N, and -- vice-versa, but M doesn't cancel F or vice-versa; instead, -- we simply ignore the conflicting gender specification when -- constructing the combination of specified and inferred subtypes. -- The reason for this is that neuters have distinct declensions -- from masculines and feminines, but masculines and feminines have -- the same declension, and various nouns in Latin that are -- normally masculine are exceptionally feminine and vice-versa -- (nauta, agricola, fraxinus, malus "apple tree", manus, rēs, -- etc.). -- -- In addition, sg as a subtype is canceled by pl and vice-versa. -- It's also possible to specify both, which will override sg but -- not cancel it (in the sense that it won't prevent the relevant -- rule from matching). For example, there's a rule specifying that -- lemmas beginning with a capital letter and ending in -ius take -- the ius.voci.sg subtypes. Specifying such a lemma with the -- subtype both will result in the ius.voci.both subtypes, whereas -- specifying such a lemma with the subtype pl will cause this rule -- not to match, and it will fall through to a less specific rule -- that returns just the ius subtype, which will be combined with -- the explicitly specified pl subtype to produce ius.pl. if specified_subtypes["-" .. subtype] or subtype == "N" and (specified_subtypes.M or specified_subtypes.F) or (subtype == "M" or subtype == "F") and specified_subtypes.N or subtype == "sg" and specified_subtypes.pl or subtype == "pl" and specified_subtypes.sg then not_this_subtype = true break end end end if not not_this_subtype then if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] local base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending == stem2 then return base, stem2, subtypes end else local base = extract_base(lemma, ending) if base then return base, stem2, subtypes end end end end if decltype then error("Unrecognized ending for declension-" .. decltype .. " noun: " .. lemma) end return lemma, stem2, keys_to_list(specified_subtypes) end local patterns = { {"[mM]a", "%0t"}, {"e", ""}, {"([aoAO])([lr])", "%1" .. MACRON .. "%2"}, {"[eE]l", "%0l"}, {"([mM])en", "%1in"}, {"([tT]ūd)ō", "%1in"}, {"([gG])ō", "%1in"}, {"[ōŌ]", "%1n"}, {"er", "r"}, {"[ēi]s", ""}, {"([āēīōūȳĀĒĪŌŪȲ]n)s", function(v) return (gsub(toNFD(v), MACRON, "") .. "t") end}, {"([cC])eps", "%1ipit"}, {"([bp])s", "%1"}, {"us", "or"}, {"s", "t"}, {"ex", "ic"}, {"x", "c"}, } local function make_stem2(stem) local n for _, pattern in ipairs(patterns) do local key = pattern[1] stem, n = gsub(stem, key .. "$", pattern[2]) if n > 0 then -- debug_track("la-utilities/" .. key) REVISAR return toNFC(stem) end end -- debug_track("la-utilities") REVISAR return stem end local function detect_noun_subtype(lemma, stem2, typ, subtypes) local base, _ if typ == "1" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ām", {"F", "am"}}, {"ās", {"M", "Greek", "Ma"}}, {"ēs", {"M", "Greek", "Me"}}, {"ē", {"F", "Greek"}}, {"ae", {"F", "pl"}}, {"a", {"F"}}, }) elseif typ == "2" then local detected_subtypes lemma, stem2, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(.*r)$", {"M", "er"}}, {"^(.*v)os$", {"M", "vos"}}, {"^(.*v)om$", {"N", "vom"}}, -- If the lemma ends in -os and the user said N or -M, then the -- following won't apply, and the second (neuter) -os will applly. {"os", {"M", "Greek"}}, {"os", {"N", "Greek", "us"}}, {"on", {"N", "Greek"}}, -- -ius beginning with a capital letter is assumed a proper name, -- and takes the voci subtype (vocative in -ī) along with the ius -- subtype and sg-only. Other nouns in -ius just take the ius -- subtype. Explicitly specify "sg" so that if .pl is given, -- this rule won't apply. {"^(%u.*)ius$", {"M", "ius", "voci", "sg"}}, {"ius", {"M", "ius"}}, {"ium", {"N", "ium"}}, -- If the lemma ends in -us and the user said N or -M, then the -- following won't apply, and the second (neuter) -us will applly. {"us", {"M"}}, {"us", {"N", "us"}}, {"um", {"N"}}, {"iī", {"M", "ius", "pl"}}, {"ia", {"N", "ium", "pl"}}, -- If the lemma ends in -ī and the user said N or -M, then the -- following won't apply, and the second (neuter) -ī will applly. {"ī", {"M", "pl"}}, {"ī", {"N", "us", "pl"}}, {"oe", {"M", "Greek", "pl"}}, {"a", {"N", "pl"}}, }) stem2 = stem2 or lemma return lemma, stem2, detected_subtypes elseif typ == "3" then if subtypes.pl then if subtypes.Greek then base = lemma:match("^(.*)erēs$") if base then return base .. "ēr", base .. "er", {"er"} end base = lemma:match("^(.*)ontēs$") if base then return base .. "ōn", base .. "ont", {"on"} end base = lemma:match("^(.*)es$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural Greek noun: " .. lemma) end base = lemma:match("^(.*)ia$") if base then return base, stem2 or base, {"N", "I", "pure"} end base = lemma:match("^(.*)a$") if base then return base, stem2 or base, {"N"} end base = lemma:match("^(.*)ēs$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural noun: " .. lemma) end stem2 = stem2 or make_stem2(lemma) local detected_subtypes if subtypes.Greek then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"is", ""}, {"I"}}, {"ēr", {"er"}}, {"ōn", {"on"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} end if not subtypes.N then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"^(%u.*pol)is$", ""}, {"F", "polis", "sg", "loc"}}, {{"tūdō", "tūdin"}, {"F"}}, {{"tās", "tāt"}, {"F"}}, {{"tūs", "tūt"}, {"F"}}, {{"tiō", "tiōn"}, {"F"}}, {{"siō", "siōn"}, {"F"}}, {{"xiō", "xiōn"}, {"F"}}, {{"gō", "gin"}, {"F"}}, {{"or", "ōr"}, {"M"}}, {{"tr[iī]x", "trīc"}, {"F"}}, {{"is", ""}, {"I"}}, {{"^(%l.*)ēs$", ""}, {"I"}}, }) if base then return lemma, stem2, detected_subtypes end end base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"us", "or"}, {"N"}}, {{"us", "er"}, {"N"}}, {{"ma", "mat"}, {"N"}}, {{"men", "min"}, {"N"}}, {{"^(%u.*)e$", ""}, {"N", "sg"}}, {{"e", ""}, {"N", "I", "pure"}}, {{"al", "āl"}, {"N", "I", "pure"}}, {{"ar", "ār"}, {"N", "I", "pure"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} elseif typ == "4" then if subtypes.echo or subtypes.Callisto then base = lemma:match("^(.*)ō$") if not base then error("Declension-4 noun of subtype .echo or .Callisto should end in -ō: " .. lemma) end if subtypes.Callisto then return base, nil, {"F", "sg"} else return base, nil, {"F"} end end return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", {"M"}}, {"ū̆", {"N"}}, {"ūs", {"M", "pl"}}, {"ua", {"N", "pl"}}, }) elseif typ == "5" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"iēs", {"F", "i"}}, {"iēs", {"F", "i", "pl"}}, {"ēs", {"F"}}, {"ēs", {"F", "pl"}}, }) elseif typ == "sgpl" then return lemma, stem2, {} elseif typ == "irreg" and lemma == "domus" then -- [[domus]] auto-sets data.loc = true, but we need to know this -- before declining the noun so we can propagate it to other segments. return lemma, nil, {"loc"} elseif typ == "indecl" or typ == "irreg" and ( lemma == "Deus" or match(lemma, "^[IJ]ēs[uū]s$") or lemma == "Athōs" or lemma == "vēnum" ) then -- Indeclinable nouns, and certain irregular nouns, set data.num = "sg", -- but we need to know this before declining the noun so we can -- propagate it to other segments. return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", {"both"}}, {"", {"sg"}}, {"", {"pl"}}, }) elseif typ == "indecl" or typ == "irreg" then return lemma, nil, {} else return nil, nil, {} end end -- Given ENDINGS_AND_SUBTYPES (a list of four-tuples of ENDING, RETTYPE, -- SUBTYPES, PROCESS_RETVAL), check each ENDING in turn against LEMMA and -- STEM2. If it matches, return a four-tuple BASE, STEM2, RETTYPE, NEW_SUBTYPES -- where BASE is normally the remainder of LEMMA minus the ending, STEM2 is -- as passed in, RETTYPE is as passed in, and NEW_SUBTYPES is the same as -- SUBTYPES minus any subtypes beginning with a hyphen. If no endings match, -- throw an error if DECLTYPPE is non-nil, mentioning the DECLTYPE -- (user-specified declension); but if DECLTYPE is nil, just return the tuple -- nil, nil, nil, nil. -- -- In order for a given entry to match, ENDING must match and also the subtypes -- in SUBTYPES (a list) must not be incompatible with the passed-in -- user-specified subtypes SPECIFIED_SUBTYPES (a set, i.e. a table where the -- keys are strings and the value is always true). "Incompatible" means that -- a given SUBTYPE is specified in either one and -SUBTYPE in the other, or -- that "pl" is found in SPECIFIED_SUBTYPES and not in SUBTYPES. -- -- The ending spec in ENDINGS_AND_SUBTYPES is one of the following: -- -- 1. A simple string, e.g. "tūdō", specifying an ending. -- 2. A regex that should match the entire lemma (it should be anchored at -- the beginning with ^ and at the end with $), and contains a single -- capturing group to match the base. -- 3. A pair {SIMPLE_STRING_OR_REGEX, STEM2_ENDING} where -- SIMPLE_STRING_OR_REGEX is one of the previous two possibilities and -- STEM2_ENDING is a string specifying the corresponding ending that must -- be present in STEM2. If this form is used, the combination of -- base + STEM2_ENDING must exactly match STEM2 in order for this entry -- to be considered a match. An example is {"is", ""}, which will match -- lemma == "follis", stem2 == "foll", but not lemma == "lapis", -- stem2 == "lapid". -- -- If PROCESS_STEM2 is given and the returned STEM2 would be nil, call -- process_stem2(BASE) to get the STEM2 to return. local function get_adj_type_and_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes, process_stem2) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local rettype = ending_and_subtypes[2] local subtypes = ending_and_subtypes[3] local process_retval = ending_and_subtypes[4] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. if specified_subtypes["-" .. subtype] then not_this_subtype = true break end -- A subtype is canceled if the user specified SUBTYPE and -- -SUBTYPE is given in the to-be-returned subtypes. local must_not_be_present = subtype:match("^%-(.*)$") if must_not_be_present and specified_subtypes[must_not_be_present] then not_this_subtype = true break end end end if not not_this_subtype then local base if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending ~= stem2 then base = nil end else base = extract_base(lemma, ending) end if base then -- Remove subtypes of the form -SUBTYPE from the subtypes -- to be returned. local new_subtypes = {} for _, subtype in ipairs(subtypes) do if subtype:sub(1, 1) ~= "-" then insert(new_subtypes, subtype) end end if process_retval then base, stem2 = process_retval(base, stem2) end if process_stem2 then stem2 = stem2 or process_stem2(base) end return base, stem2, rettype, new_subtypes end end end if not decltype then return lemma, stem2, nil, keys_to_list(specified_subtypes) elseif decltype == "" then error("Unrecognized ending for adjective: " .. lemma) else error("Unrecognized ending for declension-" .. decltype .. " adjective: " .. lemma) end end -- Autodetect the type and subtype of an adjective given all the information -- specified by the user: lemma, stem2, declension type and specified subtypes. -- Four values are returned: the lemma base (i.e. the stem of the lemma, as -- required by the declension functions), the value of stem2 to pass to the -- declension function, the declension type and the autodetected subtypes. -- Note that this will not detect a given subtype if -SUBTYPE is specified for -- any subtype that would be returned, or if SUBTYPE is specified and -SUBTYPE -- is among the subtypes that would be returned (such subtypes are filtered out -- of the returned subtypes). local function detect_adj_type_and_subtype(lemma, stem2, typ, subtypes) local function base_as_stem2(base, stem2) return base, base end local function constant_base(baseval) return function(base, stem2) return baseval, nil end end local function decl12_stem2(base) return base end local function decl3_stem2(base) return make_stem2(base) end local decl12_entries = { {"us", "1&2+", {}}, {"a", "1&2+", {}}, {"um", "1&2+", {}}, {"ī", "1&2+", {"pl"}}, {"ae", "1&2+", {"pl"}}, {"a", "1&2+", {"pl"}}, -- Nearly all -os adjectives are greekA {"os", "1&2+", {"greekA", "-greekE"}}, {"os", "1&2+", {"greekE", "-greekA"}}, {"ē", "1&2+", {"greekE", "-greekA"}}, {"on", "1&2+", {"greekA", "-greekE"}}, {"on", "1&2+", {"greekE", "-greekA"}}, {"^(.*er)$", "1&2+", {"er"}}, {"^(.*ur)$", "1&2+", {"er"}}, {"^(h)ic$", "1&2+", {"ic"}}, } local decl3_entries = { {"^(.*er)$", "3-3+", {"I"}}, {"^(.*er)$", "3-3+", {}}, {"is", "3-2+", {"I"}}, {"is", "3-2+", {}}, {"e", "3-2+", {"I"}}, {"e", "3-2+", {}}, {"^(.*[ij])or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(.*[ij])or$", "3-C+", {}}, {"^(min)or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(min)or$", "3-C+", {}}, {"^(.*trīx)$", "3-def+", {"trix", "abl_i_e", "-abl_e_i"}}, {"^(.*trīx)$", "3-def+", {"trix"}}, {"^(.*tor)$", "3-def+", {"tor", "abl_i_e", "-abl_e_i"}}, {"^(.*tor)$", "3-def+", {"tor"}}, -- Detect -ēs as 3-1 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like quadripēs, volucripēs). -- Essentially, for declension-3 adjectives, we require that -- .pl is given if the lemma is plural. -- -- Most 3-1 adjectives are i-stem (e.g. audāx) so we require -I -- to be given with non-i-stem adjectives. The first entry below -- will apply when -I isn't given, the second when it is given. {"^(.*ēs)$", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"I"}}, {"^(.*ēs)$", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"par"}}, {"^(.*[ij])ōrēs$", "3-C+", {"pl"}}, {"^(min)ōrēs$", "3-C+", {"pl"}}, -- If .pl with -ēs, we don't know if the adjective is 3-1, 3-2 -- or 3-3. Since 3-2 is probably the most common, we infer it -- (as well as the fact that these adjectives *are* in a sense -- 3-2 since they have a distinct neuter in -(i)a. Note that -- we have two entries here; the first one will apply unless -- -I is given, and will infer an i-stem adjective; the second -- one will apply otherwise (and infer a non-i-stem 3-1 adjective). {"ēs", "3-2+", {"pl", "I"}, base_as_stem2}, {"ēs", "3-1+", {"pl", "par"}, base_as_stem2}, -- Same for neuters. {"ia", "3-2+", {"pl", "I"}, base_as_stem2}, {"a", "3-1+", {"pl", "par"}, base_as_stem2}, -- As above for -ēs but for miscellaneous singulars. {"", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"I"}}, {"", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"par"}}, } local function get_subtypes_and_endings(typ, f) local subtypes_and_endings = {} for _, v in ipairs(decl3_entries) do if f(v) then v = deep_copy(v) v[2] = typ insert(subtypes_and_endings, v) end end return subtypes_and_endings end local function compare(spec) return spec[2] == typ end if typ == "+" then local base, new_stem2, rettype, new_subtypes = get_adj_type_and_subtype_by_ending(lemma, stem2, nil, subtypes, decl12_entries, decl12_stem2) if rettype then return base, new_stem2, rettype, new_subtypes else return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) end elseif typ == "3+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) elseif typ == "1&2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl12_entries, decl12_stem2) elseif typ == "1-1+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"a", typ, {}}, {"ae", typ, {"pl"}}, }) elseif typ == "2-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", typ, {}}, {"um", typ, {}}, {"ī", typ, {"pl"}}, {"a", typ, {"pl"}}, {"os", typ, {"greek"}}, {"on", typ, {"greek"}}, {"oe", typ, {"greek", "pl"}}, }) elseif typ == "3-1+" then -- Use the specs from `decl3_entries`, but add the two i-stem 3-2+ specs when plural-only, as they're the same when 3-1+. local subtypes_and_endings = get_subtypes_and_endings(typ, function(spec) local spec1, spec2 = spec[1], spec[2] return spec2 == typ or (spec2 == "3-2+" and spec1 == "ēs" or spec1 == "ia") end) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-def+" then -- Like 3-1+ but defective in gender local subtypes_and_endings = get_subtypes_and_endings(typ, compare) insert(subtypes_and_endings, {"", typ, {"I"}}) insert(subtypes_and_endings, {"", typ, {"par"}}) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"is", typ, {}}, {"e", typ, {}}, -- Detect -ēs as 3-2 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like isoscelēs). Essentially, -- for declension-3 adjectives, we require that .pl is given -- if the lemma is plural. {"ēs", typ, {}}, {"ēs", typ, {"pl"}}, {"ia", typ, {"pl"}}, }, decl3_stem2) elseif typ == "3-3+" or typ == "3-P+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ēs", typ, {"pl"}, base_as_stem2}, {"ia", typ, {"pl"}, base_as_stem2}, {"", typ, {}}, }, decl3_stem2) elseif typ == "3-C+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, get_subtypes_and_endings(typ, compare), decl3_stem2) elseif typ == "irreg+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(duo)$", typ, {"pl"}}, {"^(ambō)$", typ, {"pl"}}, {"^(mīll?ia)$", typ, {"N", "pl"}, constant_base("mīlle")}, -- match ea {"^(ea)$", typ, {}, constant_base("is")}, -- match id {"^(id)$", typ, {}, constant_base("is")}, -- match plural eī, iī {"^([ei]ī)$", typ, {"pl"}, constant_base("is")}, -- match plural ea, eae {"^(eae?)$", typ, {"pl"}, constant_base("is")}, -- match eadem {"^(eadem)$", typ, {}, constant_base("īdem")}, -- match īdem, idem {"^([īi]dem)$", typ, {}, constant_base("īdem")}, -- match plural īdem {"^(īdem)$", typ, {"pl"}}, -- match plural eadem, eaedem {"^(eae?dem)$", typ, {"pl"}, constant_base("īdem")}, -- match illa, ipsa, ista; it doesn't matter if we overmatch because -- we'll get an error as we use the stem itself in the returned base {"^(i[lps][lst])a$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match illud, istud; as above, it doesn't matter if we overmatch {"^(i[ls][lt])ud$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match ipsum {"^(ipsum)$", typ, {}, constant_base("ipse")}, -- match plural illī, ipsī, istī; as above, it doesn't matter if we -- overmatch {"^(i[lps][lst])ī$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- match plural illa, illae, ipsa, ipsae, ista, istae; as above, it -- doesn't matter if we overmatch {"^(i[lps][lst])ae?$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- Detect quī as non-plural unless .pl specified. {"^(quī)$", typ, {}}, -- Otherwise detect quī as plural. {"^(quī)$", typ, {"pl"}}, -- Same for quae. {"^(quae)$", typ, {}, constant_base("quī")}, {"^(quae)$", typ, {"pl"}, constant_base("quī")}, {"^(quid)$", typ, {}, constant_base("quis")}, {"^(quod)$", typ, {}, constant_base("quī")}, {"^(qui[cd]quid)$", typ, {}, constant_base("quisquis")}, {"^(quīquī)$", typ, {"pl"}, constant_base("quisquis")}, {"^(quaequae)$", typ, {"pl"}, constant_base("quisquis")}, -- match all remaining lemmas in lemma form {"", typ, {}}, }) elseif typ == "indecl+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", typ, {"both"}}, {"", typ, {"sg"}}, {"", typ, {"pl"}}, }) else -- 0+ return lemma, nil, typ, {} end end local noun_lb = { nom_sg = "sg.", gen_sg = "sg.", dat_sg = "sg.", acc_sg = "sg.", abl_sg = "sg.", voc_sg = "sg.", loc_sg = "sg.", nom_pl = "pl.", gen_pl = "pl.", dat_pl = "pl.", acc_pl = "pl.", abl_pl = "pl.", voc_pl = "pl.", loc_pl = "pl." } function export.sust(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de = "num"}, ["nota"] = {}, } for form,_ in pairs(noun_lb) do params[form] = {lista=true} end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local genero local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, detected_subtypes = detect_noun_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end if not genero then if types.M then genero = "m" end if types.N then genero = "n" end if types.F then genero = "f" end end local es_adj if not r1 and genero then local typ r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) if r1 then c = typ es_adj = true end end assert(r1, "forma no reconocida: "..r[1]) local cb = es_adj and adj_decl[c] or noun_decl[c] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) if es_adj then local forms_ = {} for form,arr in pairs(data.forms) do local f1, f2 = form:match("^(.*)(_"..genero..")$") if f1 then forms_[f1] = arr end end data.forms = forms_ end if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, noun_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if declinfo["loc_sg"] and #declinfo["loc_sg"] == 0 then declinfo["loc_sg"] = nil end if declinfo["loc_pl"] and #declinfo["loc_pl"] == 0 then declinfo["loc_pl"] = nil end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local forms = sobreescribir_formas(declinfo, args, false, {}) comprobar_defectivo(forms, {}) forms = desactivar_formas(forms, function (form) return (form:find("pl$") and nopl) or (form:find("sg$") and nosg) end ) local raiz_nom = f(forms["nom_sg"][1] or forms["nom_pl"][1] or "?") local raiz_gen = f(forms["gen_sg"][1] or forms["gen_pl"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, noun_lb) local t = {} insert(t, {{""}, {"Singular"}, {"Plural"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg"], forms["nom_pl"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg"], forms["gen_pl"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg"], forms["dat_pl"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg"], forms["acc_pl"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg"], forms["abl_pl"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg"], forms["voc_pl"]}) if (forms["loc_sg"] and forms["loc_sg"][1]) or (forms["loc_pl"] and forms["loc_pl"][1]) then insert(t, {{"Locativo", header=true, color=COLOR_H}, forms["loc_sg"], forms["loc_pl"]}) end insert(t, {{args["nota"] or "", colspan=3}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_nom..", "..raiz_gen.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local adj_lb = { nom_sg_m = "m.", nom_sg_n = "n.", nom_sg_f = "f.", nom_pl_m = "m.", nom_pl_n = "n.", nom_pl_f = "f.", gen_sg_m = "m.", gen_sg_n = "n.", gen_sg_f = "f.", gen_pl_m = "m.", gen_pl_n = "n.", gen_pl_f = "f.", dat_sg_m = "m.", dat_sg_n = "n.", dat_sg_f = "f.", dat_pl_m = "m.", dat_pl_n = "n.", dat_pl_f = "f.", acc_sg_m = "m.", acc_sg_n = "n.", acc_sg_f = "f.", acc_pl_m = "m.", acc_pl_n = "n.", acc_pl_f = "f.", abl_sg_m = "m.", abl_sg_n = "n.", abl_sg_f = "f.", abl_pl_m = "m.", abl_pl_n = "n.", abl_pl_f = "f.", voc_sg_m = "m.", voc_sg_n = "n.", voc_sg_f = "f.", voc_pl_m = "m.", voc_pl_n = "n.", voc_pl_f = "f.", } function export.adj(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de="num"}, ["gen"] = {por_defecto="mfn"}, ["nota"] = {}, } for form,_ in pairs(adj_lb) do params[form] = {lista=true} end params["dat_pl"] = {lista=true} params["abl_pl"] = {lista=true} params["loc_pl"] = {lista=true} local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) if args["dat_pl"][1] then args["dat_pl_m"] = deep_copy(args["dat_pl"]) args["dat_pl_n"] = deep_copy(args["dat_pl"]) args["dat_pl_f"] = deep_copy(args["dat_pl"]) end if args["abl_pl"][1] then args["abl_pl_m"] = deep_copy(args["abl_pl"]) args["abl_pl_n"] = deep_copy(args["abl_pl"]) args["abl_pl_f"] = deep_copy(args["abl_pl"]) end if args["loc_pl"][1] then args["loc_pl_m"] = deep_copy(args["loc_pl"]) args["loc_pl_n"] = deep_copy(args["loc_pl"]) args["loc_pl_f"] = deep_copy(args["loc_pl"]) end args["dat_pl"] = nil args["abl_pl"] = nil args["loc_pl"] = nil assert(not find(title, " "), "locuciones no soportadas aún") -- REVISAR local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") a = a or subarg b = b or "+" local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end local cb = adj_decl[typ] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) local formas_ = {} -- necesario crear otro arreglo para no modificar las claves durante la iteración for form,arr in pairs(data.forms) do local pref = match(form, "^(.*)_m$") if pref and not data.forms[pref.."_f"] then formas_[pref.."_f"] = deep_copy(arr) end if pref and not data.forms[pref.."_n"] then formas_[pref.."_n"] = deep_copy(arr) end formas_[form] = arr end data.forms = formas_ if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, adj_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local m = find(args["gen"], "m") local fem = find(args["gen"], "f") local n = find(args["gen"], "n") local forms = sobreescribir_formas(declinfo, args, false, {}, adj_lb) comprobar_defectivo(forms) forms = desactivar_formas(forms, function (form) return (form:find("pl") and nopl) or (form:find("sg") and nosg) or (form:find("m$") and not m) or (form:find("f$") and not fem) or (form:find("n$") and not n) end ) local raiz_m = f(forms["nom_sg_m"][1] or forms["nom_pl_m"][1] or "?") local raiz_f = f(forms["nom_sg_f"][1] or forms["nom_pl_f"][1] or "?") local raiz_n = f(forms["nom_sg_n"][1] or forms["nom_pl_n"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, adj_lb) local t = {} insert(t, {{"Singular", colspan=4}, header=true, color=COLOR_H}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg_m"], forms["nom_sg_f"], forms["nom_sg_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg_m"], forms["gen_sg_f"], forms["gen_sg_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg_m"], forms["dat_sg_f"], forms["dat_sg_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg_m"], forms["acc_sg_f"], forms["acc_sg_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg_m"], forms["abl_sg_f"], forms["abl_sg_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg_m"], forms["voc_sg_f"], forms["voc_sg_n"]}) insert(t, {{"Plural", colspan=4, header=true, color=COLOR_H}}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_pl_m"], forms["nom_pl_f"], forms["nom_pl_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_pl_m"], forms["gen_pl_f"], forms["gen_pl_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_pl_m"], forms["dat_pl_f"], forms["dat_pl_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_pl_m"], forms["acc_pl_f"], forms["acc_pl_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_pl_m"], forms["abl_pl_f"], forms["abl_pl_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_pl_m"], forms["voc_pl_f"], forms["voc_pl_n"]}) insert(t, {{args["nota"] or "", colspan=4}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_m..", "..raiz_f..", "..raiz_n.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local EGO, TU, IS, NOS, VOS, EI = 1, 2, 3, 4, 5, 6 local tostr = {"1", "2", "3", "4", "5", "6"} local PRONOMBRES = {"ego", "tū", "is, ea, id", "nōs", "vōs", "eī, eae, ea"} local PRONOMBRES_SUBJ = {"ut ego", "ut tū", "ut is, ut ea, ut id", "ut nōs", "ut vōs", "ut eī, ut eae, ut ea"} local PRONOMBRES_IMP = {"―", "(tū)", "(is, ea, id)", "―", "(vōs)", "(eī, eae, ea)"} local IMPERSONALES = {"", "", "(id)", "", "", ""} local function obtener_pronombre(forma, impers) local conj, p = match(forma, "^(.*)(%d)$") if not p then return nil end p = tonumber(p) if impers then return IMPERSONALES[p] else if find(conj, "^subj") then return PRONOMBRES_SUBJ[p] end if find(conj, "^imper") then return PRONOMBRES_IMP[p] end return PRONOMBRES[p] end end local sufijos = { ["1"] = { inf_act = {"āre","isse"}, inf_pas = {"ārī"}, part_act = {"āns","ūrus"}, part_pas = {"andus","us"}, ger = {"andī","andō","andum"}, sup = {"um","ū"}, ind_pres = {"ō","ās","at","āmus","ātis","ant"}, ind_imp = {"ābam","ābās","ābat","ābāmus","ābātis","ābant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ābō","ābis","ābit","ābimus","ābitis","ābunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","āris","ātur","āmur","āminī","antur", nil,"āre"}, ind_imp_pas = {"ābar","ābāris","ābātur","ābāmur","ābāminī","ābantur", nil,"ābāre"}, ind_fut_pas = {"ābor","āberis","ābitur","ābimur","ābiminī","ābuntur", nil,"ābere"}, subj_pres = {"em","ēs","et","ēmus","ētis","ent"}, subj_imp = {"ārem","ārēs","āret","ārēmus","ārētis","ārent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"er","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_imp_pas = {"ārer","ārēris","ārētur","ārēmur","ārēminī","ārentur", nil,"ārēre"}, imper_pres = {nil,"ā",nil,nil,"āte",nil}, imper_fut = {nil,"ātō","ātō",nil,"ātōte","antō"}, imper_pres_pas = {nil,"āre",nil,nil,"āminī",nil}, imper_fut_pas = {nil,"ātor","ātor",nil,nil,"antor"}, }, ["2"] = { inf_act = {"ēre","isse"}, inf_pas = {"ērī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"eō","ēs","et","ēmus","ētis","ent"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ēbō","ēbis","ēbit","ēbimus","ēbitis","ēbunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"eor","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ēbor","ēberis","ēbitur","ēbimur","ēbiminī","ēbuntur", nil,"ēbere"}, subj_pres = {"eam","eās","eat","eāmus","eātis","eant"}, subj_imp = {"ērem","ērēs","ēret","ērēmus","ērētis","ērent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ear","eāris","eātur","eāmur","eāminī","eantur", nil,"eāre"}, subj_imp_pas = {"ērer","ērēris","ērētur","ērēmur","ērēminī","ērentur", nil,"ērēre"}, imper_pres = {nil,"ē",nil,nil,"ēte",nil}, imper_fut = {nil,"ētō","ētō",nil,"ētōte","entō"}, imper_pres_pas = {nil,"ēre",nil,nil,"ēminī",nil}, imper_fut_pas = {nil,"ētor","ētor",nil,nil,"entor"}, }, ["3"] = { -- 3 (comparar [[capio]] con [[lego]], las raíces con capi- y leg- pero hay que eliminar la doble ii) inf_act = {"ere","isse"}, inf_pas = {"ī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", nil,"ere"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_pres = {"am","ās","at","āmus","ātis","ant"}, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", nil,"āre"}, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", nil,"erēre"}, imper_pres = {nil,"e",nil,nil,"ite",nil}, imper_fut = {nil,"itō","itō",nil,"itōte","untō"}, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil}, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor"}, }, ["3/4"] = { inf_act = {"ere","isse","īre","isse"}, inf_pas = {"ī","īrī"}, part_act = {"ēns","iēns","ūrus"}, part_pas = {"endus","iendus","us"}, ger = {"endī","endō","endum","iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt", "iō","īs",nil,"īmus","ītis","iunt" }, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant", "iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant" }, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent", "iam","iēs","iet","iēmus","iētis","ient" }, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", "ior","ere","ītur","īmur","īminī","iuntur", nil,"īris",nil,nil,nil,nil, nil,"īre" }, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", "iēbar","ēbāre","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāris",nil,nil,nil,nil, nil,"iēbāre" }, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", "iar","ēre","iētur","iēmur","iēminī","ientur", nil,"iēris",nil,nil,nil,nil, nil,"iēre" }, subj_pres = {"am","ās","at","āmus","ātis","ant", "iam","iās","iat","iāmus","iātis","iant", }, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent", "īrem","īrēs","īret","īrēmus","īrētis","īrent" }, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", "iar","āre","iātur","iāmur","iāminī","iantur", nil,"iāris",nil,nil,nil,nil, nil,"iāre" }, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", "īrer","erēre","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēris",nil,nil,nil,nil, nil,"īrēre" }, imper_pres = {nil,"e",nil,nil,"ite",nil, nil,"ī",nil,nil,"īte",nil }, imper_fut = {nil,"itō","itō",nil,"itōte","untō", nil,"ītō","ītō",nil,"ītōte","iuntō" }, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil, nil,"īre",nil,nil,"īminī",nil }, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor", nil,"ītor","ītor",nil,nil,"iuntor" }, }, ["4"] = { inf_act = {"īre","isse"}, inf_pas = {"īrī"}, part_act = {"iēns","ūrus"}, part_pas = {"iendus","us"}, ger = {"iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"iō","īs","it","īmus","ītis","iunt"}, ind_imp = {"iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"iam","iēs","iet","iēmus","iētis","ient"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"ior","īris","ītur","īmur","īminī","iuntur", nil,"īre"}, ind_imp_pas = {"iēbar","iēbāris","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāre"}, ind_fut_pas = {"iar","iēris","iētur","iēmur","iēminī","ientur", nil,"iēre"}, subj_pres = {"iam","iās","iat","iāmus","iātis","iant"}, subj_imp = {"īrem","īrēs","īret","īrēmus","īrētis","īrent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"iar","iāris","iātur","iāmur","iāminī","iantur", nil,"iāre"}, subj_imp_pas = {"īrer","īrēris","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēre"}, imper_pres = {nil,"ī",nil,nil,"īte",nil}, imper_fut = {nil,"ītō","ītō",nil,"ītōte","iuntō"}, imper_pres_pas = {nil,"īre",nil,nil,"īminī",nil}, imper_fut_pas = {nil,"ītor","ītor",nil,nil,"iuntor"}, } } local formas_no_personales = { inf_act = true, inf_pas = true, part_act = true, part_pas = true, ger = true, sup = true, } local formas_personales = { ind_pres = true, ind_imp = true, ind_perf = true, ind_pluperf = true, ind_fut = true, ind_fut_perf = true, ind_fut_sig = true, ind_pres_pas = true, ind_imp_pas = true, ind_fut_pas = true, subj_pres = true, subj_imp = true, subj_perf = true, subj_pluperf = true, subj_aor_sig = true, subj_pres_pas = true, subj_imp_pas = true, imper_pres = true, imper_fut = true, imper_pres_pas = true, imper_fut_pas = true, } local formas = merge(formas_no_personales, formas_personales) local verbos_irregulares = { {"aiō", {"aiō", "aiiō", "aijō", "ajō"}, { desactivar = {"inf_pas","part_pas","ger","sup","ind_pluperf","ind_fut","ind_fut_perf", "ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_perf","subj_pluperf","subj_pres_pas", "subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {"ai"}, nucleoperf = {"a"}, nucleosup = {}, nucleosigm = {}, inf_act = {"aiere"}, ind_pres = {nil,nil,nil,{}}, ind_perf = {{},nil,nil,{},{}}, subj_pres = {nil,nil,nil,{},{}}, subj_imp = {{},{},nil,{},{},{}}, imper_pres = {{},{"ai"},{},{},{},{}}, }}, {"cedo", {"cedo"}, { desactivar = {"inf_act","inf_pas","part_act","part_pas","ger","sup","ind_pluperf","ind_pres","ind_imp","ind_perf", "ind_fut","ind_fut_perf","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres","subj_imp","subj_perf", "subj_pluperf","subj_pres_pas","subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, imper_pres = {nil,{"cedo"},nil,nil,{"cette","cedile"},nil}, }}, {"dīcō", {"dīcō"}, { conj = "3", nucleopres = {"dīc"}, nucleoperf = {"dīx"}, nucleosup = {"dict"}, nucleosigm = {"dīx"}, desactivar = {}, imper_pres = {nil, {"dīc", "dīce"}}, inf_pas = {"dīcī", "dīcier{L}"}, }}, {"dō", {"dō"}, { conj = "1", nucleopres = {"d"}, nucleoperf = {"ded"}, nucleosup = {"dat"}, nucleosigm = {}, desactivar = {}, inf_act = {"dare","dedisse"}, inf_pas = {"darī"}, ind_pres = {nil,nil,nil,{"damus"},{"datis"},nil}, ind_imp = {{"dabam"},{"dabās"},{"dabat"},{"dabāmus"},{"dabātis"},{"dabant"}}, ind_fut = {{"dabō"},{"dabis"},{"dabit"},{"dabimus"},{"dabitis"},{"dabunt"}}, ind_imp_pas = {{"dabar"},{"dabāris","dabāre"},{"dabātur"},{"dabāmur"},{"dabāminī"},{"dabantur"}}, ind_fut_pas = {{"dabor"},{"daberis","dabere"},{"dabitur"},{"dabimur"},{"dabiminī"},{"dabuntur"}}, subj_imp = {{"darem"},{"darēs"},{"daret"},{"darēmus"},{"darētis"},{"darent"}}, subj_imp_pas = {{"darer"},{"darēris","darēre"},{"darētur"},{"darēmur"},{"darēminī"},{"darentur"}}, imper_pres = {nil,nil,nil,nil,{"date"},nil}, imper_fut = {nil,{"datō"},{"datō"},nil,{"datōte"},{"dantō"}}, imper_pres_pas = {nil,{"dare"},nil,nil,{"daminī"},nil}, imper_fut_pas = {nil,{"dator"},{"dator"},nil,nil,{"dator"}}, }}, {"dūcō", {"dūcō"}, { conj = "3", nucleopres = {"dūc"}, nucleoperf = {"dūx"}, nucleosup = {"duct"}, nucleosigm = {}, desactivar = {}, imper_pres = {nil, {"dūc", "dūce"}}, }}, {"edō", {"edō", "ëdō"}, { conj = "3", nucleopres = {"ed"}, nucleoperf = {"ed"}, nucleosup = {""}, nucleosigm = {}, desactivar = {}, inf_act = {"edere","ēsse"}, part_act = {"edēns","ēsūrus","ēssūrus","ēstūrus"}, part_pas = {"edendus","edundus","ēsus","ēssus","ēstus"}, sup = {"ēsum","ēssum","ēstum","ēsū","ēssū","ēstū"}, ind_pres = {nil,{"edis","ēs"},{"edit","ēst"},nil,{"editis","ēstis"},nil}, ind_pres_pas = {nil,{"ederis","edere","ēssis","ēsse"},{"editur","ēstur"}}, subj_pres = {{"edam","edim"},{"edās","edīs"},{"edat","edit","ēst"},{"edāmus","edīmus"},{"edātis","edītis"},{"edant","edint"}}, subj_imp = {{"ederem","ēssem"},{"ederēs","ēssēs"},{"ederet","ēsset"},{"ederēmus","ēssēmus"},{"ederētis","ēssētis"},{"ederent","ēssent"}}, subj_imp_pas = {{"ederer","ēsser"},{"ederēris","ederēre","ēssēris","ēssēre"},{"ederetur","ēssetur"},{"ederēmur","ēssēmur"},{"ederēminī","ēssēminī"},{"ederentur","ēssentur"}}, imper_pres = {nil,{"ede","ēs"},nil,nil,{"edite","ēste"},nil}, imper_fut = {nil,{"editō","ēstō"},{"editō","ēstō"},nil,{"editōte","ēstōte"},{"eduntō"}}, imper_pres_pas = {nil,{"edere","ēsse"},nil,nil,{"ediminī"},nil}, imper_fut_pas = {nil,{"editor","ēstor"},{"editor","ēstor"},nil,nil,{"eduntor"}}, }}, {"eō", {"eō", "ëō"}, { conj = "4", nucleopres = {""}, nucleoperf = {""}, nucleosup = {""}, nucleosigm = {}, desactivar = {"imper_pres_pas"}, inf_act = {"īre","īsse","iisse","īvisse"}, inf_pas = {"īrī","īrier"}, part_act = {"iēns","itūrus"}, part_pas = {"eundum","itum"}, ger = {"eundī","eundō","eundum"}, sup = {"itum","itū"}, ind_pres = {{"eō"},{"īs"},{"it"},{"īmus"},{"ītis"},{"eunt"}}, ind_imp = {{"ībam"},{"ībās"},{"ībat"},{"ībāmus"},{"ībātis"},{"ībant"}}, ind_perf = {{"iī","īvī"},{"īstī","iistī","īvistī"},{"iit","īvit"},{"iimus","īvimus"},{"īstis","iistis","īvistis"},{"iērunt","iēre","īvērunt","īvēre"}}, ind_pluperf = {{"ieram","īveram"},{"ierās","īverās"},{"ierat","īverat"},{"ierāmus","īverāmus"},{"ierātis","īverātis"},{"ierant","īverant"}}, ind_fut = {{"ībō"},{"ībis"},{"ībit"},{"ībimus"},{"ībitis"},{"ībunt"}}, ind_fut_perf = {{"ierō","īverō"},{"ieris","īveris"},{"ierit","īverit"},{"ierimus","īverimus"},{"ieritis","īveritis"},{"ierint","īverint"}}, ind_fut_sig = {nil,nil,nil,nil,nil,nil}, ind_pres_pas = {{},{},{"ītur"},{},{},{}}, ind_imp_pas = {{},{},{"ībātur"},{},{},{}}, ind_fut_pas = {{},{},{"ībitur"},{},{},{}}, subj_pres = {{"eam"},{"eās"},{"eat"},{"eāmus"},{"eātis"},{"eant"}}, subj_imp = {{"īrem"},{"īrēs"},{"īret"},{"īrēmus"},{"īrētis"},{"īrent"}}, subj_perf = {{"ierim","īverim"},{"ierīs","īverīs"},{"ierit","īverit"},{"ierīmus","īverīmus"},{"ierītis","īverītis"},{"ierint","īverint"}}, subj_pluperf = {{"īssem","iissem","īvissem"},{"īssēs","iissēs","īvissēs"},{"īsset","iisset","īvisset"},{"īssēmus","iissēmus","īvissēmus"},{"īssētis","iissētis","īvissētis"},{"īssent","iissent","īvissent"}}, subj_aor_sig = {nil,nil,nil,nil,nil,nil}, subj_pres_pas = {{},{},{"eātur"},{},{},{}}, subj_imp_pas = {{},{},{"īrētur"},{},{},{}}, imper_pres = {nil,nil,nil,nil,nil,nil}, imper_fut = {nil,nil,nil,nil,nil,{"euntō"}}, imper_fut_pas = {nil,{},nil,nil,nil,{}}, }}, {"faciō", {"faciō"}, { conj = "3", I = true, inf_act = {"facere", "fāre", "fēcisse"}, inf_pas = {"fierī"}, part_pas = {"faciendus", "faciundus", "factus"}, nucleopres = {"fac"}, nucleoperf = {"fēc"}, nucleosup = {"fact"}, nucleosigm = {"fax","faxs","facs"}, desactivar = {}, ind_pres_pas = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, ind_imp_pas = {{"fīēbam"},{"fīēbās"},{"fīēbat"},{"fīēbāmus"},{"fīēbātis"},{"fīēbant"}}, ind_fut_pas = {{"fīam"},{"fīēs"},{"fīet"},{"fīēmus"},{"fīētis"},{"fīent"}}, subj_pres_pas = {{"fīam"},{"fīās"},{"fīat"},{"fīāmus"},{"fīātis"},{"fīant"}}, subj_imp_pas = {{"fierem"},{"fierēs"},{"fieret"},{"fierēmus"},{"fierētis"},{"fierent"}}, imper_pres = {nil,{"fac","face"},nil,nil,nil,nil}, imper_pres_pas = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut_pas = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"ferō", {"ferō"}, { conj = "3", nucleopres = {"fer"}, nucleoperf = {"tul", "tetul{†}"}, nucleosup = {"lāt"}, nucleosigm = {}, desactivar = {}, inf_act = {"ferre", "tulisse", "tetulisse{†}"}, inf_pas = {"ferrī"}, ind_pres = {nil,{"fers"},{"fert"},nil,{"fertis"}}, ind_pres_pas = {nil,{"ferris","ferre"}}, subj_imp = {{"ferrem"},{"ferrēs"},{"ferret"},{"ferrēmus"},{"ferrētis"},{"ferrent"}}, subj_imp_pas = {{"ferrer"},{"ferrēris","ferrēre"},{"ferrētur"},{"ferrēmur"},{"ferrēminī"},{"ferrentur"}}, imper_pres = {nil,{"fer"},nil,nil,{"ferte"},nil}, imper_pres_pas = {nil,{"ferre"},nil,nil,nil,nil}, imper_fut = {nil,{"fertō"},{"fertō"},nil,{"fertōte"},{"feruntō"}}, imper_fut_pas = {nil,{"fertor"},{"fertor"},nil,nil,nil}, }}, {"fīō", {"fīō"}, { conj = "3", nucleopres = {"fī"}, nucleoperf = {}, nucleosup = {"fact"}, nucleosigm = {}, semidep = true, desactivar = {}, inf_pas = {"fierī"}, ind_pres = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, imper_pres = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"inquam", {"inquam"}, { conj = "3", nucleopres = {"inqui"}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, nopasivo = true, desactivar = {"inf_act","inf_pas","part_pas","ger"}, ind_pres = {{"inquam"}}, }}, {"possum", {"possum"}, { conj = "3", nucleopres = {"pot"}, nucleoperf = {"pot"}, nucleosup = {}, nucleosigm = {}, pres = "possō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"posse","potesse{†}"}, part_act = {"potēns"}, ind_pres = {{"possum"},{"potes"},{"potest"},{"possumus"},{"potestis"},{"possunt"}}, ind_imp = {{"poteram"},{"poterās"},{"poterat"},{"poterāmus"},{"poterātis"},{"poterant"}}, ind_fut = {{"poterō"},{"poteris","potere"},{"poterit"},{"poterimus"},{"poteritis"},{"poterunt"}}, ind_perf = {{"potuī"},{"potuistī"},{"potuit"},{"potuimus"},{"potuistis"},{"potuērunt","potuēre"}}, ind_pluperf = {{"potueram"},{"potuerās"},{"potuerat"},{"potuerāmus"},{"potuerātis"},{"potuerant"}}, ind_fut_perf = {{"potuerō"},{"potueris"},{"potuerit"},{"potuerimus"},{"potueritis"},{"potuerunt"}}, subj_pres = {{"possem"},{"possēs"},{"possēt"},{"possēmus"},{"possētis"},{"possent"}}, subj_imp = {{"possim"},{"possīs"},{"possit"},{"possīmus"},{"possītis"},{"possint"}}, subj_perf = {{"potuerim"},{"potuerīs"},{"potuerit"},{"potuerīmus"},{"potuerītis"},{"potuerint"}}, subj_pluperf = {{"potuissem"},{"potuissēs"},{"potuisset"},{"potuissēmus"},{"potuissētis"},{"potuissent"}}, }}, {"sum", {"sum"}, { conj = "3", nucleopres = {"s"}, nucleoperf = {"fu"}, nucleosup = {}, nucleosigm = {}, pres = "sō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres_pas","imper_fut_pas"}, inf_act = {"esse"}, part_act = {"futūrus"}, ind_pres = {{"sum"},{"es"},{"est"},{"sumus"},{"estis"},{"sunt"}}, ind_imp = {{"eram"},{"erās"},{"erat"},{"erāmus"},{"erātis"},{"erant"}}, ind_fut = {{"erō"},{"eris","ere"},{"erit"},{"erimus"},{"eritis"},{"erunt"}}, subj_pres = {{"sim","siem","fuam{†}"},{"sīs","siēs","fuās{†}"},{"sit","siet","fuat{†}"},{"sīmus","siēmus","fuāmus{†}"},{"sītis","siētis","fuātis{†}"},{"sint","sient","fuant{†}"}}, subj_imp = {{"essem","forem"},{"essēs","forēs"},{"esset","foret"},{"essēmus","forēmus"},{"essētis","forētis"},{"essent","forent"}}, imper_pres = {nil,{"es"},nil,nil,{"este"},nil}, imper_fut = {nil,{"estō"},{"estō"},nil,{"estōte"},nil}, }}, {"mālō", {"mālō"}, { conj = "3", nucleopres = {"māl"}, nucleoperf = {"mālu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"mālle","māluisse"}, ind_pres = {{"mālō"},{"māvīs"},{"māvult"},{"mālumus"},{"māvultis"},{"mālunt"}}, subj_pres = {{"mālim"},{"mālīs"},{"mālit"},{"mālīmus"},{"mālītis"},{"mālint"}}, subj_imp = {{"māllem"},{"māllēs"},{"māllet"},{"māllēmus"},{"māllētis"},{"māllent"}}, }}, {"nōlō", {"nōlō"}, { conj = "3", nucleopres = {"nōl"}, nucleoperf = {"nōlu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"nōlle","nōluisse"}, ind_pres = {{"nōlō"},{"nōn vīs","nevīs{†}"},{"nōn vult","nōn volt","nevolt{†}"},{"nōlumus"},{"nōn vultis","nōn voltis","nōltis{†}"},{"nōlunt"}}, subj_pres = {{"nōlim"},{"nōlīs"},{"nōlit"},{"nōlīmus"},{"nōlītis"},{"nōlint"}}, subj_imp = {{"nōllem"},{"nōllēs"},{"nōllet"},{"nōllēmus"},{"nōllētis"},{"nōllent"}}, }}, {"volō", {"volō"}, { conj = "3", nucleopres = {"vol"}, nucleoperf = {"volu"}, nucleosup = {"volit"}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"velle","voluisse"}, ind_pres = {{"volō"},{"vīs"},{"vult","volt{†}"},{"volumus"},{"vultis","voltis{†}"},{"volunt"}}, subj_pres = {{"velim","volim{†}"},{"velīs","volīs{†}"},{"velit","volit{†}"},{"velīmus","volīmus{†}"},{"velītis","volītis{†}"},{"velint","volint{†}"}}, subj_imp = {{"vellem"},{"vellēs"},{"vellet"},{"vellēmus"},{"vellētis"},{"vellent"}}, }}, } local function combinar_prefijo_nucleosufijo(prefijo, nucleosufijo) return prefijo..nucleosufijo end local function combinar_nucleo_sufijo(nucleo, sufijo, agregar_i) if agregar_i and (not find(sufijo, "^[iī]")) and (sufijo ~= "e") and (not find(sufijo, "^er")) then return nucleo.."~i~"..sufijo end return nucleo..sufijo end local function agregar_forma(conjugado, conjinfo, forma) conjinfo[forma] = conjinfo[forma] or {} local sufijos_ = sufijos[conjinfo.conj][forma] local nucleos local prefijo if forma == "sup" then nucleos = conjinfo.nucleosup prefijo = conjinfo.prefijosup or conjinfo.prefijo elseif find(forma, "sig") then nucleos = conjinfo.nucleosigm prefijo = conjinfo.prefijosigm or conjinfo.prefijo elseif find(forma, "perf") then nucleos = conjinfo.nucleoperf prefijo = conjinfo.prefijoperf or conjinfo.prefijo else nucleos = conjinfo.nucleopres prefijo = conjinfo.prefijo end if formas_no_personales[forma] then if conjinfo[forma][1] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma]) do insert_if_not(conjugado[forma], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else for _, sufijo in ipairs(sufijos_) do local nucleos_ = nucleos if forma == "inf_act" and sufijo == "isse" then nucleos_ = conjinfo.nucleoperf elseif forma == "part_act" and sufijo == "ūrus" then nucleos_ = conjinfo.nucleosup elseif forma == "part_pas" and sufijo == "us" then nucleos_ = conjinfo.nucleosup end local agregar_i = conjinfo.I and nucleos_ == conjinfo.nucleopres for _,nucleo in ipairs(nucleos_) do insert_if_not(conjugado[forma], combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(nucleo, sufijo, agregar_i))) end end end return end for i = EGO, EI do local p = tostr[i] if conjinfo[forma][i] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma][i]) do insert_if_not(conjugado[forma..p], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else local k = i while sufijos_[k] do local agregar_i = conjinfo.I and nucleos == conjinfo.nucleopres for j, n in ipairs(nucleos) do local x = combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(n, sufijos_[k], agregar_i)) if conjinfo.always_sync_perf and (forma == "ind_perf" or forma == "ind_pluperf" or forma == "ind_fut_perf" or forma == "subj_perf" or forma == "subj_pluperf") then x = x:gsub("īvī", "iī") x = x:gsub("īvi", "ī") x = x:gsub("īve", "ī") x = x:gsub("īvē", "ē") end insert_if_not(conjugado[forma..p], x) end k = k + 6 end end end end local function get_subtype_by_ending(pres, conjinfo, specs) for _, spec in ipairs(specs) do local base = extract_base(pres, spec[1]) if base then for _,s in ipairs(spec[2]) do if conjinfo[s] == nil then conjinfo[s] = true end end return base end end error("Unrecognized ending for conjugation " .. conjinfo["conj"]) end local function detect_v_type_and_subtypes(conjinfo) local pres = conjinfo["v"] local conj_arg = conjinfo["conj"] pres = toNFC(pres) local base_conj_arg, auto_perf_supine = conj_arg:match("^([124]/?4?)(%+%+?)$") if base_conj_arg then if auto_perf_supine == "++" and base_conj_arg ~= "4" then error("Conjugation types 1++ and 2++ not allowed") end conj_arg = base_conj_arg end conjinfo.conj = conj_arg if conj_arg == "1" then local base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"at", {"impers"}}, {"ātur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "āv" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "āt" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "āss" end end elseif conj_arg == "2" then local base = get_subtype_by_ending(pres, conjinfo, { {"eō", {}}, {"eor", {"dep"}}, {"et", {"impers"}}, {"ētur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "u" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "it" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3" then local base if conjinfo.I == false then -- si explícitamente se indicó que no es del tipo -io, hay que excluir sufijos base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) else base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) end if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end assert(conjinfo["nucleoperf"][1], "especifique todos los núcleos para verbos de la tercera conjugación") assert(conjinfo["nucleosup"][1], "especifique todos los núcleos para verbos de la tercera conjugación") if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3/4" then local base base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "4" then local base = get_subtype_by_ending(pres, conjinfo, { {"iō", {}}, {"ior", {"dep"}}, {"it", {"impers"}}, {"ītur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "irreg" then for _,p in ipairs(verbos_irregulares) do for _,rx in ipairs(p[2]) do local pref, verb = match(conjinfo.v, "^(.*)("..rx..")$") if verb then conjinfo.v = verb conjinfo.prefijo = pref if conjinfo.nucleoperf[1] and conjinfo.nucleoperf[1] ~= "-" then -- [[ecfero]] conjinfo.prefijoperf = conjinfo.nucleoperf[1] conjinfo.nucleoperf = {} end if conjinfo.nucleosup[1] and conjinfo.nucleosup[1] ~= "-" then conjinfo.prefijosup = conjinfo.nucleosup[1] conjinfo.nucleosup = {} end if conjinfo.nucleosigm[1] and conjinfo.nucleosigm[1] ~= "-" then conjinfo.prefijosigm = conjinfo.nucleosigm[1] conjinfo.nucleosigm = {} end conjinfo.irreg = true conjinfo.conj = p[3].conj for k,val in pairs(p[3]) do if not conjinfo[k] or (type(conjinfo[k]) == "table" and not conjinfo[k][1]) then conjinfo[k] = deep_copy(val) end end return conjinfo end end end error("Unrecognized conjugation '" .. conj_arg .. "'") else error("Unrecognized conjugation '" .. conj_arg .. "'") end return conjinfo end function export.v(frame) local title_ = mw.title.getCurrentTitle() local tit = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {alias_de = "conj"}, [2] = {alias_de = "pres"}, [3] = {alias_de = "nucleoperf"}, [4] = {alias_de = "nucleosup"}, [5] = {alias_de = "nucleosigm"}, ["impers"] = {}, -- pas para formas pasivas solamente ["impersonal"] = {alias_de = "impers"}, ["dep"] = {tipo="bool"}, ["depon"] = {alias_de="dep"}, ["deponente"] = {alias_de="dep"}, ["semidep"] = {tipo="bool"}, ["semidepon"] = {alias_de="semidep"}, ["semideponente"] = {alias_de="semidep"}, ["sigm"] = {tipo="bool"}, ["nopasivo"] = {tipo="bool"}, ["soloperf"] = {tipo="bool"}, ["I"] = {tipo="bool"}, ["p3inf"] = {tipo="bool"}, -- sin uso ["poet_sync_perf"] = {tipo="bool"}, -- sin uso ["always_sync_perf"] = {tipo="bool"}, -- solo en [[saevio]] ["conj"] = {requerido=true}, ["pres"] = {requerido=true}, ["nucleopres"] = {lista = true}, ["nucleoperf"] = {lista = true}, ["nucleosup"] = {lista = true}, ["nucleosigm"] = {lista = true}, ["núcleopres"] = {alias_de="nucleopres"}, ["núcleoperf"] = {alias_de="nucleoperf"}, ["núcleosup"] = {alias_de="nucleosup"}, ["paradigma"] = {lista = true}, ["desactivarnucleos"] = {tipo="bool", por_defecto=true}, -- para [[-o]] ["nota"] = {}, } local conjugado = {} for forma,_ in pairs(formas_no_personales) do params[forma] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma] = {} end for forma,_ in pairs(formas_personales) do for i,s in ipairs(tostr) do params[forma..s] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma..s] = {} if i == 1 then params[forma] = {alias_de=forma..s} end end end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) assert(not find(tit, " "), "locuciones no soportadas aún") assert(not (args["dep"] and args["semidep"]), "un verbo no puede ser deponente y semideponente a la vez") local conjinfo = { conj = args.conj, prefijo="", v=args.pres, desactivar = {}, dep=args.dep, semidep=args.semidep, sigm=args.sigm, impers=args.impers, nopasivo=args.nopasivo, soloperf=args.soloperf, I=args.I, p3inf=args.p3inf, poet_sync_perf=args.poet_sync_perf, -- sin uso always_sync_perf=args.always_sync_perf, nucleopres = deep_copy(args.nucleopres), nucleoperf = deep_copy(args.nucleoperf), nucleosup = deep_copy(args.nucleosup), nucleosigm = deep_copy(args.nucleosigm) } conjinfo = detect_v_type_and_subtypes(conjinfo) conjinfo.conj = conjinfo.conj if conjinfo.impers == true then conjinfo.impers = "3" end -- no puede ir conjinfo acá abajo porque si es un sufijo va a quedar "-" en la raíz, lo que anularía todas las formas conjugadas, tiene que venir directo de args if args.desactivarnucleos then if args.nucleopres[1] == "-" then conjinfo.nucleopres = {} end if args.nucleoperf[1] == "-" then conjinfo.nucleoperf = {} end if args.nucleosup[1] == "-" then conjinfo.nucleosup = {} end if args.nucleosigm[1] == "-" then conjinfo.nucleosigm = {} end end local es_irregular = conjinfo.irreg for _,d in ipairs(conjinfo.desactivar) do if formas_no_personales[d] then args[d] = {"no"} else args[d.."2"] = {"no"} end end for forma,_ in pairs(formas) do agregar_forma(conjugado, conjinfo, forma) end local resultante = sobreescribir_formas(conjugado, args) local mostrar_fut_sig = #resultante["ind_fut_sig1"] > 0 local mostrar_aor_sig = #resultante["subj_aor_sig1"] > 0 local defectivo = comprobar_defectivo(resultante, {"^imper", "_sig"}, tostr) local defect2 resultante, defect2 = desactivar_formas(resultante, function (form) return (conjinfo.nopasivo and form:find("_pas")) or (conjinfo.soloperf and not form:find("perf")) or (conjinfo.impers == "pas" and form:find("_pas[^3]")) or (conjinfo.impers == "pas3" and form:find("_pas[^3]")) or (conjinfo.impers == "pas36" and form:find("_pas[^36]")) end ) if defect2 then defectivo = true end -- por ahora innecesario -- local part_no_adj = {} -- for _,e in ipairs(resultante.part) do -- if (find(e, 'PART') or not find(e, 'ADJ')) and not find(e, "†") then -- insert(part_no_adj, gsub1(e, '%b{}', '')) -- end -- end local tit_pres = f(resultante["ind_pres1"][1] or "―") local tit_inf = f(resultante["inf_act"][1] or "―") local tit_perf = f(resultante["ind_perf1"][1] or "―") local tit_sup = f(resultante["sup"][1] or "―") resultante = agregar_enlaces(resultante, tit, normalizar_enlace) local es_impersonal = conjinfo.impers resultante = formatear_formas(resultante, function (x) return obtener_pronombre(x, es_impersonal) end) local impers = conjinfo.impers local cs, cs1, cs2, fila_pronombres_ind, fila_pronombres_subj, fila_pronombres_imper, mostrar_imper if impers == "3" then fila_pronombres_ind = {"", "(id)", color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", "(quod id)", color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", "(id)", color=COLOR_IMPER, header=true, class="pc"} cs = 2 elseif impers == "36" then error("no soportado actualmente") cs = 3 else fila_pronombres_ind = {"", PRONOMBRES[1], PRONOMBRES[2], PRONOMBRES[3], PRONOMBRES[4], PRONOMBRES[5], PRONOMBRES[6], color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", PRONOMBRES_SUBJ[1], PRONOMBRES_SUBJ[2], PRONOMBRES_SUBJ[3], PRONOMBRES_SUBJ[4], PRONOMBRES_SUBJ[5], PRONOMBRES_SUBJ[6], color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", PRONOMBRES_IMP[1], PRONOMBRES_IMP[2], PRONOMBRES_IMP[3], PRONOMBRES_IMP[4], PRONOMBRES_IMP[5], PRONOMBRES_IMP[6], color=COLOR_IMPER, header=true, class="pc"} cs = 7 mostrar_imper = true end cs1 = cs -- math.floor(cs / 2) -- cs2 = cs - cs1 local t = {} insert(t, {{"Formas no personales (verboides)", colspan=cs}, color=COLOR_H, header=true}) if impers == "3" then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else resultante.inf_act.colspan = cs1-1 resultante.inf_pas.colspan = cs1-1 resultante.part_act.colspan = cs1-1 resultante.part_pas.colspan = cs1-1 resultante.ger.colspan = cs1-1 resultante.sup.colspan = cs1-1 if not conjinfo.dep then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) end if not conjinfo.semidep then insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) end if not conjinfo.dep then insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) end if not conjinfo.semidep then insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) end insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) end local function ic(tiempo) if impers == "3" then return resultante[tiempo.."3"] elseif impers == "36" then return resultante[tiempo.."3"], resultante[tiempo.."6"] end return resultante[tiempo.."1"], resultante[tiempo.."2"], resultante[tiempo.."3"], resultante[tiempo.."4"], resultante[tiempo.."5"], resultante[tiempo.."6"] end insert(t, {{"Formas personales", colspan=cs}, color=COLOR_H, header=true}) insert(t, {{"Modo indicativo", colspan=cs}, color=COLOR_IND, header=true}) insert(t, fila_pronombres_ind) if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) end if not conjinfo.dep and not conjinfo.semidep then insert(t, {{"Pretérito perfecto", color=COLOR_IND, header=true}, ic("ind_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_IND, header=true}, ic("ind_pluperf")}) insert(t, {{"Futuro perfecto", color=COLOR_IND, header=true}, ic("ind_fut_perf")}) end if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) end insert(t, {{"Modo subjuntivo", colspan=cs}, color=COLOR_SUBJ, header=true}) insert(t, fila_pronombres_subj) if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) end if not conjinfo.dep and not conjinfo.semidep then insert(t, {{"Pretérito perfecto", color=COLOR_SUBJ, header=true}, ic("subj_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_SUBJ, header=true}, ic("subj_pluperf")}) end if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) end insert(t, {{"Modo imperativo", colspan=cs}, color=COLOR_IMPER, header=true}) insert(t, fila_pronombres_imper) if mostrar_imper then if not conjinfo.dep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) end if not conjinfo.semidep then insert(t, {{"Presente pasivo", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) end else insert(t, {{"Como verbo "..(impers == "3" and "impersonal" or "terciopersonal")..", ''"..tit.."'' CARECE de imperativo", color=COLOR_IMPER, header=true, colspan=cs}}) end insert(t, {{f("Leyenda: † arcaico, x no normativo, ~■~ cambio ortográfico, #■# irregularidad"), colspan=cs}}) args["nota"] = args["nota"] or "" if conjinfo.impers == "utc3" then args["nota"] = args["nota"].." NOTA: se usa también como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "umc3" then args["nota"] = args["nota"].." NOTA: se usa más como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "utc36" then args["nota"] = args["nota"].." NOTA: se usa también como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "umc36" then args["nota"] = args["nota"].." NOTA: se usa más como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "pas" or conjinfo.imeprs == "pas3" then args["nota"] = args["nota"].." NOTA: impersonal para las formas pasivas" end if conjinfo.impers == "pas36" then args["nota"] = args["nota"].." NOTA: formas pasivas terciopersonales (solamente tercera persona singular y plural)" end if conjinfo.soloperf then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas del perfecto y pluscuamperfecto con valor de presente, imperfecto o futuro" end if conjinfo.nopasivo then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas activas" end insert(t, {{args["nota"] and args["nota"] or "", colspan=cs}}) local cats = {} local subtits = {} local conj_str if conjinfo.conj == "1" then conj_str = "primera conjugación" elseif conjinfo.conj == "2" then conj_str = "segunda conjugación" elseif conjinfo.conj == "3" then conj_str = "tercera conjugación" elseif conjinfo.conj == "3/4" then conj_str = "tercera/cuarta conjugación" else conj_str = "cuarta conjugación" end insert(cats, "LA:Verbos de la "..conj_str) insert(subtits, conj_str) impers = impers or "" if impers == "3" or find(impers, "^u[tm]c3$") then insert(subtits, "impersonal") insert(cats, "LA:Verbos impersonales") end if defectivo then insert(subtits, "defectivo") insert(cats, "LA:Verbos defectivos") end if conjinfo.dep then insert(subtits, "deponente") insert(cats, "LA:Verbos deponentes") end if conjinfo.semidep then insert(subtits, "semideponente") insert(cats, "LA:Verbos semideponentes") end if es_irregular then insert(subtits, "irregular") insert(cats, "LA:Verbos irregulares") else insert(subtits, "regular") insert(cats, "LA:Verbos regulares") end return renderizar_tabla( frame, "'''Conjugación de ''"..tit_pres..", "..tit_inf..", "..tit_perf..", "..tit_sup.."'''''&emsp;&emsp;("..concat(subtits, ", ")..")", t, ns == 0 and cats or {}) end function export.adv(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { ["n"] = {}, ["nota"] = {alias_de = "n"}, ["comp"] = {lista = true}, ["comparativo"] = {alias_de = "comp"}, ["compnota"] = {lista = true}, ["sup"] = {lista = true}, ["superlativo"] = {alias_de = "sup"}, ["supnota"] = {lista = true}, } local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local head = args[1] local modo = args[2] local enc local cats = {} local cat_pref = "LA:Adverbios" if modo == "-" then enc = "sin comparativo ni superlativo" insert(cats, cat_pref.." incomparables") return renderizar_encabezado( frame, head, enc, args["n"], {}, ns == 0 and cats or {}, normalizar_enlace ) end local flex = {comp={},sup={}} local stem for _, suff in ipairs{"iter", "nter", "ter", "er", "iē", "ē", "rā", "im", "ō"} do stem = match(head, "^(.*)" .. suff .. "$") if stem ~= nil then local comp_suff, sup_suff = "ius", "issimē" if suff == "nter" then stem = stem .. "nt" end if suff == "rā" then comp_suff = "er" .. comp_suff sup_suff = "imē" end insert(flex.comp, stem .. comp_suff) insert(flex.sup, stem .. sup_suff) break end end if not stem and not args.comp[1] and not args.sup[1] then error("Unrecognized adverb type, recognized types are “-ē”, “-er”, “-ter”, “-iter”, “-im”, or “-ō”, “-ra” or specify irregular forms or “-” if incomparable.") end local formas, irr = sobreescribir_formas(flex, args) if args["comp"][1] == "no" then enc = "sin comparativo" insert(cats, cat_pref.." sin comparativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) elseif args["sup"][1] == "no" then enc = "sin superlativo" insert(cats, cat_pref.." sin superlativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end if irr then enc = f("#irregular#") insert(cats, cat_pref.." irregulares") end return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}, {"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end return export 3cj4pwa6m8gsorqph1hthkygaynhm6z 6123501 6123483 2026-07-25T01:01:31Z Tmagc 158167 6123501 Scribunto text/plain -- FLEXIÓN DEL LATÍN -- Adaptado desde en.wikt por Tmagc local export = {} local unpack = unpack or table.unpack local insert = table.insert local concat = table.concat local m_table = require("Módulo:tabla") local keys_to_list = m_table.keysToList local insert_if_not = m_table.insertIfNot local deep_copy = m_table.deepCopy local contains = m_table.contains local merge = m_table.merge local m_str = require("Módulo:string") local u = m_str.char local match = m_str.match local sub = m_str.sub local gsub = m_str.gsub local split = m_str.split local gsplit = m_str.gsplit local find = m_str.find local m_str_avanzado = require("Módulo:string/avanzado") local toNFD = m_str_avanzado.toNFD local toNFC = m_str_avanzado.toNFC local m_flex = require("Módulo:flex") local f = m_flex.f local f_links = m_flex.f_links local parsear_arreglo = m_flex.parsear_arreglo local separar_palabras = m_flex.separar_palabras local combinar_copulativa = m_flex.combinar_copulativa local sobreescribir_formas = m_flex.sobreescribir_formas local desactivar_formas = m_flex.desactivar_formas local agregar_enlaces = m_flex.agregar_enlaces local formatear_formas = m_flex.formatear_formas local comprobar_defectivo = m_flex.comprobar_defectivo local renderizar_tabla = m_flex.renderizar_tabla local renderizar_encabezado = m_flex.renderizar_encabezado local COLOR_H = m_flex.COLOR_H local COLOR_NP = m_flex.COLOR_NP local COLOR_IND = m_flex.COLOR_IND local COLOR_SUBJ = m_flex.COLOR_SUBJ local COLOR_IMPER = m_flex.COLOR_IMPER local MACRON = u(0x304) local BREVE = u(0x306) local DIAER = u(0x308) local DBREVE = u(0x361) local ACCENT = "[" .. MACRON .. BREVE .. DIAER .. DBREVE .. "]" local VOWEL = "[aæeioœuyAÆEIOŒUY]" local cons_to_vowel = { ["j"] = "i", ["J"] = "I", ["v"] = "u", ["V"] = "U", } local function normalizar_enlace(x) x = toNFD(x) x = gsub(x, ACCENT, "") return toNFC(x) end local function join(a, b) a, b = toNFD(a), toNFD(b) -- If the first part ends in "j" or "v", convert it to "i" or "u" unless -- the second part begins with a vowel. if not match(b, "^" .. VOWEL) then a = gsub(a, "[jvJV]$", cons_to_vowel) end return toNFC(a..b) end local function add_form(decl, slot, stem, suf) if type(slot) == "string" then slot = {slot} end for _,slt in ipairs(slot) do if type(decl[slt]) == "nil" or decl[slt] == "" then decl[slt] = {} elseif type(decl[slt]) == "string" then decl[slt] = {decl[slt]} end insert_if_not(decl[slt], join(stem, suf)) end end local function remove_forms(decl, forms) for form,_ in pairs(decl) do for _,rx in ipairs(forms) do if form:find(rx) then forms[form] = {} break end end end end local function merge_forms(forms, forms2, keys) keys = keys or forms2 for key,arr in pairs(keys) do if not forms[key] then forms[key] = {} end if type(forms2[key]) == "string" then insert_if_not(forms[key], forms2[key]) elseif type(forms2[key]) == "table" then for _,a in ipairs(forms2[key]) do insert_if_not(forms[key], a) end end end end local noun_decl = {} noun_decl["0"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = stem forms["dat_sg"] = stem forms["acc_sg"] = stem forms["abl_sg"] = stem forms["voc_sg"] = stem forms["nom_pl"] = stem forms["gen_pl"] = stem forms["dat_pl"] = stem forms["acc_pl"] = stem forms["abl_pl"] = stem forms["voc_pl"] = stem -- with locative if data.loc then forms["loc_sg"] = stem forms["loc_pl"] = stem end end local function alt_gen_pl_in_um(stem, forms, types, subtitles, i_stem) if types.genplum then add_form(forms, "gen_pl", stem, (i_stem and "i" or "") .. "um") elseif types.not_genplum then -- FIXME: not a contraction. -- insert_if_not(subtitles, "uncontracted genitive plural") end end noun_decl["1"] = function(data, args) local forms, types, loc, subtitles = data.forms, data.types, data.loc, data.subtitles local stem = args[1] -- normal 1st local nom_sg = "a" local gen_loc_sg = "ae" local dat_sg = "ae" local acc_sg = "am" local abl_sg = "ā" local voc_sg = "a" local nom_voc_pl = "ae" local gen_pl = "ārum" local dat_abl_loc_pl = "īs" local acc_pl = "ās" insert_if_not(data.title, "primera declinación") insert_if_not(data.categories, "LA:Sustantivos de la primera declinación") -- ām if types.am then nom_sg = "ām" acc_sg = "ām" abl_sg = {"ām", "ā"} voc_sg = "ām" -- all Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") --Greek Ma if types.Ma then nom_sg = "ās" acc_sg = "ān" voc_sg = "ā" -- Greek Me elseif types.Me then nom_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" -- Greek else nom_sg = "ē" gen_loc_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" end end -- ābus if types.abus then dat_abl_loc_pl = "ābus" end add_form(forms, "nom_sg", stem, nom_sg) add_form(forms, "gen_sg", stem, gen_loc_sg) add_form(forms, "dat_sg", stem, dat_sg) add_form(forms, "acc_sg", stem, acc_sg) add_form(forms, "abl_sg", stem, abl_sg) add_form(forms, "voc_sg", stem, voc_sg) add_form(forms, {"nom_pl", "voc_pl"}, stem, nom_voc_pl) add_form(forms, "gen_pl", stem, gen_pl) add_form(forms, {"dat_pl", "abl_pl"}, stem, dat_abl_loc_pl) add_form(forms, "acc_pl", stem, acc_pl) -- with locative if loc then add_form(forms, "loc_sg", stem, gen_loc_sg) add_form(forms, "loc_pl", stem, dat_abl_loc_pl) end end noun_decl["2"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "segunda declinación") insert_if_not(data.categories, "LA:Sustantivos de la segunda declinación") -- normal 2nd forms["nom_sg"] = stem1 .. "us" forms["gen_sg"] = stem1 .. "ī" forms["dat_sg"] = stem1 .. "ō" forms["acc_sg"] = stem1 .. "um" forms["abl_sg"] = stem1 .. "ō" forms["voc_sg"] = stem1 .. "e" forms["nom_pl"] = stem1 .. "ī" forms["gen_pl"] = stem1 .. "ōrum" forms["dat_pl"] = stem1 .. "īs" forms["acc_pl"] = stem1 .. "ōs" forms["abl_pl"] = stem1 .. "īs" forms["voc_pl"] = stem1 .. "ī" -- all neuter if types.N then forms["nom_sg"] = stem1 .. "um" forms["voc_sg"] = stem1 .. "um" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- neuter ium if types.ium then forms["nom_sg"] = stem1 .. "ium" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" forms["voc_sg"] = stem1 .. "ium" forms["nom_pl"] = stem1 .. "ia" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "ia" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "ia" -- neuter us, plural a elseif types.a then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- -vom (aevom, etc.) elseif types.vom then forms["nom_sg"] = stem1 .. "om" forms["acc_sg"] = stem1 .. "om" forms["voc_sg"] = stem1 .. "om" -- neuter Greek in -os (cētos) elseif types.Greek and types.us then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "os" forms["voc_sg"] = stem1 .. "os" forms["nom_pl"] = stem1 .. "ē" forms["gen_pl"] = stem1 .. "ōn" forms["acc_pl"] = stem1 .. "ē" forms["voc_pl"] = stem1 .. "ē" -- neuter Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "on" forms["acc_sg"] = stem1 .. "on" forms["voc_sg"] = stem1 .. "on" -- neuter us elseif types.us then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "ī" forms["acc_pl"] = stem1 .. "ōs" forms["voc_pl"] = stem1 .. "ī" end -- er elseif types.er then forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "ī" forms["dat_sg"] = stem2 .. "ō" forms["acc_sg"] = stem2 .. "um" forms["abl_sg"] = stem2 .. "ō" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ī" forms["gen_pl"] = stem2 .. "ōrum" forms["dat_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "ōs" forms["abl_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "ī" -- ius elseif types.ius then forms["nom_sg"] = stem1 .. "ius" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" if types.voci then -- Only for proper names and fīlius, genius forms["voc_sg"] = stem1 .. "ī" else forms["voc_sg"] = stem1 .. "ie" end forms["nom_pl"] = stem1 .. "iī" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "iōs" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "iī" -- -vos (servos, etc.) elseif types.vos then forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "om" -- Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "on" if data.num == "pl" then forms["nom_pl"] = stem1 .. "oe" forms["voc_pl"] = stem1 .. "oe" else forms["nom_pl"] = {stem1 .. "ī", stem1 .. "oe"} forms["voc_pl"] = {stem1 .. "ī", stem1 .. "oe"} end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- with -um genitive plural alt_gen_pl_in_um(stem2, forms, types, subtitles, types.ius or types.ium) -- with locative if data.loc then if types.ius or types.ium then forms["loc_sg"] = stem2 .. "iī" forms["loc_pl"] = stem2 .. "iīs" else forms["loc_sg"] = stem2 .. "ī" forms["loc_pl"] = stem2 .. "īs" end end end local acc_sg_i_stem_subtypes = { acc_im = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [abl -ī]; -- cannabis, senapis, sinapis [abl -e, -ī] acc_sg = {"im"}, title = {"accusative singular in ''-im''"}, }, acc_im_in = { -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [abl -ī]; -- Baetis, Tigris [acc -e, -ī] acc_sg = {"im", "in"}, title = {"accusative singular in ''-im'' or ''-in''"}, }, acc_im_in_em = { -- e.g. tigris, river Līris acc_sg = {"im", "in", "em"}, title = {"accusative singular in ''-im'', ''-in'' or ''-em''"}, }, acc_im_em = { acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or ''-em''"}, }, acc_im_occ_em = { -- febris, pelvis, puppis, restis, securis, turris [abl -ī, -e] acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or occasionally ''-em''"}, }, acc_em_im = { -- aqualis, clavis, lens, navis [abl -e, -ī]; -- cutis, restis [abl -e] acc_sg = {"em", "im"}, title = {"accusative singular in ''-em'' or ''-im''"}, }, } local abl_sg_i_stem_subtypes = { abl_i = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [acc -im]; -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [acc -im or -in]; -- canalis "water pipe", months in -is or -er, nouns originally i-stem adjectives such as aedilis, affinis, bipennis, familiaris, sodalis, volucris, etc. [acc -em] abl_sg = {"ī"}, title = {"ablative singular in ''-ī''"}, }, abl_i_e = { -- febris, pelvis, puppis, restis, securis, turris [acc -im, -em] abl_sg = {"ī", "e"}, title = {"ablative singular in ''-ī'' or ''-e''"}, }, abl_e_i = { -- cannabis, senapis, sinapis [acc -im]; -- Baetis, Tigris [acc -im, -in]; -- aqualis, clavis, lens, navis [acc -em, -im]; -- finis, mugilis, occiput, pugil, rus, supellex, vectis [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or ''-ī''"}, }, abl_e_occ_i = { -- amnis, anguis, avis, civis, classis, fustis, ignis, imber, orbis, pars, postis, sors, unguis, vesper [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or occasionally ''-ī''"}, }, } local function extract_stem(form, ending) local base = match(form, "^(.*)" .. ending .. "$") if not base then error("Form " .. form .. " should end in -" .. ending) end return base end local function count_vowels(stem) return select(2, toNFD(stem):gsub("[aeiouyAEIOUY]", "")) end noun_decl["3"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] -- local function non_i_stem_type() -- return (count_vowels(stem1) > count_vowels(stem2) and "parisyllabic" or "imparisyllabic") .. " non-i-stem" -- end insert_if_not(data.title, "tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") --normal 3rd forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "is" forms["dat_sg"] = stem2 .. "ī" forms["acc_sg"] = stem2 .. "em" forms["abl_sg"] = stem2 .. "e" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ēs" forms["gen_pl"] = stem2 .. "um" forms["dat_pl"] = stem2 .. "ibus" forms["acc_pl"] = stem2 .. "ēs" forms["abl_pl"] = stem2 .. "ibus" forms["voc_pl"] = stem2 .. "ēs" local acc_sg_i_stem_subtype = false local not_acc_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if acc_sg_i_stem_subtypes[subtype] then acc_sg_i_stem_subtype = true break end end for acc_sg_subtype, _ in pairs(acc_sg_i_stem_subtypes) do if types["not_" .. acc_sg_subtype] then not_acc_sg_i_stem_subtype = true break end end local abl_sg_i_stem_subtype = false local not_abl_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if abl_sg_i_stem_subtypes[subtype] then abl_sg_i_stem_subtype = true break end end for abl_sg_subtype, _ in pairs(abl_sg_i_stem_subtypes) do if types["not_" .. abl_sg_subtype] then not_abl_sg_i_stem_subtype = true break end end -- all Greek if types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") -- Greek er if types.er then stem1 = extract_stem(stem1, "ēr") forms["nom_sg"] = stem1 .. "ēr" forms["gen_sg"] = stem1 .. "eris" forms["dat_sg"] = stem1 .. "erī" forms["acc_sg"] = {stem1 .. "era", stem1 .. "erem"} forms["abl_sg"] = stem1 .. "ere" forms["voc_sg"] = stem1 .. "ēr" forms["nom_pl"] = stem1 .. "erēs" forms["gen_pl"] = stem1 .. "erum" forms["dat_pl"] = stem1 .. "eribus" forms["acc_pl"] = stem1 .. "erēs" forms["abl_pl"] = stem1 .. "eribus" forms["voc_pl"] = stem1 .. "erēs" -- Greek on elseif types.on then stem1 = extract_stem(stem1, "ōn") forms["nom_sg"] = stem1 .. "ōn" forms["gen_sg"] = {stem1 .. "ontis", stem1 .. "ontos"} forms["dat_sg"] = stem1 .. "ontī" forms["acc_sg"] = stem1 .. "onta" forms["abl_sg"] = stem1 .. "onte" forms["voc_sg"] = stem1 .. "ōn" forms["nom_pl"] = stem1 .. "ontēs" forms["gen_pl"] = {stem1 .. "ontum", stem1 .. "ontium"} forms["dat_pl"] = stem1 .. "ontibus" forms["acc_pl"] = {stem1 .. "ontēs", stem1 .. "ontās"} forms["abl_pl"] = stem1 .. "ontibus" forms["voc_pl"] = stem1 .. "ontēs" -- Greek i-stem elseif types.I then forms["gen_sg"] = {stem2 .. "is", stem2 .. "eōs", stem2 .. "ios"} forms["acc_sg"] = {stem2 .. "im", stem2 .. "in", stem2 .. "em{MED}"} forms["abl_sg"] = {stem2 .. "ī", stem2 .. "e{MED}"} forms["voc_sg"] = {stem2 .. "is", stem2 .. "i"} forms["nom_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["gen_pl"] = {stem2 .. "ium", stem2 .. "eōn"} forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["voc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} if types.poetic_esi then forms["dat_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} forms["abl_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} end -- normal Greek else forms["gen_sg"] = stem2 .. "os" if match(toNFD(stem2), "[yY]" .. ACCENT .. "*$") then forms["acc_sg"] = stem2 .. "n" else forms["acc_sg"] = stem2 .. "a" end forms["nom_pl"] = stem2 .. "es" forms["acc_pl"] = stem2 .. "as" forms["voc_pl"] = stem2 .. "es" if match(toNFD(stem1), "[iyIY]" .. ACCENT .. "*s$") then -- Per Hiley, words in -is and -ys have a poetic vocative -- without the -s, but otherwise the vocative is the same -- as the nominative. forms["voc_sg"] = {stem1, (stem1:gsub("s$", "")).."{L}"} end end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- polis if types.polis then stem1 = extract_stem(stem1, "polis") insert_if_not(data.title, "parcialmente griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "polis" forms["gen_sg"] = stem1 .. "polis" forms["dat_sg"] = stem1 .. "polī" forms["acc_sg"] = {stem1 .. "polim", stem1 .. "polin"} forms["abl_sg"] = stem1 .. "polī" forms["voc_sg"] = {stem1 .. "polis", stem1 .. "polī"} end -- all neuter if types.N then forms["acc_sg"] = stem1 -- neuter I stem if types.I then -- pure variety if types.pure then forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "ia" forms["gen_pl"] = stem2 .. "ium" forms["acc_pl"] = stem2 .. "ia" forms["voc_pl"] = stem2 .. "ia" -- non-pure variety (rare) else forms["nom_pl"] = stem2 .. "a" forms["gen_pl"] = {stem2 .. "ium", stem2 .. "um"} forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- normal neuter else forms["nom_pl"] = stem2 .. "a" forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- I stem elseif types.I or acc_sg_i_stem_subtype or abl_sg_i_stem_subtype then forms["gen_pl"] = stem2 .. "ium" -- Per Allen and Greenough, Hiley and others, the acc_pl in -īs -- applied originally to all i-stem nouns, and was current as an -- alternative form up through Caesar. forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "īs"} -- pure variety if types.pure then forms["acc_sg"] = stem2 .. "im" forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "īs" end local num = data.num for subtype, _ in pairs(types) do local acc_sg_i_stem_props = acc_sg_i_stem_subtypes[subtype] if acc_sg_i_stem_props then forms["acc_sg"] = {} for _, ending in ipairs(acc_sg_i_stem_props.acc_sg) do insert_if_not(forms["acc_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(acc_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end -- FIXME: needs to be done for neuter nouns as well. for subtype, _ in pairs(types) do local abl_sg_i_stem_props = abl_sg_i_stem_subtypes[subtype] if abl_sg_i_stem_props then forms["abl_sg"] = {} for _, ending in ipairs(abl_sg_i_stem_props.abl_sg) do insert_if_not(forms["abl_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(abl_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end end -- with locative if data.loc then -- As far as I can tell, in general both dative singular and -- ablative singular could be used for the third-declension locative, -- with different time periods preferring different forms. -- http://dcc.dickinson.edu/grammar/latin/3rd-declension-locative-case -- mentions rūrī along with either Carthāginī or Carthāgine. -- Wikipedia in https://en.wikipedia.org/wiki/Locative_case#Latin -- says this: -- -- In archaic times, the locative singular of third declension nouns -- was still interchangeable between ablative and dative forms, but in -- the Augustan Period the use of the ablative form became fixed. -- Therefore, both forms "rūrī" and "rūre" may be encountered. -- -- Lewis and Short confirm this. local loc_sg = forms["dat_sg"] if type(loc_sg) == "table" then loc_sg = deep_copy(loc_sg) else loc_sg = {loc_sg} end local abl_sg = forms["abl_sg"] if type(abl_sg) == "table" then for _, form in ipairs(abl_sg) do insert_if_not(loc_sg, deep_copy(form)) end else insert_if_not(loc_sg, abl_sg) end forms["loc_sg"] = loc_sg forms["loc_pl"] = deep_copy(forms["abl_pl"]) --The following is what we used to have, but I simply cannot believe it. --if types.Greek and not types.s then -- forms["loc_pl"] = stem2 .. "ēs" --end end end noun_decl["4"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "cuarta declinación") insert_if_not(data.categories, "LA:Sustantivos de la cuarta declinación") -- normal 4th forms["nom_sg"] = stem .. "us" forms["gen_sg"] = stem .. "ūs" forms["dat_sg"] = stem .. "uī" forms["acc_sg"] = stem .. "um" forms["abl_sg"] = stem .. "ū" forms["voc_sg"] = stem .. "us" forms["nom_pl"] = stem .. "ūs" forms["gen_pl"] = stem .. "uum" forms["dat_pl"] = stem .. "ibus" forms["acc_pl"] = stem .. "ūs" forms["abl_pl"] = stem .. "ibus" forms["voc_pl"] = stem .. "ūs" if types.echo then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end add_form(forms, "acc_sg", stem, "ōn") elseif types.Callisto then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end end -- neuter if types.N then forms["nom_sg"] = stem .. "ū̆{?}" forms["gen_sg"] = {stem .. "ūs{C}", stem .. "ū{S}"} forms["dat_sg"] = {stem .. "uī{C}", stem .. "ū{S}"} forms["acc_sg"] = stem .. "ū̆{?}" forms["voc_sg"] = stem .. "ū̆{?}" forms["nom_pl"] = stem .. "ua" forms["acc_pl"] = stem .. "ua" forms["voc_pl"] = stem .. "ua" end -- ubus if types.ubus then forms["dat_pl"] = stem .. "ubus" forms["abl_pl"] = stem .. "ubus" end -- with locative if data.loc then forms["loc_sg"] = forms["abl_sg"] forms["loc_pl"] = forms["abl_pl"] end end noun_decl["5"] = function(data, args) local forms, types = data.forms, data.types local stem = args[1] insert_if_not(data.title, "quinta declinación") insert_if_not(data.categories, "LA:Sustantivos de la quinta declinación") -- ies if types.i then stem = stem .. "i" end forms["nom_sg"] = stem .. "ēs" forms["gen_sg"] = stem .. "eī" forms["dat_sg"] = stem .. "eī" forms["acc_sg"] = stem .. "em" forms["abl_sg"] = stem .. "ē" forms["voc_sg"] = stem .. "ēs" forms["nom_pl"] = stem .. "ēs" forms["gen_pl"] = stem .. "ērum" forms["dat_pl"] = stem .. "ēbus" forms["acc_pl"] = stem .. "ēs" forms["abl_pl"] = stem .. "ēbus" forms["voc_pl"] = stem .. "ēs" -- ies if types.i then forms["gen_sg"] = stem .. "ēī" forms["dat_sg"] = stem .. "ēī" end --with locative if data.loc then forms["loc_sg"] = stem .. "ē" forms["loc_pl"] = stem .. "ēbus" end end noun_decl["sgpl"] = function(data, args) local forms = data.forms local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem1 forms["gen_sg"] = stem1 forms["dat_sg"] = stem1 forms["acc_sg"] = stem1 forms["abl_sg"] = stem1 forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 forms["gen_pl"] = stem2 forms["dat_pl"] = stem2 forms["acc_pl"] = stem2 forms["abl_pl"] = stem2 forms["voc_pl"] = stem2 -- with locative if data.loc then forms["loc_sg"] = stem1 forms["loc_pl"] = stem2 end end noun_decl["indecl"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = stem forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} -- with locative (for multiword terms) if data.loc then forms["loc_sg"] = {} forms["loc_pl"] = {} end data.num = "sg" end noun_decl["irreg"] = function(data, args) local forms, subtitles, notes = data.forms, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "irregular") insert_if_not(data.categories, "LA:Sustantivos irregulares") forms["nom_sg"] = {} forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = {} forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} if stem == "bōs" then data.decl = "3" local stem1, stem2 = "bōs", "bov" noun_decl["3"](data, {stem1, stem2}) add_form(forms, "abl_sg", stem2, "īd{†}") add_form(forms, "gen_pl", "bo", "um") add_form(forms, "gen_pl", stem2, "erum") add_form(forms, "dat_pl", "", "bōbus") add_form(forms, "dat_pl", "", "būbus") add_form(forms, "abl_pl", "", "bōbus") add_form(forms, "abl_pl", "", "būbus") elseif stem:match("^[dD]eus$") then data.decl = "2" local dD = stem:sub(1, 1) forms["nom_sg"] = dD .. "eus" forms["gen_sg"] = dD .. "eī" forms["dat_sg"] = dD .. "eō" forms["acc_sg"] = dD .. "eum" forms["abl_sg"] = dD .. "eō" forms["voc_sg"] = {dD .. "eus", dD .. "ee"} if stem == "deus" then forms["nom_pl"] = {"dī", "diī", "deī"} forms["gen_pl"] = {"deōrum", "deum"} forms["dat_pl"] = {"dīs", "diīs", "deīs"} forms["acc_pl"] = "deōs" forms["abl_pl"] = {"dīs", "diīs", "deīs"} forms["voc_pl"] = {"dī", "diī", "deī"} end elseif stem == "domus" then data.decl = "4,2" insert_if_not(data.title, "cuarta/segunda declinación") forms["nom_sg"] = "domus" forms["gen_sg"] = {"domūs", "domī"} forms["dat_sg"] = {"domuī", "domō", "domū"} forms["acc_sg"] = "domum" forms["abl_sg"] = {"domū", "domō"} forms["voc_sg"] = "domus" forms["loc_sg"] = "domī" forms["nom_pl"] = "domūs" forms["gen_pl"] = {"domuum", "domōrum"} forms["dat_pl"] = "domibus" forms["acc_pl"] = {"domūs", "domōs"} forms["abl_pl"] = "domibus" forms["voc_pl"] = "domūs" forms["loc_pl"] = {} data.loc = true elseif match(stem, "^[IÏJ]ēs[uū]" .. BREVE .. "?s$") then local ij = sub(stem, 1, 1) local uu = match(stem, "[uū]" .. BREVE .. "?") forms["nom_sg"] = stem forms["gen_sg"] = ij .. "ēsū" forms["dat_sg"] = ij .. "ēsū" forms["acc_sg"] = ij .. "ēs" .. uu .. "m" forms["abl_sg"] = ij .. "ēsū" forms["voc_sg"] = ij .. "ēsū" data.num = "sg" elseif stem == "Mōsēs" or stem == "Moesēs" or match(stem, "^M[oō]" .. BREVE .. "?[īȳ]sēs$") then local mos = sub(stem, 1, -3) forms["nom_sg"] = stem forms["gen_sg"] = {mos .. "ī", mos .. "ēī", mos .. "is", mos .. "ēn", mos .. "eōs"} forms["dat_sg"] = mos .. "ī" forms["acc_sg"] = {mos .. "ēn", mos .. "em"} forms["abl_sg"] = {mos .. "e", mos .. "ēn", mos .. "ī"} forms["voc_sg"] = {mos .. "ēs", mos .. "ē"} data.num = "sg" elseif stem:match("^[ij]ūgerum$") then data.decl = "2,3" local ij = stem:sub(1, 1) insert_if_not(data.title, "segunda/tercera declinación híbrido") forms["nom_sg"] = ij .. "ūgerum" forms["gen_sg"] = ij .. "ūgerī" forms["dat_sg"] = ij .. "ūgerō" forms["acc_sg"] = ij .. "ūgerum" forms["abl_sg"] = ij .. "ūgerō" forms["voc_sg"] = ij .. "ūgerum" forms["nom_pl"] = ij .. "ūgera" forms["gen_pl"] = ij .. "ūgerum" forms["dat_pl"] = ij .. "ūgeribus" forms["acc_pl"] = ij .. "ūgera" forms["abl_pl"] = {ij .. "ūgeribus", ij .. "ūgerīs{†}"} forms["voc_pl"] = ij .. "ūgera" elseif stem == "sūs" then data.decl = "3" forms["nom_sg"] = "sūs" forms["gen_sg"] = "suis" forms["dat_sg"] = "suī" forms["acc_sg"] = "suem" forms["abl_sg"] = "sue" forms["voc_sg"] = "sūs" forms["nom_pl"] = "suēs" forms["gen_pl"] = "suum" forms["dat_pl"] = {"suibus", "sūbus", "subus"} forms["acc_pl"] = "suēs" forms["abl_pl"] = {"suibus", "sūbus", "subus"} forms["voc_pl"] = "suēs" elseif stem == "ēthos" then data.decl = "3" insert_if_not(data.title, "tercera declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "ēthos" forms["gen_sg"] = "ētheos" forms["acc_sg"] = "ēthos" forms["voc_sg"] = "ēthos" forms["nom_pl"] = {"ēthea", "ēthē"} forms["dat_pl"] = {"ēthesi", "ēthesin"} forms["acc_pl"] = {"ēthea", "ēthē"} forms["abl_pl"] = {"ēthesi", "ēthesin"} forms["voc_pl"] = {"ēthea", "ēthē"} elseif stem == "Athōs" then data.decl = "2" insert_if_not(data.title, "segunda declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "Athōs" forms["gen_sg"] = "Athō" forms["dat_sg"] = "Athō" forms["acc_sg"] = {"Athō", "Athōn"} forms["abl_sg"] = "Athō" forms["voc_sg"] = "Athōs" data.num = "sg" elseif stem:match("^[uv]ēnum$") then data.decl = "4,2" local uv = stem:sub(1, 1) insert_if_not(data.title, "cuarta/segunda declinación, defectivo") forms["dat_sg"] = {uv .. "ēnuī", uv .. "ēnō"} forms["acc_sg"] = uv .. "ēnum" data.num = "sg" elseif stem:match("^[uv]īs$") then data.decl = "3" local uv = stem:sub(1, 1) insert_if_not(data.title, "defectivo") forms["nom_sg"] = uv .. "īs" forms["gen_sg"] = uv .. "īs" forms["dat_sg"] = uv .. "ī" forms["acc_sg"] = uv .. "im" forms["abl_sg"] = uv .. "ī" forms["voc_sg"] = uv .. "īs" forms["nom_pl"] = uv .. "īrēs" forms["gen_pl"] = uv .. "īrium" forms["dat_pl"] = uv .. "īribus" forms["acc_pl"] = {uv .. "īrēs", uv .. "īrīs"} forms["abl_pl"] = uv .. "īribus" forms["voc_pl"] = uv .. "īrēs" else error("Stem " .. stem .. " not recognized.") end end local adj_decl = {} adj_decl["0+"] = function(data, args) local forms, categories = data.forms, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = stem forms["gen_sg_m"] = stem forms["gen_pl_m"] = stem forms["dat_sg_m"] = stem forms["dat_pl_m"] = stem forms["acc_sg_m"] = stem forms["acc_pl_m"] = stem forms["abl_sg_m"] = stem forms["abl_pl_m"] = stem forms["voc_sg_m"] = stem forms["voc_pl_m"] = stem forms["loc_sg_m"] = stem forms["loc_pl_m"] = stem end adj_decl["1&2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera y segunda declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local original if types.er then local final2 = stem:sub(-2) if final2 == "er" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") elseif final2 == "ur" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") else error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem) end stem, original = args[2], stem end local us = "us" local a_sf = "a" local um = "um" local ae_gsf = "ae" local am = "am" local a_macron = "ā" local i_pl = stem .. "ī" if types.greekA or types.greekE then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") if types.greekA then us = "os" um = "on" am = "ān" else us = "os" a_sf = "ē" um = "on" ae_gsf = "ēs" am = "ēn" a_macron = "ē" end i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = original or (stem .. us) forms["nom_sg_f"] = stem .. a_sf forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_f"] = stem .. ae_gsf forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_f"] = stem .. "ae" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_f"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_f"] = stem .. am forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_f"] = stem .. a_macron forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_f"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = original or (stem .. "e") forms["voc_sg_f"] = stem .. a_sf forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" if types.ius then insert_if_not(data.title, "pronominal") --insert_if_not(subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''") forms["gen_sg_m"] = stem .. "ī̆us" forms["gen_sg_f"] = stem .. "ī̆us" forms["gen_sg_n"] = stem .. "ī̆us" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_f"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" elseif types.not_ius then insert_if_not(data.title, "no pronominal") --insert_if_not(subtitles, "with normal genitive and dative singular") end if stem == "me" then forms["voc_sg_m"] = "mī" end if types.ic then --insert_if_not(subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''") local oc = "oc" local oc_macron = "ōc" if stem == "ill" then oc = "uc" oc_macron = "ūc" end forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = stem .. oc forms["nom_pl_n"] = stem .. "aec" forms["gen_sg_m"] = stem .. "uius" forms["gen_sg_f"] = stem .. "uius" forms["gen_sg_n"] = stem .. "uius" forms["dat_sg_m"] = stem .. "uic" forms["dat_sg_f"] = stem .. "uic" forms["dat_sg_n"] = stem .. "uic" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = stem .. oc forms["acc_pl_n"] = stem .. "aec" forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. oc_macron forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} end if types.distr then if stem:sub(-1) == "n" then forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum{R}"} forms["gen_pl_f"] = {stem .. "um", stem .. "ārum{R}"} forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum{R}"} else error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem) end end forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["1-1+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") forms["nom_sg_m"] = stem .. "a" forms["nom_pl_m"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ae" forms["gen_pl_m"] = stem .. "ārum" forms["dat_sg_m"] = stem .. "ae" forms["dat_pl_m"] = stem .. "īs" forms["acc_sg_m"] = stem .. "am" forms["acc_sg_n"] = stem .. "a" forms["acc_pl_m"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ā" forms["abl_pl_m"] = stem .. "īs" forms["voc_sg_m"] = stem .. "a" forms["voc_pl_m"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["2-2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "segunda declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local us = "us" local um = "um" local i_pl = stem .. "ī" if types.greek then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") us = "os" um = "on" i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = stem .. us forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = stem .. "e" forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end local function abl_i_e(...) local function update_slot(forms, slot, f, do_copy) if not forms[slot] then return do_copy elseif do_copy then f = deep_copy(f) end forms[slot] = f return true end function abl_i_e(stem, forms, types) local f, do_copy if types["abl_e_i"] then f = {stem .. "e", stem .. "ī"} elseif types["abl_i_e"] then f = {stem .. "ī", stem .. "e"} else return end do_copy = update_slot(forms, "abl_sg_m", f, do_copy) do_copy = update_slot(forms, "abl_sg_f", f, do_copy) -- Neuter doesn't take -e with i-stems. if not types.I then update_slot(forms, "abl_sg_n", f, do_copy) end end return abl_i_e(...) end adj_decl["3-1+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) if types.par then forms["nom_pl_n"] = stem2 .. "a" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["abl_sg_m"] = stem2 .. "e" forms["abl_sg_n"] = stem2 .. "e" forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"} -- Really? forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"} -- Why does this happen? forms["acc_pl_n"] = stem2 .. "a" forms["voc_pl_n"] = stem2 .. "a" end local es_base = stem1:match("^(.-)ēs$") if es_base and es_base == stem2 then if types.greek then forms["nom_sg_n"] = {stem2 .. "ē̆s{?}"} forms["acc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_m"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["nom_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["acc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["voc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["abl_sg_m"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["abl_sg_n"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["gen_pl_m"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} forms["gen_pl_n"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Adjetivos griegos") elseif types.not_greek then insert_if_not(data.title, "no griego") end end end adj_decl["3-def+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, defectivo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = stem2 .. "ēs" forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" if types.tor then insert_if_not(data.title, "tercera declinación, solo en masculino") insert_if_not(categories, "LA:Adjetivos solo en masculino") remove_forms(forms, {"_f$", "_n$"}) forms["nom_sg_m"] = stem1 forms["gen_sg_m"] = stem2 .. "is" forms["dat_sg_m"] = stem2 .. "ī" forms["acc_sg_m"] = stem2 .. "em" forms["abl_sg_m"] = stem2 .. "e" forms["voc_sg_m"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["gen_pl_m"] = stem2 .. "um" forms["dat_pl_m"] = stem2 .. "ibus" forms["acc_pl_m"] = stem2 .. "ēs" forms["abl_pl_m"] = stem2 .. "ibus" forms["voc_pl_m"] = stem2 .. "ēs" end if types.trix then insert_if_not(data.title, "tercera declinación, solo en femenino o en neutro plural") insert_if_not(categories, "LA:Adjetivos solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en neutro") remove_forms(forms, {"_m$", "sg_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.trixf then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.idis then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = {stem2 .. "is", stem2 .. "os"} forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = {stem2 .. "em", stem2 .. "a"} forms["abl_sg_f"] = stem2 .. "e" forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} forms["gen_pl_f"] = stem2 .. "um" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = {stem2 .. "ēs", stem2 .. "as"} forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} end forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-C+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1 = args[1] local stem2 = stem1 .. "ōr" insert_if_not(data.title, "tercera declinación, comparativo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos comparativos") forms["nom_sg_m"] = stem1 .. "or" forms["nom_sg_n"] = stem1 .. "us" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "a" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 .. "us" forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} forms["acc_pl_n"] = stem2 .. "a" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 .. "or" forms["voc_sg_n"] = stem1 .. "us" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "a" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-P+"] = function(data, args) local forms, notes = data.forms, data.notes local stem2 = args[2] adj_decl["3-1+"](data, args) insert_if_not(data.title, "tercera declinación, participio") insert_if_not(data.categories, "LA:Adjetivos de la tercera declinación") forms["abl_sg_m"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["abl_sg_n"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} end adj_decl["3-2+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem = args[1] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem .. "is" forms["nom_sg_n"] = stem .. "e" forms["nom_pl_m"] = stem .. "ēs" forms["nom_pl_n"] = stem .. "ia" forms["gen_sg_m"] = stem .. "is" forms["gen_sg_n"] = stem .. "is" forms["gen_pl_m"] = stem .. "ium" forms["gen_pl_n"] = stem .. "ium" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" forms["dat_pl_m"] = stem .. "ibus" forms["dat_pl_n"] = stem .. "ibus" forms["acc_sg_m"] = stem .. "em" forms["acc_sg_n"] = stem .. "e" forms["acc_pl_m"] = {stem .. "īs", stem .. "ēs"} forms["acc_pl_n"] = stem .. "ia" forms["abl_sg_m"] = stem .. "ī" forms["abl_sg_n"] = stem .. "ī" forms["abl_pl_m"] = stem .. "ibus" forms["abl_pl_n"] = stem .. "ibus" -- abl_i_e(stem, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem .. "is" forms["voc_sg_n"] = stem .. "e" forms["voc_pl_m"] = stem .. "ēs" forms["voc_pl_n"] = stem .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-3+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con tres terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_f"] = stem2 .. "is" forms["nom_sg_n"] = stem2 .. "e" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_f"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_f"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_f"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_f"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_f"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_f"] = stem2 .. "em" forms["acc_sg_n"] = stem2 .. "e" forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_f"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_f"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_f"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" -- abl_i_e(stem2, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem1 forms["voc_sg_f"] = stem2 .. "is" forms["voc_sg_n"] = stem2 .. "e" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_f"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["indecl+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = {} forms["gen_sg_m"] = {} forms["gen_pl_m"] = {} forms["dat_sg_m"] = {} forms["dat_pl_m"] = {} forms["acc_sg_m"] = stem forms["acc_pl_m"] = {} forms["abl_sg_m"] = {} forms["abl_pl_m"] = {} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["irreg+"] = function(data,args) local forms, types, pos, notes, categories = data.forms, data.types, data.pos, data.notes, data.categories local arg1 = args[1] insert_if_not(data.title, "irregular") insert_if_not(categories, "LA:Adjetivos irregulares") if arg1 == "duo" or arg1 == "ambō" then local stem = sub(arg1, 1, -2) -- data.title = stem == "amb" and "irregular adjective" or "numeral" data.num = "pl" local stem_with_o = stem .. (stem == "amb" and "ō" or "o") forms["nom_pl_m"] = stem_with_o forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem_with_o forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_pl_m"] = stem .. "ōbus" forms["dat_pl_f"] = stem .. "ābus" forms["dat_pl_n"] = stem .. "ōbus" forms["acc_pl_m"] = {stem .. "ōs", stem_with_o} forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem_with_o forms["abl_pl_m"] = stem .. "ōbus" forms["abl_pl_f"] = stem .. "ābus" forms["abl_pl_n"] = stem .. "ōbus" forms["voc_pl_m"] = stem_with_o forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem_with_o if stem == "du" then forms["gen_pl_m"] = {forms["gen_pl_m"], "duum", "duom{†}"} forms["gen_pl_n"] = {forms["gen_pl_n"], "duum", "duom{†}"} end elseif arg1:sub(-6) == "mīlle" then insert_if_not(data.title, "numeral semiindeclinable") local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "le" forms["nom_pl_m"] = {stem .. "ia", stem .. "lia"} forms["gen_sg_m"] = stem .. "le" forms["gen_pl_m"] = {stem .. "ium", stem .. "lium"} forms["dat_sg_m"] = stem .. "le" forms["dat_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["acc_sg_m"] = stem .. "le" forms["acc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["abl_sg_m"] = stem .. "le" forms["abl_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["voc_sg_m"] = stem .. "le" forms["voc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) elseif arg1 == "ille" or arg1 == "iste" or arg1 == "ipse" or arg1 == "olle" then local stem = arg1:sub(1, -2) types.ius = true adj_decl["1&2+"](data, {stem}) insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) forms["nom_sg_m"] = arg1 if arg1 == "ipse" then add_form(forms, "nom_sg_n", stem, "ud{MED}") add_form(forms, "acc_sg_n", stem, "ud{MED}") else forms["nom_sg_n"] = stem .. "ud" forms["acc_sg_n"] = stem .. "ud" end forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} elseif arg1 == "illic" or arg1 == "istic" or arg1 == "isthic" then insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["gen_sg_m"] = stem .. "ī̆usce" forms["gen_sg_f"] = stem .. "ī̆usce" forms["gen_sg_n"] = stem .. "ī̆usce" forms["dat_sg_m"] = stem .. "īc" forms["dat_sg_f"] = stem .. "īc" forms["dat_sg_n"] = stem .. "īc" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. "ōc" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["nom_pl_m"] = stem .. "īsce" forms["nom_pl_f"] = stem .. "aec" forms["nom_pl_n"] = stem .. "aec" forms["gen_pl_m"] = stem .. "ōrunc{?}" forms["gen_pl_f"] = stem .. "ārunc{?}" forms["gen_ok_n"] = stem .. "ōrunc{?}" forms["dat_pl_m"] = stem .. "īsce" forms["dat_pl_f"] = stem .. "īsce" forms["dat_pl_n"] = stem .. "īsce" forms["acc_pl_m"] = stem .. "ōsce" forms["acc_pl_f"] = stem .. "āsce" forms["acc_pl_n"] = stem .. "aec" forms["abl_pl_m"] = stem .. "īsce" forms["abl_pl_f"] = stem .. "īsce" forms["abl_pl_n"] = stem .. "īsce" forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "hice" then insert_if_not(data.title, "demostrativo") -- .. " pronoun" forms["nom_sg_m"] = "hice" forms["nom_sg_f"] = "haece" forms["nom_sg_n"] = "hoce" forms["nom_pl_m"] = "hīce" forms["nom_pl_f"] = "haece" forms["nom_pl_n"] = "haece" forms["gen_sg_m"] = "huiusce" forms["gen_sg_f"] = "huiusce" forms["gen_sg_n"] = "huiusce" forms["gen_pl_m"] = {"hōrunce", "hōrumce"} forms["gen_pl_f"] = {"hārunce", "hārumce"} forms["gen_pl_n"] = {"hōrunce", "hōrumce"} forms["dat_sg_m"] = "huīce" forms["dat_sg_f"] = "huīce" forms["dat_sg_n"] = "huīce" forms["dat_pl_m"] = "hīsce" forms["dat_pl_f"] = "hīsce" forms["dat_pl_n"] = "hīsce" forms["acc_sg_m"] = "hunce" forms["acc_sg_f"] = "hance" forms["acc_sg_n"] = "hoce" forms["acc_pl_m"] = "hōsce" forms["acc_pl_f"] = "hāsce" forms["acc_pl_n"] = "haece" forms["abl_sg_m"] = "hōce" forms["abl_sg_f"] = "hāce" forms["abl_sg_n"] = "hōce" forms["abl_pl_m"] = "hīsce" forms["abl_pl_f"] = "hīsce" forms["abl_pl_n"] = "hīsce" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "plūs" then insert_if_not(data.title, "comparativo") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación con una terminación") data.note = "Ninguna de las formas en singular se usaron en latín clásico" forms["nom_sg_n"] = "plūs" forms["nom_pl_m"] = "plūrēs" forms["nom_pl_n"] = "plūra" forms["gen_sg_m"] = "plūris" forms["gen_sg_n"] = "plūris" forms["gen_pl_m"] = "plūrium" forms["gen_pl_n"] = "plūrium" forms["dat_sg_m"] = "plūrī" forms["dat_sg_n"] = "plūrī" forms["dat_pl_m"] = "plūribus" forms["dat_pl_n"] = "plūribus" forms["acc_sg_m"] = "plūrem" forms["acc_sg_f"] = "plūrem" forms["acc_sg_n"] = "plūs" forms["acc_pl_m"] = {"plūrēs", "plūrīs"} forms["acc_pl_n"] = "plūra" forms["abl_sg_m"] = {"plūrī", "plūre"} forms["abl_sg_f"] = {"plūrī", "plūre"} forms["abl_sg_n"] = {"plūrī", "plūre"} forms["abl_pl_m"] = "plūribus" forms["abl_pl_n"] = "plūribus" forms["voc_sg_n"] = "plūs" forms["voc_pl_m"] = "plūrēs" forms["voc_pl_n"] = "plūra" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif match(arg1, "^egō̆?$") or arg1 == "nōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "nōs" forms["gen_sg_m"] = "meī" forms["gen_pl_m"] = {"nostrī", "nostrum"} forms["dat_sg_m"] = "mihī̆" forms["dat_pl_m"] = "nōbīs" forms["acc_sg_m"] = {"mē", "mēmē"} forms["acc_pl_m"] = "nōs" forms["abl_sg_m"] = {"mē", "mēmē"} forms["abl_pl_m"] = "nōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "nōs" elseif arg1 == "tū" or arg1 == "vōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "vōs" forms["gen_sg_m"] = "tuī" forms["gen_pl_m"] = {"vestrī", "vestrum"} forms["dat_sg_m"] = "tibī̆" forms["dat_pl_m"] = "vōbīs" forms["acc_sg_m"] = {"tē", "tētē"} forms["acc_pl_m"] = "vōs" forms["abl_sg_m"] = {"tē", "tētē"} forms["abl_pl_m"] = "vōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "vōs" elseif arg1 == "suī" then insert_if_not(data.title, "pronombre reflexivo") forms["nom_sg_m"] = {} forms["nom_pl_m"] = {} forms["gen_sg_m"] = arg1 forms["gen_pl_m"] = forms["gen_sg_m"] forms["dat_sg_m"] = "sibī̆" forms["dat_pl_m"] = forms["dat_sg_m"] forms["acc_sg_m"] = {"sē", "sēsē"} forms["acc_pl_m"] = {"sē", "sēsē"} forms["abl_sg_m"] = {"sē", "sēsē"} forms["abl_pl_m"] = {"sē", "sēsē"} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} elseif arg1 == "is" or arg1 == "īdem" then insert_if_not(data.title, "pronombre demostrativo") forms["nom_sg_m"] = "is" forms["nom_sg_f"] = "ea" forms["nom_sg_n"] = "id" forms["nom_pl_m"] = {"iī", "eī", "ī"} forms["nom_pl_f"] = "eae" forms["nom_pl_n"] = "ea" forms["gen_sg_m"] = {"eius", "ejus"} forms["gen_sg_f"] = {"eius", "ejus"} forms["gen_sg_n"] = {"eius", "ejus"} forms["gen_pl_m"] = {"eōrum", "eum"} forms["gen_pl_f"] = "eārum" forms["gen_pl_n"] = {"eōrum", "eum"} forms["dat_sg_m"] = {"eī", "e͡i", "ēī"} forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"} forms["dat_sg_n"] = {"eī", "e͡i", "ēī"} forms["dat_pl_m"] = {"iīs", "eīs", "īs"} forms["dat_pl_f"] = {"iīs", "eīs", "īs", "eābus"} forms["dat_pl_n"] = {"iīs", "eīs", "īs"} forms["acc_sg_m"] = "eum" forms["acc_sg_f"] = "eam" forms["acc_sg_n"] = "id" forms["acc_pl_m"] = "eōs" forms["acc_pl_f"] = "eās" forms["acc_pl_n"] = "ea" forms["abl_sg_m"] = "eō" forms["abl_sg_f"] = "eā" forms["abl_sg_n"] = "eō" forms["abl_pl_m"] = {"iīs", "eīs", "īs"} forms["abl_pl_f"] = {"iīs", "eīs", "īs"} forms["abl_pl_n"] = {"iīs", "eīs", "īs"} if arg1 == "īdem" then forms["nom_sg_m"] = "ī" forms["nom_sg_n"] = "i" forms["acc_sg_n"] = "i" end elseif arg1 == "quis" or arg1 == "quī" then data.note = "La forma ''qua'' es preferida frente a ''quae'' cuando se usa como indefinido" local id = "id" if arg1 == "quī" then insert_if_not(data.title, "determinante relativo/interrogativo") id = "od" forms["nom_sg_m"] = {"quī", "quis", "quei{†}"} forms["nom_sg_f"] = {"quae", "qua"} forms["acc_sg_f"] = "quam" forms["abl_sg_m"] = "quō" forms["abl_sg_f"] = "quā" forms["abl_sg_n"] = "quō" else insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = {"quis", "quī"} forms["nom_sg_f"] = {"quae", "qua", "quis{†}"} forms["acc_sg_f"] = {"quam", "quem{†}"} forms["abl_sg_m"] = {"quō", "quī"} forms["abl_sg_f"] = {"quā", "quī"} forms["abl_sg_n"] = {"quō", "quī"} end forms["nom_sg_n"] = "qu"..id forms["nom_pl_m"] = {"quī", "quei{†}"} forms["nom_pl_f"] = "quae" forms["nom_pl_n"] = {"quae", "qua"} forms["gen_sg_m"] = {"cuius", "quoius{†}"} forms["gen_sg_f"] = {"cuius", "quoius{†}"} forms["gen_sg_n"] = {"cuius", "quoius{†}"} forms["gen_pl_m"] = "quōrum" forms["gen_pl_f"] = "quārum" forms["gen_pl_n"] = "quōrum" forms["dat_sg_m"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_f"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_n"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_n"] = {"quibus", "quīs", "queis{†}"} forms["acc_sg_m"] = "quem" forms["acc_sg_n"] = "qu"..id forms["acc_pl_m"] = "quōs" forms["acc_pl_f"] = "quās" forms["acc_pl_n"] = {"quae", "qua"} forms["abl_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_n"] = {"quibus", "quīs", "queis{†}"} elseif arg1 == "aliquī" then insert_if_not(data.title, "determinante indefinido") forms["nom_sg_m"] = {"aliquī{DET/ADJ}", "aliquis{PRON/SUST}"} forms["nom_sg_f"] = {"aliqua", "aliquae{R}"} forms["nom_sg_n"] = "aliquod" forms["nom_pl_m"] = "aliquī" forms["nom_pl_f"] = "aliquae" forms["nom_pl_n"] = "aliqua" forms["gen_sg_m"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_f"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_n"] = {"alicuius", "aliquoius{†}"} forms["gen_pl_m"] = "aliquōrum" forms["gen_pl_f"] = "aliquārum" forms["gen_pl_n"] = "aliquōrum" forms["dat_sg_m"] = {"alicui", "aliquoi{†}"} forms["dat_sg_f"] = {"alicui", "aliquoi{†}"} forms["dat_sg_n"] = {"alicui", "aliquoi{†}"} forms["dat_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["acc_sg_m"] = "aliquem" forms["acc_sg_f"] = "aliquam" forms["acc_sg_n"] = "aliquod" forms["acc_pl_m"] = "aliquōs" forms["acc_pl_f"] = "aliquās" forms["acc_pl_n"] = "aliqua" forms["abl_sg_m"] = "aliquō" forms["abl_sg_f"] = "aliquā" forms["abl_sg_n"] = "aliquō" forms["abl_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} elseif arg1 == "quisquam" then insert_if_not(data.title, "determinante indefinido, concordancia en negativo") data.note = "En latín clásico, era preferidas las formas de ''ūllus'' en lugar de las esta voz para el femenino y el neutro." forms["nom_sg_m"] = "quisquam" forms["nom_sg_f"] = {"quaequam", "quisquam{†}"} forms["nom_sg_n"] = "quodquam" forms["nom_pl_m"] = "quīquam" forms["nom_pl_f"] = "quaequam" forms["nom_pl_n"] = "quaequam" forms["gen_sg_m"] = "cuiusquam" forms["gen_sg_f"] = "cuiusquam" forms["gen_sg_n"] = "cuiusquam" forms["gen_pl_m"] = "quōrumquam" forms["gen_pl_f"] = "quārumquam" forms["gen_pl_n"] = "quōrumquam" forms["dat_sg_m"] = "cuiquam" forms["dat_sg_f"] = "cuiquam" forms["dat_sg_n"] = "cuiquam" forms["dat_pl_m"] = "quibusquam" forms["dat_pl_f"] = "quibusquam" forms["dat_pl_n"] = "quibusquam" forms["acc_sg_m"] = "quemquam" forms["acc_sg_f"] = {"quamquam", "quemquam{†}"} forms["acc_sg_n"] = "quodquam" forms["acc_pl_m"] = "quōsquam" forms["acc_pl_f"] = "quāsquam" forms["acc_pl_n"] = "quaequam" forms["abl_sg_m"] = {"quōquam", "quīquam{†}"} forms["abl_sg_f"] = "quāquam" forms["abl_sg_n"] = "quōquam" forms["abl_pl_m"] = "quibusquam" forms["abl_pl_f"] = "quibusquam" forms["abl_pl_n"] = "quibusquam" forms["voc_sg_m"] = "quisquam" forms["voc_sg_f"] = "quaequam" forms["voc_sg_n"] = "quodquam" forms["voc_pl_m"] = "quīquam" forms["voc_pl_f"] = "quaequam" forms["voc_pl_n"] = "quaequam" elseif arg1 == "quisquis" then insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = "quisquis" forms["nom_sg_f"] = "quisquis" forms["nom_sg_n"] = {"quidquid", "quicquid"} forms["nom_pl_m"] = "quīquī" forms["nom_pl_f"] = "quaequae" forms["nom_pl_n"] = "quaequae" forms["gen_sg_m"] = "cuiuscuius" forms["gen_sg_f"] = "cuiuscuius" forms["gen_sg_n"] = "cuiuscuius" forms["gen_pl_m"] = "quōrumquōrum" forms["gen_pl_f"] = "quārumquārum" forms["gen_pl_n"] = "quōrumquōrum" forms["dat_sg_m"] = "cuicui" forms["dat_sg_f"] = "cuicui" forms["dat_sg_n"] = "cuicui" forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"} forms["acc_sg_m"] = "quemquem" forms["acc_sg_f"] = "quamquam" forms["acc_sg_n"] = {"quidquid", "quicquid"} forms["acc_pl_m"] = "quōsquōs" forms["acc_pl_f"] = "quāsquās" forms["acc_pl_n"] = "quaequae" forms["abl_sg_m"] = "quōquō" forms["abl_sg_f"] = "quāquā" forms["abl_sg_n"] = "quōquō" forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"} forms["voc_sg_m"] = "quisquis" forms["voc_sg_f"] = "quisquis" forms["voc_sg_n"] = {"quidquid", "quicquid"} forms["voc_pl_m"] = "quīquī" forms["voc_pl_f"] = "quaequae" forms["voc_pl_n"] = "quaequae" elseif arg1 == "ecquis" then insert_if_not(data.title, "pronombre interrogativo") forms["nom_sg_m"] = {"ecquis", "ecquī"} forms["nom_sg_f"] = {"ecqua", "ecquae"} forms["nom_sg_n"] = "ecquid" forms["nom_pl_m"] = "ecquī" forms["nom_pl_f"] = "ecquae" forms["nom_pl_n"] = {"ecqua", "ecquae"} forms["gen_sg_m"] = "eccuius" forms["gen_sg_f"] = "eccuius" forms["gen_sg_n"] = "eccuius" forms["dat_sg_m"] = "eccui" forms["dat_sg_f"] = "eccui" forms["dat_sg_n"] = "eccui" forms["acc_sg_m"] = "ecquem" forms["acc_sg_f"] = "ecquam" forms["acc_sg_n"] = "ecquod" forms["acc_pl_m"] = "ecquōs" forms["acc_pl_f"] = "ecquās" forms["acc_pl_n"] = {"ecqua", "ecquae"} forms["abl_sg_m"] = {"ecquō", "ecquī"} forms["abl_sg_f"] = {"ecquā", "ecquī"} forms["abl_sg_n"] = {"ecquō", "ecquī"} elseif arg1 == "quīdam" then insert_if_not(data.title, "pronombre indefinido") forms["nom_sg_m"] = "quīdam" forms["nom_sg_f"] = "quaedam" forms["nom_sg_n"] = "quiddam" forms["nom_pl_m"] = {"quīdam", "quēsdam{†}"} forms["nom_pl_f"] = "quaedam" forms["nom_pl_n"] = "quaedam" forms["gen_sg_m"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_f"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_n"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_pl_m"] = {"quōrundam", "quōrumdam"} forms["gen_pl_f"] = {"quārundam", "quārumdam"} forms["gen_pl_n"] = {"quōrundam", "quōrumdam"} forms["dat_sg_m"] = {"cuidam", "quoidam{†}"} forms["dat_sg_f"] = {"cuidam", "quoidam{†}"} forms["dat_sg_n"] = {"cuidam", "quoidam{†}"} forms["dat_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_n"] = {"quibusdam", "quīsdam{†}"} forms["acc_sg_m"] = {"quendam", "quemdam"} forms["acc_sg_f"] = {"quandam", "quamdam"} forms["acc_sg_n"] = "quiddam" forms["acc_pl_m"] = {"quōsdam", "quēsdam{†}"} forms["acc_pl_f"] = "quāsdam" forms["acc_pl_n"] = "quaedam" forms["abl_sg_m"] = "quōdam" forms["abl_sg_f"] = "quādam" forms["abl_sg_n"] = "quōdam" forms["abl_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_n"] = {"quibusdam", "quīsdam{†}"} elseif arg1 == "nēmō" then insert_if_not(data.title, "Determinante y pronombre, concordancia en negativo") forms["nom_sg_m"] = "nēmō" forms["nom_sg_f"] = "nēmō" forms["gen_sg_m"] = {"nūllī̆us", "nēminis{R}"} forms["gen_sg_f"] = {"nūllī̆us", "nēminis{R}"} forms["dat_sg_m"] = "nēminī" forms["dat_sg_f"] = "nēminī" forms["acc_sg_m"] = "nēminem" forms["acc_sg_f"] = "nēminem" forms["abl_sg_m"] = {"nūllō", "nēmine{R}"} forms["abl_sg_f"] = {"nūllā", "nēmine{R}"} else error('adjective ' .. arg1 .. ' not recognized') end end local function extract_base(lemma, ending) if ending:find("(", nil, true) then return match(lemma, ending) end return match(lemma, "^(.*)" .. ending .. "$") end local function get_noun_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local subtypes = ending_and_subtypes[2] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. -- In addition, M or F as a subtype is canceled by N, and -- vice-versa, but M doesn't cancel F or vice-versa; instead, -- we simply ignore the conflicting gender specification when -- constructing the combination of specified and inferred subtypes. -- The reason for this is that neuters have distinct declensions -- from masculines and feminines, but masculines and feminines have -- the same declension, and various nouns in Latin that are -- normally masculine are exceptionally feminine and vice-versa -- (nauta, agricola, fraxinus, malus "apple tree", manus, rēs, -- etc.). -- -- In addition, sg as a subtype is canceled by pl and vice-versa. -- It's also possible to specify both, which will override sg but -- not cancel it (in the sense that it won't prevent the relevant -- rule from matching). For example, there's a rule specifying that -- lemmas beginning with a capital letter and ending in -ius take -- the ius.voci.sg subtypes. Specifying such a lemma with the -- subtype both will result in the ius.voci.both subtypes, whereas -- specifying such a lemma with the subtype pl will cause this rule -- not to match, and it will fall through to a less specific rule -- that returns just the ius subtype, which will be combined with -- the explicitly specified pl subtype to produce ius.pl. if specified_subtypes["-" .. subtype] or subtype == "N" and (specified_subtypes.M or specified_subtypes.F) or (subtype == "M" or subtype == "F") and specified_subtypes.N or subtype == "sg" and specified_subtypes.pl or subtype == "pl" and specified_subtypes.sg then not_this_subtype = true break end end end if not not_this_subtype then if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] local base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending == stem2 then return base, stem2, subtypes end else local base = extract_base(lemma, ending) if base then return base, stem2, subtypes end end end end if decltype then error("Unrecognized ending for declension-" .. decltype .. " noun: " .. lemma) end return lemma, stem2, keys_to_list(specified_subtypes) end local patterns = { {"[mM]a", "%0t"}, {"e", ""}, {"([aoAO])([lr])", "%1" .. MACRON .. "%2"}, {"[eE]l", "%0l"}, {"([mM])en", "%1in"}, {"([tT]ūd)ō", "%1in"}, {"([gG])ō", "%1in"}, {"[ōŌ]", "%1n"}, {"er", "r"}, {"[ēi]s", ""}, {"([āēīōūȳĀĒĪŌŪȲ]n)s", function(v) return (gsub(toNFD(v), MACRON, "") .. "t") end}, {"([cC])eps", "%1ipit"}, {"([bp])s", "%1"}, {"us", "or"}, {"s", "t"}, {"ex", "ic"}, {"x", "c"}, } local function make_stem2(stem) local n for _, pattern in ipairs(patterns) do local key = pattern[1] stem, n = gsub(stem, key .. "$", pattern[2]) if n > 0 then -- debug_track("la-utilities/" .. key) REVISAR return toNFC(stem) end end -- debug_track("la-utilities") REVISAR return stem end local function detect_noun_subtype(lemma, stem2, typ, subtypes) local base, _ if typ == "1" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ām", {"F", "am"}}, {"ās", {"M", "Greek", "Ma"}}, {"ēs", {"M", "Greek", "Me"}}, {"ē", {"F", "Greek"}}, {"ae", {"F", "pl"}}, {"a", {"F"}}, }) elseif typ == "2" then local detected_subtypes lemma, stem2, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(.*r)$", {"M", "er"}}, {"^(.*v)os$", {"M", "vos"}}, {"^(.*v)om$", {"N", "vom"}}, -- If the lemma ends in -os and the user said N or -M, then the -- following won't apply, and the second (neuter) -os will applly. {"os", {"M", "Greek"}}, {"os", {"N", "Greek", "us"}}, {"on", {"N", "Greek"}}, -- -ius beginning with a capital letter is assumed a proper name, -- and takes the voci subtype (vocative in -ī) along with the ius -- subtype and sg-only. Other nouns in -ius just take the ius -- subtype. Explicitly specify "sg" so that if .pl is given, -- this rule won't apply. {"^(%u.*)ius$", {"M", "ius", "voci", "sg"}}, {"ius", {"M", "ius"}}, {"ium", {"N", "ium"}}, -- If the lemma ends in -us and the user said N or -M, then the -- following won't apply, and the second (neuter) -us will applly. {"us", {"M"}}, {"us", {"N", "us"}}, {"um", {"N"}}, {"iī", {"M", "ius", "pl"}}, {"ia", {"N", "ium", "pl"}}, -- If the lemma ends in -ī and the user said N or -M, then the -- following won't apply, and the second (neuter) -ī will applly. {"ī", {"M", "pl"}}, {"ī", {"N", "us", "pl"}}, {"oe", {"M", "Greek", "pl"}}, {"a", {"N", "pl"}}, }) stem2 = stem2 or lemma return lemma, stem2, detected_subtypes elseif typ == "3" then if subtypes.pl then if subtypes.Greek then base = lemma:match("^(.*)erēs$") if base then return base .. "ēr", base .. "er", {"er"} end base = lemma:match("^(.*)ontēs$") if base then return base .. "ōn", base .. "ont", {"on"} end base = lemma:match("^(.*)es$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural Greek noun: " .. lemma) end base = lemma:match("^(.*)ia$") if base then return base, stem2 or base, {"N", "I", "pure"} end base = lemma:match("^(.*)a$") if base then return base, stem2 or base, {"N"} end base = lemma:match("^(.*)ēs$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural noun: " .. lemma) end stem2 = stem2 or make_stem2(lemma) local detected_subtypes if subtypes.Greek then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"is", ""}, {"I"}}, {"ēr", {"er"}}, {"ōn", {"on"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} end if not subtypes.N then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"^(%u.*pol)is$", ""}, {"F", "polis", "sg", "loc"}}, {{"tūdō", "tūdin"}, {"F"}}, {{"tās", "tāt"}, {"F"}}, {{"tūs", "tūt"}, {"F"}}, {{"tiō", "tiōn"}, {"F"}}, {{"siō", "siōn"}, {"F"}}, {{"xiō", "xiōn"}, {"F"}}, {{"gō", "gin"}, {"F"}}, {{"or", "ōr"}, {"M"}}, {{"tr[iī]x", "trīc"}, {"F"}}, {{"is", ""}, {"I"}}, {{"^(%l.*)ēs$", ""}, {"I"}}, }) if base then return lemma, stem2, detected_subtypes end end base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"us", "or"}, {"N"}}, {{"us", "er"}, {"N"}}, {{"ma", "mat"}, {"N"}}, {{"men", "min"}, {"N"}}, {{"^(%u.*)e$", ""}, {"N", "sg"}}, {{"e", ""}, {"N", "I", "pure"}}, {{"al", "āl"}, {"N", "I", "pure"}}, {{"ar", "ār"}, {"N", "I", "pure"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} elseif typ == "4" then if subtypes.echo or subtypes.Callisto then base = lemma:match("^(.*)ō$") if not base then error("Declension-4 noun of subtype .echo or .Callisto should end in -ō: " .. lemma) end if subtypes.Callisto then return base, nil, {"F", "sg"} else return base, nil, {"F"} end end return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", {"M"}}, {"ū̆", {"N"}}, {"ūs", {"M", "pl"}}, {"ua", {"N", "pl"}}, }) elseif typ == "5" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"iēs", {"F", "i"}}, {"iēs", {"F", "i", "pl"}}, {"ēs", {"F"}}, {"ēs", {"F", "pl"}}, }) elseif typ == "sgpl" then return lemma, stem2, {} elseif typ == "irreg" and lemma == "domus" then -- [[domus]] auto-sets data.loc = true, but we need to know this -- before declining the noun so we can propagate it to other segments. return lemma, nil, {"loc"} elseif typ == "indecl" or typ == "irreg" and ( lemma == "Deus" or match(lemma, "^[IJ]ēs[uū]s$") or lemma == "Athōs" or lemma == "vēnum" ) then -- Indeclinable nouns, and certain irregular nouns, set data.num = "sg", -- but we need to know this before declining the noun so we can -- propagate it to other segments. return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", {"both"}}, {"", {"sg"}}, {"", {"pl"}}, }) elseif typ == "indecl" or typ == "irreg" then return lemma, nil, {} else return nil, nil, {} end end -- Given ENDINGS_AND_SUBTYPES (a list of four-tuples of ENDING, RETTYPE, -- SUBTYPES, PROCESS_RETVAL), check each ENDING in turn against LEMMA and -- STEM2. If it matches, return a four-tuple BASE, STEM2, RETTYPE, NEW_SUBTYPES -- where BASE is normally the remainder of LEMMA minus the ending, STEM2 is -- as passed in, RETTYPE is as passed in, and NEW_SUBTYPES is the same as -- SUBTYPES minus any subtypes beginning with a hyphen. If no endings match, -- throw an error if DECLTYPPE is non-nil, mentioning the DECLTYPE -- (user-specified declension); but if DECLTYPE is nil, just return the tuple -- nil, nil, nil, nil. -- -- In order for a given entry to match, ENDING must match and also the subtypes -- in SUBTYPES (a list) must not be incompatible with the passed-in -- user-specified subtypes SPECIFIED_SUBTYPES (a set, i.e. a table where the -- keys are strings and the value is always true). "Incompatible" means that -- a given SUBTYPE is specified in either one and -SUBTYPE in the other, or -- that "pl" is found in SPECIFIED_SUBTYPES and not in SUBTYPES. -- -- The ending spec in ENDINGS_AND_SUBTYPES is one of the following: -- -- 1. A simple string, e.g. "tūdō", specifying an ending. -- 2. A regex that should match the entire lemma (it should be anchored at -- the beginning with ^ and at the end with $), and contains a single -- capturing group to match the base. -- 3. A pair {SIMPLE_STRING_OR_REGEX, STEM2_ENDING} where -- SIMPLE_STRING_OR_REGEX is one of the previous two possibilities and -- STEM2_ENDING is a string specifying the corresponding ending that must -- be present in STEM2. If this form is used, the combination of -- base + STEM2_ENDING must exactly match STEM2 in order for this entry -- to be considered a match. An example is {"is", ""}, which will match -- lemma == "follis", stem2 == "foll", but not lemma == "lapis", -- stem2 == "lapid". -- -- If PROCESS_STEM2 is given and the returned STEM2 would be nil, call -- process_stem2(BASE) to get the STEM2 to return. local function get_adj_type_and_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes, process_stem2) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local rettype = ending_and_subtypes[2] local subtypes = ending_and_subtypes[3] local process_retval = ending_and_subtypes[4] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. if specified_subtypes["-" .. subtype] then not_this_subtype = true break end -- A subtype is canceled if the user specified SUBTYPE and -- -SUBTYPE is given in the to-be-returned subtypes. local must_not_be_present = subtype:match("^%-(.*)$") if must_not_be_present and specified_subtypes[must_not_be_present] then not_this_subtype = true break end end end if not not_this_subtype then local base if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending ~= stem2 then base = nil end else base = extract_base(lemma, ending) end if base then -- Remove subtypes of the form -SUBTYPE from the subtypes -- to be returned. local new_subtypes = {} for _, subtype in ipairs(subtypes) do if subtype:sub(1, 1) ~= "-" then insert(new_subtypes, subtype) end end if process_retval then base, stem2 = process_retval(base, stem2) end if process_stem2 then stem2 = stem2 or process_stem2(base) end return base, stem2, rettype, new_subtypes end end end if not decltype then return lemma, stem2, nil, keys_to_list(specified_subtypes) elseif decltype == "" then error("Unrecognized ending for adjective: " .. lemma) else error("Unrecognized ending for declension-" .. decltype .. " adjective: " .. lemma) end end -- Autodetect the type and subtype of an adjective given all the information -- specified by the user: lemma, stem2, declension type and specified subtypes. -- Four values are returned: the lemma base (i.e. the stem of the lemma, as -- required by the declension functions), the value of stem2 to pass to the -- declension function, the declension type and the autodetected subtypes. -- Note that this will not detect a given subtype if -SUBTYPE is specified for -- any subtype that would be returned, or if SUBTYPE is specified and -SUBTYPE -- is among the subtypes that would be returned (such subtypes are filtered out -- of the returned subtypes). local function detect_adj_type_and_subtype(lemma, stem2, typ, subtypes) local function base_as_stem2(base, stem2) return base, base end local function constant_base(baseval) return function(base, stem2) return baseval, nil end end local function decl12_stem2(base) return base end local function decl3_stem2(base) return make_stem2(base) end local decl12_entries = { {"us", "1&2+", {}}, {"a", "1&2+", {}}, {"um", "1&2+", {}}, {"ī", "1&2+", {"pl"}}, {"ae", "1&2+", {"pl"}}, {"a", "1&2+", {"pl"}}, -- Nearly all -os adjectives are greekA {"os", "1&2+", {"greekA", "-greekE"}}, {"os", "1&2+", {"greekE", "-greekA"}}, {"ē", "1&2+", {"greekE", "-greekA"}}, {"on", "1&2+", {"greekA", "-greekE"}}, {"on", "1&2+", {"greekE", "-greekA"}}, {"^(.*er)$", "1&2+", {"er"}}, {"^(.*ur)$", "1&2+", {"er"}}, {"^(h)ic$", "1&2+", {"ic"}}, } local decl3_entries = { {"^(.*er)$", "3-3+", {"I"}}, {"^(.*er)$", "3-3+", {}}, {"is", "3-2+", {"I"}}, {"is", "3-2+", {}}, {"e", "3-2+", {"I"}}, {"e", "3-2+", {}}, {"^(.*[ij])or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(.*[ij])or$", "3-C+", {}}, {"^(min)or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(min)or$", "3-C+", {}}, {"^(.*trīx)$", "3-def+", {"trix", "abl_i_e", "-abl_e_i"}}, {"^(.*trīx)$", "3-def+", {"trix"}}, {"^(.*tor)$", "3-def+", {"tor", "abl_i_e", "-abl_e_i"}}, {"^(.*tor)$", "3-def+", {"tor"}}, -- Detect -ēs as 3-1 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like quadripēs, volucripēs). -- Essentially, for declension-3 adjectives, we require that -- .pl is given if the lemma is plural. -- -- Most 3-1 adjectives are i-stem (e.g. audāx) so we require -I -- to be given with non-i-stem adjectives. The first entry below -- will apply when -I isn't given, the second when it is given. {"^(.*ēs)$", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"I"}}, {"^(.*ēs)$", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"par"}}, {"^(.*[ij])ōrēs$", "3-C+", {"pl"}}, {"^(min)ōrēs$", "3-C+", {"pl"}}, -- If .pl with -ēs, we don't know if the adjective is 3-1, 3-2 -- or 3-3. Since 3-2 is probably the most common, we infer it -- (as well as the fact that these adjectives *are* in a sense -- 3-2 since they have a distinct neuter in -(i)a. Note that -- we have two entries here; the first one will apply unless -- -I is given, and will infer an i-stem adjective; the second -- one will apply otherwise (and infer a non-i-stem 3-1 adjective). {"ēs", "3-2+", {"pl", "I"}, base_as_stem2}, {"ēs", "3-1+", {"pl", "par"}, base_as_stem2}, -- Same for neuters. {"ia", "3-2+", {"pl", "I"}, base_as_stem2}, {"a", "3-1+", {"pl", "par"}, base_as_stem2}, -- As above for -ēs but for miscellaneous singulars. {"", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"I"}}, {"", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"par"}}, } local function get_subtypes_and_endings(typ, f) local subtypes_and_endings = {} for _, v in ipairs(decl3_entries) do if f(v) then v = deep_copy(v) v[2] = typ insert(subtypes_and_endings, v) end end return subtypes_and_endings end local function compare(spec) return spec[2] == typ end if typ == "+" then local base, new_stem2, rettype, new_subtypes = get_adj_type_and_subtype_by_ending(lemma, stem2, nil, subtypes, decl12_entries, decl12_stem2) if rettype then return base, new_stem2, rettype, new_subtypes else return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) end elseif typ == "3+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) elseif typ == "1&2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl12_entries, decl12_stem2) elseif typ == "1-1+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"a", typ, {}}, {"ae", typ, {"pl"}}, }) elseif typ == "2-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", typ, {}}, {"um", typ, {}}, {"ī", typ, {"pl"}}, {"a", typ, {"pl"}}, {"os", typ, {"greek"}}, {"on", typ, {"greek"}}, {"oe", typ, {"greek", "pl"}}, }) elseif typ == "3-1+" then -- Use the specs from `decl3_entries`, but add the two i-stem 3-2+ specs when plural-only, as they're the same when 3-1+. local subtypes_and_endings = get_subtypes_and_endings(typ, function(spec) local spec1, spec2 = spec[1], spec[2] return spec2 == typ or (spec2 == "3-2+" and spec1 == "ēs" or spec1 == "ia") end) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-def+" then -- Like 3-1+ but defective in gender local subtypes_and_endings = get_subtypes_and_endings(typ, compare) insert(subtypes_and_endings, {"", typ, {"I"}}) insert(subtypes_and_endings, {"", typ, {"par"}}) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"is", typ, {}}, {"e", typ, {}}, -- Detect -ēs as 3-2 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like isoscelēs). Essentially, -- for declension-3 adjectives, we require that .pl is given -- if the lemma is plural. {"ēs", typ, {}}, {"ēs", typ, {"pl"}}, {"ia", typ, {"pl"}}, }, decl3_stem2) elseif typ == "3-3+" or typ == "3-P+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ēs", typ, {"pl"}, base_as_stem2}, {"ia", typ, {"pl"}, base_as_stem2}, {"", typ, {}}, }, decl3_stem2) elseif typ == "3-C+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, get_subtypes_and_endings(typ, compare), decl3_stem2) elseif typ == "irreg+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(duo)$", typ, {"pl"}}, {"^(ambō)$", typ, {"pl"}}, {"^(mīll?ia)$", typ, {"N", "pl"}, constant_base("mīlle")}, -- match ea {"^(ea)$", typ, {}, constant_base("is")}, -- match id {"^(id)$", typ, {}, constant_base("is")}, -- match plural eī, iī {"^([ei]ī)$", typ, {"pl"}, constant_base("is")}, -- match plural ea, eae {"^(eae?)$", typ, {"pl"}, constant_base("is")}, -- match eadem {"^(eadem)$", typ, {}, constant_base("īdem")}, -- match īdem, idem {"^([īi]dem)$", typ, {}, constant_base("īdem")}, -- match plural īdem {"^(īdem)$", typ, {"pl"}}, -- match plural eadem, eaedem {"^(eae?dem)$", typ, {"pl"}, constant_base("īdem")}, -- match illa, ipsa, ista; it doesn't matter if we overmatch because -- we'll get an error as we use the stem itself in the returned base {"^(i[lps][lst])a$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match illud, istud; as above, it doesn't matter if we overmatch {"^(i[ls][lt])ud$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match ipsum {"^(ipsum)$", typ, {}, constant_base("ipse")}, -- match plural illī, ipsī, istī; as above, it doesn't matter if we -- overmatch {"^(i[lps][lst])ī$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- match plural illa, illae, ipsa, ipsae, ista, istae; as above, it -- doesn't matter if we overmatch {"^(i[lps][lst])ae?$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- Detect quī as non-plural unless .pl specified. {"^(quī)$", typ, {}}, -- Otherwise detect quī as plural. {"^(quī)$", typ, {"pl"}}, -- Same for quae. {"^(quae)$", typ, {}, constant_base("quī")}, {"^(quae)$", typ, {"pl"}, constant_base("quī")}, {"^(quid)$", typ, {}, constant_base("quis")}, {"^(quod)$", typ, {}, constant_base("quī")}, {"^(qui[cd]quid)$", typ, {}, constant_base("quisquis")}, {"^(quīquī)$", typ, {"pl"}, constant_base("quisquis")}, {"^(quaequae)$", typ, {"pl"}, constant_base("quisquis")}, -- match all remaining lemmas in lemma form {"", typ, {}}, }) elseif typ == "indecl+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", typ, {"both"}}, {"", typ, {"sg"}}, {"", typ, {"pl"}}, }) else -- 0+ return lemma, nil, typ, {} end end local noun_lb = { nom_sg = "sg.", gen_sg = "sg.", dat_sg = "sg.", acc_sg = "sg.", abl_sg = "sg.", voc_sg = "sg.", loc_sg = "sg.", nom_pl = "pl.", gen_pl = "pl.", dat_pl = "pl.", acc_pl = "pl.", abl_pl = "pl.", voc_pl = "pl.", loc_pl = "pl." } function export.sust(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de = "num"}, ["nota"] = {}, } for form,_ in pairs(noun_lb) do params[form] = {lista=true} end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local genero local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, detected_subtypes = detect_noun_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end if not genero then if types.M then genero = "m" end if types.N then genero = "n" end if types.F then genero = "f" end end local es_adj if not r1 and genero then local typ r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) if r1 then c = typ es_adj = true end end assert(r1, "forma no reconocida: "..r[1]) local cb = es_adj and adj_decl[c] or noun_decl[c] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) if es_adj then local forms_ = {} for form,arr in pairs(data.forms) do local f1, f2 = form:match("^(.*)(_"..genero..")$") if f1 then forms_[f1] = arr end end data.forms = forms_ end if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, noun_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if declinfo["loc_sg"] and #declinfo["loc_sg"] == 0 then declinfo["loc_sg"] = nil end if declinfo["loc_pl"] and #declinfo["loc_pl"] == 0 then declinfo["loc_pl"] = nil end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local forms = sobreescribir_formas(declinfo, args, false, {}) comprobar_defectivo(forms, {}) forms = desactivar_formas(forms, function (form) return (form:find("pl$") and nopl) or (form:find("sg$") and nosg) end ) local raiz_nom = f(forms["nom_sg"][1] or forms["nom_pl"][1] or "?") local raiz_gen = f(forms["gen_sg"][1] or forms["gen_pl"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, noun_lb) local t = {} insert(t, {{""}, {"Singular"}, {"Plural"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg"], forms["nom_pl"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg"], forms["gen_pl"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg"], forms["dat_pl"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg"], forms["acc_pl"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg"], forms["abl_pl"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg"], forms["voc_pl"]}) if (forms["loc_sg"] and forms["loc_sg"][1]) or (forms["loc_pl"] and forms["loc_pl"][1]) then insert(t, {{"Locativo", header=true, color=COLOR_H}, forms["loc_sg"], forms["loc_pl"]}) end insert(t, {{args["nota"] or "", colspan=3}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_nom..", "..raiz_gen.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local adj_lb = { nom_sg_m = "m.", nom_sg_n = "n.", nom_sg_f = "f.", nom_pl_m = "m.", nom_pl_n = "n.", nom_pl_f = "f.", gen_sg_m = "m.", gen_sg_n = "n.", gen_sg_f = "f.", gen_pl_m = "m.", gen_pl_n = "n.", gen_pl_f = "f.", dat_sg_m = "m.", dat_sg_n = "n.", dat_sg_f = "f.", dat_pl_m = "m.", dat_pl_n = "n.", dat_pl_f = "f.", acc_sg_m = "m.", acc_sg_n = "n.", acc_sg_f = "f.", acc_pl_m = "m.", acc_pl_n = "n.", acc_pl_f = "f.", abl_sg_m = "m.", abl_sg_n = "n.", abl_sg_f = "f.", abl_pl_m = "m.", abl_pl_n = "n.", abl_pl_f = "f.", voc_sg_m = "m.", voc_sg_n = "n.", voc_sg_f = "f.", voc_pl_m = "m.", voc_pl_n = "n.", voc_pl_f = "f.", } function export.adj(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de="num"}, ["gen"] = {por_defecto="mfn"}, ["nota"] = {}, } for form,_ in pairs(adj_lb) do params[form] = {lista=true} end params["dat_pl"] = {lista=true} params["abl_pl"] = {lista=true} params["loc_pl"] = {lista=true} local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) if args["dat_pl"][1] then args["dat_pl_m"] = deep_copy(args["dat_pl"]) args["dat_pl_n"] = deep_copy(args["dat_pl"]) args["dat_pl_f"] = deep_copy(args["dat_pl"]) end if args["abl_pl"][1] then args["abl_pl_m"] = deep_copy(args["abl_pl"]) args["abl_pl_n"] = deep_copy(args["abl_pl"]) args["abl_pl_f"] = deep_copy(args["abl_pl"]) end if args["loc_pl"][1] then args["loc_pl_m"] = deep_copy(args["loc_pl"]) args["loc_pl_n"] = deep_copy(args["loc_pl"]) args["loc_pl_f"] = deep_copy(args["loc_pl"]) end args["dat_pl"] = nil args["abl_pl"] = nil args["loc_pl"] = nil assert(not find(title, " "), "locuciones no soportadas aún") -- REVISAR local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") a = a or subarg b = b or "+" local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end local cb = adj_decl[typ] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) local formas_ = {} -- necesario crear otro arreglo para no modificar las claves durante la iteración for form,arr in pairs(data.forms) do local pref = match(form, "^(.*)_m$") if pref and not data.forms[pref.."_f"] then formas_[pref.."_f"] = deep_copy(arr) end if pref and not data.forms[pref.."_n"] then formas_[pref.."_n"] = deep_copy(arr) end formas_[form] = arr end data.forms = formas_ if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, adj_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local m = find(args["gen"], "m") local fem = find(args["gen"], "f") local n = find(args["gen"], "n") local forms = sobreescribir_formas(declinfo, args, false, {}, adj_lb) comprobar_defectivo(forms) forms = desactivar_formas(forms, function (form) return (form:find("pl") and nopl) or (form:find("sg") and nosg) or (form:find("m$") and not m) or (form:find("f$") and not fem) or (form:find("n$") and not n) end ) local raiz_m = f(forms["nom_sg_m"][1] or forms["nom_pl_m"][1] or "?") local raiz_f = f(forms["nom_sg_f"][1] or forms["nom_pl_f"][1] or "?") local raiz_n = f(forms["nom_sg_n"][1] or forms["nom_pl_n"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, adj_lb) local t = {} insert(t, {{"Singular", colspan=4}, header=true, color=COLOR_H}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg_m"], forms["nom_sg_f"], forms["nom_sg_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg_m"], forms["gen_sg_f"], forms["gen_sg_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg_m"], forms["dat_sg_f"], forms["dat_sg_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg_m"], forms["acc_sg_f"], forms["acc_sg_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg_m"], forms["abl_sg_f"], forms["abl_sg_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg_m"], forms["voc_sg_f"], forms["voc_sg_n"]}) insert(t, {{"Plural", colspan=4, header=true, color=COLOR_H}}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_pl_m"], forms["nom_pl_f"], forms["nom_pl_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_pl_m"], forms["gen_pl_f"], forms["gen_pl_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_pl_m"], forms["dat_pl_f"], forms["dat_pl_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_pl_m"], forms["acc_pl_f"], forms["acc_pl_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_pl_m"], forms["abl_pl_f"], forms["abl_pl_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_pl_m"], forms["voc_pl_f"], forms["voc_pl_n"]}) insert(t, {{args["nota"] or "", colspan=4}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_m..", "..raiz_f..", "..raiz_n.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local EGO, TU, IS, NOS, VOS, EI = 1, 2, 3, 4, 5, 6 local tostr = {"1", "2", "3", "4", "5", "6"} local PRONOMBRES = {"ego", "tū", "is, ea, id", "nōs", "vōs", "eī, eae, ea"} local PRONOMBRES_SUBJ = {"ut ego", "ut tū", "ut is, ut ea, ut id", "ut nōs", "ut vōs", "ut eī, ut eae, ut ea"} local PRONOMBRES_IMP = {"―", "(tū)", "(is, ea, id)", "―", "(vōs)", "(eī, eae, ea)"} local IMPERSONALES = {"", "", "(id)", "", "", ""} local function obtener_pronombre(forma, impers) local conj, p = match(forma, "^(.*)(%d)$") if not p then return nil end p = tonumber(p) if impers then return IMPERSONALES[p] else if find(conj, "^subj") then return PRONOMBRES_SUBJ[p] end if find(conj, "^imper") then return PRONOMBRES_IMP[p] end return PRONOMBRES[p] end end local sufijos = { ["1"] = { inf_act = {"āre","isse"}, inf_pas = {"ārī"}, part_act = {"āns","ūrus"}, part_pas = {"andus","us"}, ger = {"andī","andō","andum"}, sup = {"um","ū"}, ind_pres = {"ō","ās","at","āmus","ātis","ant"}, ind_imp = {"ābam","ābās","ābat","ābāmus","ābātis","ābant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ābō","ābis","ābit","ābimus","ābitis","ābunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","āris","ātur","āmur","āminī","antur", nil,"āre"}, ind_imp_pas = {"ābar","ābāris","ābātur","ābāmur","ābāminī","ābantur", nil,"ābāre"}, ind_fut_pas = {"ābor","āberis","ābitur","ābimur","ābiminī","ābuntur", nil,"ābere"}, subj_pres = {"em","ēs","et","ēmus","ētis","ent"}, subj_imp = {"ārem","ārēs","āret","ārēmus","ārētis","ārent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"er","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_imp_pas = {"ārer","ārēris","ārētur","ārēmur","ārēminī","ārentur", nil,"ārēre"}, imper_pres = {nil,"ā",nil,nil,"āte",nil}, imper_fut = {nil,"ātō","ātō",nil,"ātōte","antō"}, imper_pres_pas = {nil,"āre",nil,nil,"āminī",nil}, imper_fut_pas = {nil,"ātor","ātor",nil,nil,"antor"}, }, ["2"] = { inf_act = {"ēre","isse"}, inf_pas = {"ērī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"eō","ēs","et","ēmus","ētis","ent"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ēbō","ēbis","ēbit","ēbimus","ēbitis","ēbunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"eor","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ēbor","ēberis","ēbitur","ēbimur","ēbiminī","ēbuntur", nil,"ēbere"}, subj_pres = {"eam","eās","eat","eāmus","eātis","eant"}, subj_imp = {"ērem","ērēs","ēret","ērēmus","ērētis","ērent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ear","eāris","eātur","eāmur","eāminī","eantur", nil,"eāre"}, subj_imp_pas = {"ērer","ērēris","ērētur","ērēmur","ērēminī","ērentur", nil,"ērēre"}, imper_pres = {nil,"ē",nil,nil,"ēte",nil}, imper_fut = {nil,"ētō","ētō",nil,"ētōte","entō"}, imper_pres_pas = {nil,"ēre",nil,nil,"ēminī",nil}, imper_fut_pas = {nil,"ētor","ētor",nil,nil,"entor"}, }, ["3"] = { -- 3 (comparar [[capio]] con [[lego]], las raíces con capi- y leg- pero hay que eliminar la doble ii) inf_act = {"ere","isse"}, inf_pas = {"ī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", nil,"ere"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_pres = {"am","ās","at","āmus","ātis","ant"}, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", nil,"āre"}, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", nil,"erēre"}, imper_pres = {nil,"e",nil,nil,"ite",nil}, imper_fut = {nil,"itō","itō",nil,"itōte","untō"}, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil}, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor"}, }, ["3/4"] = { inf_act = {"ere","isse","īre","isse"}, inf_pas = {"ī","īrī"}, part_act = {"ēns","iēns","ūrus"}, part_pas = {"endus","iendus","us"}, ger = {"endī","endō","endum","iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt", "iō","īs",nil,"īmus","ītis","iunt" }, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant", "iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant" }, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent", "iam","iēs","iet","iēmus","iētis","ient" }, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", "ior","ere","ītur","īmur","īminī","iuntur", nil,"īris",nil,nil,nil,nil, nil,"īre" }, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", "iēbar","ēbāre","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāris",nil,nil,nil,nil, nil,"iēbāre" }, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", "iar","ēre","iētur","iēmur","iēminī","ientur", nil,"iēris",nil,nil,nil,nil, nil,"iēre" }, subj_pres = {"am","ās","at","āmus","ātis","ant", "iam","iās","iat","iāmus","iātis","iant", }, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent", "īrem","īrēs","īret","īrēmus","īrētis","īrent" }, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", "iar","āre","iātur","iāmur","iāminī","iantur", nil,"iāris",nil,nil,nil,nil, nil,"iāre" }, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", "īrer","erēre","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēris",nil,nil,nil,nil, nil,"īrēre" }, imper_pres = {nil,"e",nil,nil,"ite",nil, nil,"ī",nil,nil,"īte",nil }, imper_fut = {nil,"itō","itō",nil,"itōte","untō", nil,"ītō","ītō",nil,"ītōte","iuntō" }, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil, nil,"īre",nil,nil,"īminī",nil }, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor", nil,"ītor","ītor",nil,nil,"iuntor" }, }, ["4"] = { inf_act = {"īre","isse"}, inf_pas = {"īrī"}, part_act = {"iēns","ūrus"}, part_pas = {"iendus","us"}, ger = {"iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"iō","īs","it","īmus","ītis","iunt"}, ind_imp = {"iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"iam","iēs","iet","iēmus","iētis","ient"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"ior","īris","ītur","īmur","īminī","iuntur", nil,"īre"}, ind_imp_pas = {"iēbar","iēbāris","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāre"}, ind_fut_pas = {"iar","iēris","iētur","iēmur","iēminī","ientur", nil,"iēre"}, subj_pres = {"iam","iās","iat","iāmus","iātis","iant"}, subj_imp = {"īrem","īrēs","īret","īrēmus","īrētis","īrent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"iar","iāris","iātur","iāmur","iāminī","iantur", nil,"iāre"}, subj_imp_pas = {"īrer","īrēris","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēre"}, imper_pres = {nil,"ī",nil,nil,"īte",nil}, imper_fut = {nil,"ītō","ītō",nil,"ītōte","iuntō"}, imper_pres_pas = {nil,"īre",nil,nil,"īminī",nil}, imper_fut_pas = {nil,"ītor","ītor",nil,nil,"iuntor"}, } } local formas_no_personales = { inf_act = true, inf_pas = true, part_act = true, part_pas = true, ger = true, sup = true, } local formas_personales = { ind_pres = true, ind_imp = true, ind_perf = true, ind_pluperf = true, ind_fut = true, ind_fut_perf = true, ind_fut_sig = true, ind_pres_pas = true, ind_imp_pas = true, ind_fut_pas = true, subj_pres = true, subj_imp = true, subj_perf = true, subj_pluperf = true, subj_aor_sig = true, subj_pres_pas = true, subj_imp_pas = true, imper_pres = true, imper_fut = true, imper_pres_pas = true, imper_fut_pas = true, } local formas = merge(formas_no_personales, formas_personales) local verbos_irregulares = { {"aiō", {"aiō", "aiiō", "aijō", "ajō"}, { desactivar = {"inf_pas","part_pas","ger","sup","ind_pluperf","ind_fut","ind_fut_perf", "ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_perf","subj_pluperf","subj_pres_pas", "subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {"ai"}, nucleoperf = {"a"}, nucleosup = {}, nucleosigm = {}, inf_act = {"aiere"}, ind_pres = {nil,nil,nil,{}}, ind_perf = {{},nil,nil,{},{}}, subj_pres = {nil,nil,nil,{},{}}, subj_imp = {{},{},nil,{},{},{}}, imper_pres = {{},{"ai"},{},{},{},{}}, }}, {"cedo", {"cedo"}, { desactivar = {"inf_act","inf_pas","part_act","part_pas","ger","sup","ind_pluperf","ind_pres","ind_imp","ind_perf", "ind_fut","ind_fut_perf","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres","subj_imp","subj_perf", "subj_pluperf","subj_pres_pas","subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, imper_pres = {nil,{"cedo"},nil,nil,{"cette","cedile"},nil}, }}, {"dīcō", {"dīcō"}, { conj = "3", nucleopres = {"dīc"}, nucleoperf = {"dīx"}, nucleosup = {"dict"}, nucleosigm = {"dīx"}, desactivar = {}, imper_pres = {nil, {"dīc", "dīce"}}, inf_pas = {"dīcī", "dīcier{L}"}, }}, {"dō", {"dō"}, { conj = "1", nucleopres = {"d"}, nucleoperf = {"ded"}, nucleosup = {"dat"}, nucleosigm = {}, desactivar = {}, inf_act = {"dare","dedisse"}, inf_pas = {"darī"}, ind_pres = {nil,nil,nil,{"damus"},{"datis"},nil}, ind_imp = {{"dabam"},{"dabās"},{"dabat"},{"dabāmus"},{"dabātis"},{"dabant"}}, ind_fut = {{"dabō"},{"dabis"},{"dabit"},{"dabimus"},{"dabitis"},{"dabunt"}}, ind_imp_pas = {{"dabar"},{"dabāris","dabāre"},{"dabātur"},{"dabāmur"},{"dabāminī"},{"dabantur"}}, ind_fut_pas = {{"dabor"},{"daberis","dabere"},{"dabitur"},{"dabimur"},{"dabiminī"},{"dabuntur"}}, subj_imp = {{"darem"},{"darēs"},{"daret"},{"darēmus"},{"darētis"},{"darent"}}, subj_imp_pas = {{"darer"},{"darēris","darēre"},{"darētur"},{"darēmur"},{"darēminī"},{"darentur"}}, imper_pres = {nil,nil,nil,nil,{"date"},nil}, imper_fut = {nil,{"datō"},{"datō"},nil,{"datōte"},{"dantō"}}, imper_pres_pas = {nil,{"dare"},nil,nil,{"daminī"},nil}, imper_fut_pas = {nil,{"dator"},{"dator"},nil,nil,{"dator"}}, }}, {"dūcō", {"dūcō"}, { conj = "3", nucleopres = {"dūc"}, nucleoperf = {"dūx"}, nucleosup = {"duct"}, nucleosigm = {}, desactivar = {}, imper_pres = {nil, {"dūc", "dūce"}}, }}, {"edō", {"edō", "ëdō"}, { conj = "3", nucleopres = {"ed"}, nucleoperf = {"ed"}, nucleosup = {""}, nucleosigm = {}, desactivar = {}, inf_act = {"edere","ēsse"}, part_act = {"edēns","ēsūrus","ēssūrus","ēstūrus"}, part_pas = {"edendus","edundus","ēsus","ēssus","ēstus"}, sup = {"ēsum","ēssum","ēstum","ēsū","ēssū","ēstū"}, ind_pres = {nil,{"edis","ēs"},{"edit","ēst"},nil,{"editis","ēstis"},nil}, ind_pres_pas = {nil,{"ederis","edere","ēssis","ēsse"},{"editur","ēstur"}}, subj_pres = {{"edam","edim"},{"edās","edīs"},{"edat","edit","ēst"},{"edāmus","edīmus"},{"edātis","edītis"},{"edant","edint"}}, subj_imp = {{"ederem","ēssem"},{"ederēs","ēssēs"},{"ederet","ēsset"},{"ederēmus","ēssēmus"},{"ederētis","ēssētis"},{"ederent","ēssent"}}, subj_imp_pas = {{"ederer","ēsser"},{"ederēris","ederēre","ēssēris","ēssēre"},{"ederetur","ēssetur"},{"ederēmur","ēssēmur"},{"ederēminī","ēssēminī"},{"ederentur","ēssentur"}}, imper_pres = {nil,{"ede","ēs"},nil,nil,{"edite","ēste"},nil}, imper_fut = {nil,{"editō","ēstō"},{"editō","ēstō"},nil,{"editōte","ēstōte"},{"eduntō"}}, imper_pres_pas = {nil,{"edere","ēsse"},nil,nil,{"ediminī"},nil}, imper_fut_pas = {nil,{"editor","ēstor"},{"editor","ēstor"},nil,nil,{"eduntor"}}, }}, {"eō", {"eō", "ëō"}, { conj = "4", nucleopres = {""}, nucleoperf = {""}, nucleosup = {""}, nucleosigm = {}, desactivar = {"imper_pres_pas"}, inf_act = {"īre","īsse","iisse","īvisse"}, inf_pas = {"īrī","īrier"}, part_act = {"iēns","itūrus"}, part_pas = {"eundum","itum"}, ger = {"eundī","eundō","eundum"}, sup = {"itum","itū"}, ind_pres = {{"eō"},{"īs"},{"it"},{"īmus"},{"ītis"},{"eunt"}}, ind_imp = {{"ībam"},{"ībās"},{"ībat"},{"ībāmus"},{"ībātis"},{"ībant"}}, ind_perf = {{"iī","īvī"},{"īstī","iistī","īvistī"},{"iit","īvit"},{"iimus","īvimus"},{"īstis","iistis","īvistis"},{"iērunt","iēre","īvērunt","īvēre"}}, ind_pluperf = {{"ieram","īveram"},{"ierās","īverās"},{"ierat","īverat"},{"ierāmus","īverāmus"},{"ierātis","īverātis"},{"ierant","īverant"}}, ind_fut = {{"ībō"},{"ībis"},{"ībit"},{"ībimus"},{"ībitis"},{"ībunt"}}, ind_fut_perf = {{"ierō","īverō"},{"ieris","īveris"},{"ierit","īverit"},{"ierimus","īverimus"},{"ieritis","īveritis"},{"ierint","īverint"}}, ind_fut_sig = {nil,nil,nil,nil,nil,nil}, ind_pres_pas = {{},{},{"ītur"},{},{},{}}, ind_imp_pas = {{},{},{"ībātur"},{},{},{}}, ind_fut_pas = {{},{},{"ībitur"},{},{},{}}, subj_pres = {{"eam"},{"eās"},{"eat"},{"eāmus"},{"eātis"},{"eant"}}, subj_imp = {{"īrem"},{"īrēs"},{"īret"},{"īrēmus"},{"īrētis"},{"īrent"}}, subj_perf = {{"ierim","īverim"},{"ierīs","īverīs"},{"ierit","īverit"},{"ierīmus","īverīmus"},{"ierītis","īverītis"},{"ierint","īverint"}}, subj_pluperf = {{"īssem","iissem","īvissem"},{"īssēs","iissēs","īvissēs"},{"īsset","iisset","īvisset"},{"īssēmus","iissēmus","īvissēmus"},{"īssētis","iissētis","īvissētis"},{"īssent","iissent","īvissent"}}, subj_aor_sig = {nil,nil,nil,nil,nil,nil}, subj_pres_pas = {{},{},{"eātur"},{},{},{}}, subj_imp_pas = {{},{},{"īrētur"},{},{},{}}, imper_pres = {nil,nil,nil,nil,nil,nil}, imper_fut = {nil,nil,nil,nil,nil,{"euntō"}}, imper_fut_pas = {nil,{},nil,nil,nil,{}}, }}, {"faciō", {"faciō"}, { conj = "3", I = true, inf_act = {"facere", "fāre", "fēcisse"}, inf_pas = {"fierī"}, part_pas = {"faciendus", "faciundus", "factus"}, nucleopres = {"fac"}, nucleoperf = {"fēc"}, nucleosup = {"fact"}, nucleosigm = {"fax","faxs","facs"}, desactivar = {}, ind_pres_pas = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, ind_imp_pas = {{"fīēbam"},{"fīēbās"},{"fīēbat"},{"fīēbāmus"},{"fīēbātis"},{"fīēbant"}}, ind_fut_pas = {{"fīam"},{"fīēs"},{"fīet"},{"fīēmus"},{"fīētis"},{"fīent"}}, subj_pres_pas = {{"fīam"},{"fīās"},{"fīat"},{"fīāmus"},{"fīātis"},{"fīant"}}, subj_imp_pas = {{"fierem"},{"fierēs"},{"fieret"},{"fierēmus"},{"fierētis"},{"fierent"}}, imper_pres = {nil,{"fac","face"},nil,nil,nil,nil}, imper_pres_pas = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut_pas = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"ferō", {"ferō"}, { conj = "3", nucleopres = {"fer"}, nucleoperf = {"tul", "tetul{†}"}, nucleosup = {"lāt"}, nucleosigm = {}, desactivar = {}, inf_act = {"ferre", "tulisse", "tetulisse{†}"}, inf_pas = {"ferrī"}, ind_pres = {nil,{"fers"},{"fert"},nil,{"fertis"}}, ind_pres_pas = {nil,{"ferris","ferre"}}, subj_imp = {{"ferrem"},{"ferrēs"},{"ferret"},{"ferrēmus"},{"ferrētis"},{"ferrent"}}, subj_imp_pas = {{"ferrer"},{"ferrēris","ferrēre"},{"ferrētur"},{"ferrēmur"},{"ferrēminī"},{"ferrentur"}}, imper_pres = {nil,{"fer"},nil,nil,{"ferte"},nil}, imper_pres_pas = {nil,{"ferre"},nil,nil,nil,nil}, imper_fut = {nil,{"fertō"},{"fertō"},nil,{"fertōte"},{"feruntō"}}, imper_fut_pas = {nil,{"fertor"},{"fertor"},nil,nil,nil}, }}, {"fīō", {"fīō"}, { conj = "3", nucleopres = {"fī"}, nucleoperf = {}, nucleosup = {"fact"}, nucleosigm = {}, semidep = true, desactivar = {}, inf_pas = {"fierī"}, ind_pres = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, imper_pres = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"inquam", {"inquam"}, { conj = "3", nucleopres = {"inqui"}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, nopasivo = true, desactivar = {"inf_act","inf_pas","part_pas","ger"}, ind_pres = {{"inquam"}}, }}, {"possum", {"possum"}, { conj = "3", nucleopres = {"pot"}, nucleoperf = {"pot"}, nucleosup = {}, nucleosigm = {}, pres = "possō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"posse","potesse{†}"}, part_act = {"potēns"}, ind_pres = {{"possum"},{"potes"},{"potest"},{"possumus"},{"potestis"},{"possunt"}}, ind_imp = {{"poteram"},{"poterās"},{"poterat"},{"poterāmus"},{"poterātis"},{"poterant"}}, ind_fut = {{"poterō"},{"poteris","potere"},{"poterit"},{"poterimus"},{"poteritis"},{"poterunt"}}, ind_perf = {{"potuī"},{"potuistī"},{"potuit"},{"potuimus"},{"potuistis"},{"potuērunt","potuēre"}}, ind_pluperf = {{"potueram"},{"potuerās"},{"potuerat"},{"potuerāmus"},{"potuerātis"},{"potuerant"}}, ind_fut_perf = {{"potuerō"},{"potueris"},{"potuerit"},{"potuerimus"},{"potueritis"},{"potuerunt"}}, subj_pres = {{"possem"},{"possēs"},{"possēt"},{"possēmus"},{"possētis"},{"possent"}}, subj_imp = {{"possim"},{"possīs"},{"possit"},{"possīmus"},{"possītis"},{"possint"}}, subj_perf = {{"potuerim"},{"potuerīs"},{"potuerit"},{"potuerīmus"},{"potuerītis"},{"potuerint"}}, subj_pluperf = {{"potuissem"},{"potuissēs"},{"potuisset"},{"potuissēmus"},{"potuissētis"},{"potuissent"}}, }}, {"sum", {"sum"}, { conj = "3", nucleopres = {"s"}, nucleoperf = {"fu"}, nucleosup = {}, nucleosigm = {}, pres = "sō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres_pas","imper_fut_pas"}, inf_act = {"esse"}, part_act = {"futūrus"}, ind_pres = {{"sum"},{"es"},{"est"},{"sumus"},{"estis"},{"sunt"}}, ind_imp = {{"eram"},{"erās"},{"erat"},{"erāmus"},{"erātis"},{"erant"}}, ind_fut = {{"erō"},{"eris","ere"},{"erit"},{"erimus"},{"eritis"},{"erunt"}}, subj_pres = {{"sim","siem","fuam{†}"},{"sīs","siēs","fuās{†}"},{"sit","siet","fuat{†}"},{"sīmus","siēmus","fuāmus{†}"},{"sītis","siētis","fuātis{†}"},{"sint","sient","fuant{†}"}}, subj_imp = {{"essem","forem"},{"essēs","forēs"},{"esset","foret"},{"essēmus","forēmus"},{"essētis","forētis"},{"essent","forent"}}, imper_pres = {nil,{"es"},nil,nil,{"este"},nil}, imper_fut = {nil,{"estō"},{"estō"},nil,{"estōte"},nil}, }}, {"mālō", {"mālō"}, { conj = "3", nucleopres = {"māl"}, nucleoperf = {"mālu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"mālle","māluisse"}, ind_pres = {{"mālō"},{"māvīs"},{"māvult"},{"mālumus"},{"māvultis"},{"mālunt"}}, subj_pres = {{"mālim"},{"mālīs"},{"mālit"},{"mālīmus"},{"mālītis"},{"mālint"}}, subj_imp = {{"māllem"},{"māllēs"},{"māllet"},{"māllēmus"},{"māllētis"},{"māllent"}}, }}, {"nōlō", {"nōlō"}, { conj = "3", nucleopres = {"nōl"}, nucleoperf = {"nōlu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"nōlle","nōluisse"}, ind_pres = {{"nōlō"},{"nōn vīs","nevīs{†}"},{"nōn vult","nōn volt","nevolt{†}"},{"nōlumus"},{"nōn vultis","nōn voltis","nōltis{†}"},{"nōlunt"}}, subj_pres = {{"nōlim"},{"nōlīs"},{"nōlit"},{"nōlīmus"},{"nōlītis"},{"nōlint"}}, subj_imp = {{"nōllem"},{"nōllēs"},{"nōllet"},{"nōllēmus"},{"nōllētis"},{"nōllent"}}, }}, {"volō", {"volō"}, { conj = "3", nucleopres = {"vol"}, nucleoperf = {"volu"}, nucleosup = {"volit"}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"velle","voluisse"}, ind_pres = {{"volō"},{"vīs"},{"vult","volt{†}"},{"volumus"},{"vultis","voltis{†}"},{"volunt"}}, subj_pres = {{"velim","volim{†}"},{"velīs","volīs{†}"},{"velit","volit{†}"},{"velīmus","volīmus{†}"},{"velītis","volītis{†}"},{"velint","volint{†}"}}, subj_imp = {{"vellem"},{"vellēs"},{"vellet"},{"vellēmus"},{"vellētis"},{"vellent"}}, }}, } local function combinar_prefijo_nucleosufijo(prefijo, nucleosufijo) return prefijo..nucleosufijo end local function combinar_nucleo_sufijo(nucleo, sufijo, agregar_i) if agregar_i and (not find(sufijo, "^[iī]")) and (sufijo ~= "e") and (not find(sufijo, "^er")) then return nucleo.."~i~"..sufijo end return nucleo..sufijo end local function agregar_forma(conjugado, conjinfo, forma) conjinfo[forma] = conjinfo[forma] or {} local sufijos_ = sufijos[conjinfo.conj][forma] local nucleos local prefijo if forma == "sup" then nucleos = conjinfo.nucleosup prefijo = conjinfo.prefijosup or conjinfo.prefijo elseif find(forma, "sig") then nucleos = conjinfo.nucleosigm prefijo = conjinfo.prefijosigm or conjinfo.prefijo elseif find(forma, "perf") then nucleos = conjinfo.nucleoperf prefijo = conjinfo.prefijoperf or conjinfo.prefijo else nucleos = conjinfo.nucleopres prefijo = conjinfo.prefijo end if formas_no_personales[forma] then if conjinfo[forma][1] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma]) do insert_if_not(conjugado[forma], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else for _, sufijo in ipairs(sufijos_) do local nucleos_ = nucleos if forma == "inf_act" and sufijo == "isse" then nucleos_ = conjinfo.nucleoperf elseif forma == "part_act" and sufijo == "ūrus" then nucleos_ = conjinfo.nucleosup elseif forma == "part_pas" and sufijo == "us" then nucleos_ = conjinfo.nucleosup end local agregar_i = conjinfo.I and nucleos_ == conjinfo.nucleopres for _,nucleo in ipairs(nucleos_) do insert_if_not(conjugado[forma], combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(nucleo, sufijo, agregar_i))) end end end return end for i = EGO, EI do local p = tostr[i] if conjinfo[forma][i] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma][i]) do insert_if_not(conjugado[forma..p], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else local k = i while sufijos_[k] do local agregar_i = conjinfo.I and nucleos == conjinfo.nucleopres for j, n in ipairs(nucleos) do local x = combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(n, sufijos_[k], agregar_i)) if conjinfo.always_sync_perf and (forma == "ind_perf" or forma == "ind_pluperf" or forma == "ind_fut_perf" or forma == "subj_perf" or forma == "subj_pluperf") then x = x:gsub("īvī", "iī") x = x:gsub("īvi", "ī") x = x:gsub("īve", "ī") x = x:gsub("īvē", "ē") end insert_if_not(conjugado[forma..p], x) end k = k + 6 end end end end local function get_subtype_by_ending(pres, conjinfo, specs) for _, spec in ipairs(specs) do local base = extract_base(pres, spec[1]) if base then for _,s in ipairs(spec[2]) do if conjinfo[s] == nil then conjinfo[s] = true end end return base end end error("Unrecognized ending for conjugation " .. conjinfo["conj"]) end local function detect_v_type_and_subtypes(conjinfo) local pres = conjinfo["v"] local conj_arg = conjinfo["conj"] pres = toNFC(pres) local base_conj_arg, auto_perf_supine = conj_arg:match("^([124]/?4?)(%+%+?)$") if base_conj_arg then if auto_perf_supine == "++" and base_conj_arg ~= "4" then error("Conjugation types 1++ and 2++ not allowed") end conj_arg = base_conj_arg end conjinfo.conj = conj_arg if conj_arg == "1" then local base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"at", {"impers"}}, {"ātur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "āv" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "āt" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "āss" end end elseif conj_arg == "2" then local base = get_subtype_by_ending(pres, conjinfo, { {"eō", {}}, {"eor", {"dep"}}, {"et", {"impers"}}, {"ētur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "u" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "it" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3" then local base if conjinfo.I == false then -- si explícitamente se indicó que no es del tipo -io, hay que excluir sufijos base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) else base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) end if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end assert(conjinfo["nucleoperf"][1], "especifique todos los núcleos para verbos de la tercera conjugación") assert(conjinfo["nucleosup"][1], "especifique todos los núcleos para verbos de la tercera conjugación") if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3/4" then local base base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "4" then local base = get_subtype_by_ending(pres, conjinfo, { {"iō", {}}, {"ior", {"dep"}}, {"it", {"impers"}}, {"ītur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "irreg" then for _,p in ipairs(verbos_irregulares) do for _,rx in ipairs(p[2]) do local pref, verb = match(conjinfo.v, "^(.*)("..rx..")$") if verb then conjinfo.v = verb conjinfo.prefijo = pref if conjinfo.nucleoperf[1] and conjinfo.nucleoperf[1] ~= "-" then -- [[ecfero]] conjinfo.prefijoperf = conjinfo.nucleoperf[1] conjinfo.nucleoperf = {} end if conjinfo.nucleosup[1] and conjinfo.nucleosup[1] ~= "-" then conjinfo.prefijosup = conjinfo.nucleosup[1] conjinfo.nucleosup = {} end if conjinfo.nucleosigm[1] and conjinfo.nucleosigm[1] ~= "-" then conjinfo.prefijosigm = conjinfo.nucleosigm[1] conjinfo.nucleosigm = {} end conjinfo.irreg = true conjinfo.conj = p[3].conj for k,val in pairs(p[3]) do if not conjinfo[k] or (type(conjinfo[k]) == "table" and not conjinfo[k][1]) then conjinfo[k] = deep_copy(val) end end return conjinfo end end end error("Unrecognized conjugation '" .. conj_arg .. "'") else error("Unrecognized conjugation '" .. conj_arg .. "'") end return conjinfo end function export.v(frame) local title_ = mw.title.getCurrentTitle() local tit = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {alias_de = "conj"}, [2] = {alias_de = "pres"}, [3] = {alias_de = "nucleoperf"}, [4] = {alias_de = "nucleosup"}, [5] = {alias_de = "nucleosigm"}, ["impers"] = {}, -- pas para formas pasivas solamente ["impersonal"] = {alias_de = "impers"}, ["dep"] = {tipo="bool"}, ["depon"] = {alias_de="dep"}, ["deponente"] = {alias_de="dep"}, ["semidep"] = {tipo="bool"}, ["semidepon"] = {alias_de="semidep"}, ["semideponente"] = {alias_de="semidep"}, ["sigm"] = {tipo="bool"}, ["nopasivo"] = {tipo="bool"}, ["soloperf"] = {tipo="bool"}, ["I"] = {tipo="bool"}, ["p3inf"] = {tipo="bool"}, -- sin uso ["poet_sync_perf"] = {tipo="bool"}, -- sin uso ["always_sync_perf"] = {tipo="bool"}, -- solo en [[saevio]] ["conj"] = {requerido=true}, ["pres"] = {requerido=true}, ["nucleopres"] = {lista = true}, ["nucleoperf"] = {lista = true}, ["nucleosup"] = {lista = true}, ["nucleosigm"] = {lista = true}, ["núcleopres"] = {alias_de="nucleopres"}, ["núcleoperf"] = {alias_de="nucleoperf"}, ["núcleosup"] = {alias_de="nucleosup"}, ["paradigma"] = {lista = true}, ["desactivarnucleos"] = {tipo="bool", por_defecto=true}, -- para [[-o]] ["nota"] = {}, } local conjugado = {} for forma,_ in pairs(formas_no_personales) do params[forma] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma] = {} end for forma,_ in pairs(formas_personales) do for i,s in ipairs(tostr) do params[forma..s] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma..s] = {} if i == 1 then params[forma] = {alias_de=forma..s} end end end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) assert(not find(tit, " "), "locuciones no soportadas aún") assert(not (args["dep"] and args["semidep"]), "un verbo no puede ser deponente y semideponente a la vez") local conjinfo = { conj = args.conj, prefijo="", v=args.pres, desactivar = {}, dep=args.dep, semidep=args.semidep, sigm=args.sigm, impers=args.impers, nopasivo=args.nopasivo, soloperf=args.soloperf, I=args.I, p3inf=args.p3inf, poet_sync_perf=args.poet_sync_perf, -- sin uso always_sync_perf=args.always_sync_perf, nucleopres = deep_copy(args.nucleopres), nucleoperf = deep_copy(args.nucleoperf), nucleosup = deep_copy(args.nucleosup), nucleosigm = deep_copy(args.nucleosigm) } conjinfo = detect_v_type_and_subtypes(conjinfo) conjinfo.conj = conjinfo.conj if conjinfo.impers == true then conjinfo.impers = "3" end -- no puede ir conjinfo acá abajo porque si es un sufijo va a quedar "-" en la raíz, lo que anularía todas las formas conjugadas, tiene que venir directo de args if args.desactivarnucleos then if args.nucleopres[1] == "-" then conjinfo.nucleopres = {} end if args.nucleoperf[1] == "-" then conjinfo.nucleoperf = {} end if args.nucleosup[1] == "-" then conjinfo.nucleosup = {} end if args.nucleosigm[1] == "-" then conjinfo.nucleosigm = {} end end local es_irregular = conjinfo.irreg for _,d in ipairs(conjinfo.desactivar) do if formas_no_personales[d] then args[d] = {"no"} else args[d.."2"] = {"no"} end end for forma,_ in pairs(formas) do agregar_forma(conjugado, conjinfo, forma) end local resultante = sobreescribir_formas(conjugado, args) local mostrar_fut_sig = #resultante["ind_fut_sig1"] > 0 local mostrar_aor_sig = #resultante["subj_aor_sig1"] > 0 local defectivo = comprobar_defectivo(resultante, {"^imper", "_sig"}, tostr) local defect2 resultante, defect2 = desactivar_formas(resultante, function (form) return (conjinfo.nopasivo and form:find("_pas")) or (conjinfo.soloperf and not form:find("perf")) or (conjinfo.impers == "pas" and form:find("_pas[^3]")) or (conjinfo.impers == "pas3" and form:find("_pas[^3]")) or (conjinfo.impers == "pas36" and form:find("_pas[^36]")) end ) if defect2 then defectivo = true end -- por ahora innecesario -- local part_no_adj = {} -- for _,e in ipairs(resultante.part) do -- if (find(e, 'PART') or not find(e, 'ADJ')) and not find(e, "†") then -- insert(part_no_adj, gsub1(e, '%b{}', '')) -- end -- end local tit_pres = f(resultante["ind_pres1"][1] or "―") local tit_inf = f(resultante["inf_act"][1] or "―") local tit_perf = f(resultante["ind_perf1"][1] or "―") local tit_sup = f(resultante["sup"][1] or "―") resultante = agregar_enlaces(resultante, tit, normalizar_enlace) local es_impersonal = conjinfo.impers resultante = formatear_formas(resultante, function (x) return obtener_pronombre(x, es_impersonal) end) local impers = conjinfo.impers local cs, cs1, cs2, fila_pronombres_ind, fila_pronombres_subj, fila_pronombres_imper, mostrar_imper if impers == "3" then fila_pronombres_ind = {"", "(id)", color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", "(quod id)", color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", "(id)", color=COLOR_IMPER, header=true, class="pc"} cs = 2 elseif impers == "36" then error("no soportado actualmente") cs = 3 else fila_pronombres_ind = {"", PRONOMBRES[1], PRONOMBRES[2], PRONOMBRES[3], PRONOMBRES[4], PRONOMBRES[5], PRONOMBRES[6], color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", PRONOMBRES_SUBJ[1], PRONOMBRES_SUBJ[2], PRONOMBRES_SUBJ[3], PRONOMBRES_SUBJ[4], PRONOMBRES_SUBJ[5], PRONOMBRES_SUBJ[6], color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", PRONOMBRES_IMP[1], PRONOMBRES_IMP[2], PRONOMBRES_IMP[3], PRONOMBRES_IMP[4], PRONOMBRES_IMP[5], PRONOMBRES_IMP[6], color=COLOR_IMPER, header=true, class="pc"} cs = 7 mostrar_imper = true end cs1 = cs -- math.floor(cs / 2) -- cs2 = cs - cs1 local t = {} insert(t, {{"Formas no personales (verboides)", colspan=cs}, color=COLOR_H, header=true}) if impers == "3" then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else resultante.inf_act.colspan = cs1-1 resultante.inf_pas.colspan = cs1-1 resultante.part_act.colspan = cs1-1 resultante.part_pas.colspan = cs1-1 resultante.ger.colspan = cs1-1 resultante.sup.colspan = cs1-1 if conjinfo.dep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) elseif conjinfo.semidep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) end end local function ic(tiempo) if impers == "3" then return resultante[tiempo.."3"] elseif impers == "36" then return resultante[tiempo.."3"], resultante[tiempo.."6"] end return resultante[tiempo.."1"], resultante[tiempo.."2"], resultante[tiempo.."3"], resultante[tiempo.."4"], resultante[tiempo.."5"], resultante[tiempo.."6"] end insert(t, {{"Formas personales", colspan=cs}, color=COLOR_H, header=true}) insert(t, {{"Modo indicativo", colspan=cs}, color=COLOR_IND, header=true}) insert(t, fila_pronombres_ind) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end else insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) insert(t, {{"Pretérito perfecto", color=COLOR_IND, header=true}, ic("ind_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_IND, header=true}, ic("ind_pluperf")}) insert(t, {{"Futuro perfecto", color=COLOR_IND, header=true}, ic("ind_fut_perf")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) end insert(t, {{"Modo subjuntivo", colspan=cs}, color=COLOR_SUBJ, header=true}) insert(t, fila_pronombres_subj) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end else insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) insert(t, {{"Pretérito perfecto", color=COLOR_SUBJ, header=true}, ic("subj_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_SUBJ, header=true}, ic("subj_pluperf")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) end insert(t, {{"Modo imperativo", colspan=cs}, color=COLOR_IMPER, header=true}) insert(t, fila_pronombres_imper) if mostrar_imper then if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) else insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) insert(t, {{"Presente pasivo", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) end else insert(t, {{"Como verbo "..(impers == "3" and "impersonal" or "terciopersonal")..", ''"..tit.."'' CARECE de imperativo", color=COLOR_IMPER, header=true, colspan=cs}}) end insert(t, {{f("Leyenda: † arcaico, x no normativo, ~■~ cambio ortográfico, #■# irregularidad"), colspan=cs}}) args["nota"] = args["nota"] or "" if conjinfo.impers == "utc3" then args["nota"] = args["nota"].." NOTA: se usa también como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "umc3" then args["nota"] = args["nota"].." NOTA: se usa más como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "utc36" then args["nota"] = args["nota"].." NOTA: se usa también como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "umc36" then args["nota"] = args["nota"].." NOTA: se usa más como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "pas" or conjinfo.imeprs == "pas3" then args["nota"] = args["nota"].." NOTA: impersonal para las formas pasivas" end if conjinfo.impers == "pas36" then args["nota"] = args["nota"].." NOTA: formas pasivas terciopersonales (solamente tercera persona singular y plural)" end if conjinfo.soloperf then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas del perfecto y pluscuamperfecto con valor de presente, imperfecto o futuro" end if conjinfo.nopasivo then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas activas" end insert(t, {{args["nota"] and args["nota"] or "", colspan=cs}}) local cats = {} local subtits = {} local conj_str if conjinfo.conj == "1" then conj_str = "primera conjugación" elseif conjinfo.conj == "2" then conj_str = "segunda conjugación" elseif conjinfo.conj == "3" then conj_str = "tercera conjugación" elseif conjinfo.conj == "3/4" then conj_str = "tercera/cuarta conjugación" else conj_str = "cuarta conjugación" end insert(cats, "LA:Verbos de la "..conj_str) insert(subtits, conj_str) impers = impers or "" if impers == "3" or find(impers, "^u[tm]c3$") then insert(subtits, "impersonal") insert(cats, "LA:Verbos impersonales") end if defectivo then insert(subtits, "defectivo") insert(cats, "LA:Verbos defectivos") end if conjinfo.dep then insert(subtits, "deponente") insert(cats, "LA:Verbos deponentes") end if conjinfo.semidep then insert(subtits, "semideponente") insert(cats, "LA:Verbos semideponentes") end if es_irregular then insert(subtits, "irregular") insert(cats, "LA:Verbos irregulares") else insert(subtits, "regular") insert(cats, "LA:Verbos regulares") end return renderizar_tabla( frame, "'''Conjugación de ''"..tit_pres..", "..tit_inf..", "..tit_perf..", "..tit_sup.."'''''&emsp;&emsp;("..concat(subtits, ", ")..")", t, ns == 0 and cats or {}) end function export.adv(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { ["n"] = {}, ["nota"] = {alias_de = "n"}, ["comp"] = {lista = true}, ["comparativo"] = {alias_de = "comp"}, ["compnota"] = {lista = true}, ["sup"] = {lista = true}, ["superlativo"] = {alias_de = "sup"}, ["supnota"] = {lista = true}, } local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local head = args[1] local modo = args[2] local enc local cats = {} local cat_pref = "LA:Adverbios" if modo == "-" then enc = "sin comparativo ni superlativo" insert(cats, cat_pref.." incomparables") return renderizar_encabezado( frame, head, enc, args["n"], {}, ns == 0 and cats or {}, normalizar_enlace ) end local flex = {comp={},sup={}} local stem for _, suff in ipairs{"iter", "nter", "ter", "er", "iē", "ē", "rā", "im", "ō"} do stem = match(head, "^(.*)" .. suff .. "$") if stem ~= nil then local comp_suff, sup_suff = "ius", "issimē" if suff == "nter" then stem = stem .. "nt" end if suff == "rā" then comp_suff = "er" .. comp_suff sup_suff = "imē" end insert(flex.comp, stem .. comp_suff) insert(flex.sup, stem .. sup_suff) break end end if not stem and not args.comp[1] and not args.sup[1] then error("Unrecognized adverb type, recognized types are “-ē”, “-er”, “-ter”, “-iter”, “-im”, or “-ō”, “-ra” or specify irregular forms or “-” if incomparable.") end local formas, irr = sobreescribir_formas(flex, args) if args["comp"][1] == "no" then enc = "sin comparativo" insert(cats, cat_pref.." sin comparativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) elseif args["sup"][1] == "no" then enc = "sin superlativo" insert(cats, cat_pref.." sin superlativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end if irr then enc = f("#irregular#") insert(cats, cat_pref.." irregulares") end return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}, {"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end return export 08mhrxbdijzadnkfa9gwyeux4vurnjp 6123506 6123501 2026-07-25T01:50:24Z Tmagc 158167 6123506 Scribunto text/plain -- FLEXIÓN DEL LATÍN -- Adaptado desde en.wikt por Tmagc local export = {} local unpack = unpack or table.unpack local insert = table.insert local concat = table.concat local m_table = require("Módulo:tabla") local keys_to_list = m_table.keysToList local insert_if_not = m_table.insertIfNot local deep_copy = m_table.deepCopy local contains = m_table.contains local merge = m_table.merge local m_str = require("Módulo:string") local u = m_str.char local match = m_str.match local sub = m_str.sub local gsub = m_str.gsub local split = m_str.split local gsplit = m_str.gsplit local find = m_str.find local m_str_avanzado = require("Módulo:string/avanzado") local toNFD = m_str_avanzado.toNFD local toNFC = m_str_avanzado.toNFC local m_flex = require("Módulo:flex") local f = m_flex.f local f_links = m_flex.f_links local parsear_arreglo = m_flex.parsear_arreglo local separar_palabras = m_flex.separar_palabras local combinar_copulativa = m_flex.combinar_copulativa local sobreescribir_formas = m_flex.sobreescribir_formas local desactivar_formas = m_flex.desactivar_formas local agregar_enlaces = m_flex.agregar_enlaces local formatear_formas = m_flex.formatear_formas local comprobar_defectivo = m_flex.comprobar_defectivo local renderizar_tabla = m_flex.renderizar_tabla local renderizar_encabezado = m_flex.renderizar_encabezado local COLOR_H = m_flex.COLOR_H local COLOR_NP = m_flex.COLOR_NP local COLOR_IND = m_flex.COLOR_IND local COLOR_SUBJ = m_flex.COLOR_SUBJ local COLOR_IMPER = m_flex.COLOR_IMPER local MACRON = u(0x304) local BREVE = u(0x306) local DIAER = u(0x308) local DBREVE = u(0x361) local ACCENT = "[" .. MACRON .. BREVE .. DIAER .. DBREVE .. "]" local VOWEL = "[aæeioœuyAÆEIOŒUY]" local cons_to_vowel = { ["j"] = "i", ["J"] = "I", ["v"] = "u", ["V"] = "U", } local function normalizar_enlace(x) x = toNFD(x) x = gsub(x, ACCENT, "") return toNFC(x) end local function join(a, b) a, b = toNFD(a), toNFD(b) -- If the first part ends in "j" or "v", convert it to "i" or "u" unless -- the second part begins with a vowel. if not match(b, "^" .. VOWEL) then a = gsub(a, "[jvJV]$", cons_to_vowel) end return toNFC(a..b) end local function add_form(decl, slot, stem, suf) if type(slot) == "string" then slot = {slot} end for _,slt in ipairs(slot) do if type(decl[slt]) == "nil" or decl[slt] == "" then decl[slt] = {} elseif type(decl[slt]) == "string" then decl[slt] = {decl[slt]} end insert_if_not(decl[slt], join(stem, suf)) end end local function remove_forms(decl, forms) for form,_ in pairs(decl) do for _,rx in ipairs(forms) do if form:find(rx) then forms[form] = {} break end end end end local function merge_forms(forms, forms2, keys) keys = keys or forms2 for key,arr in pairs(keys) do if not forms[key] then forms[key] = {} end if type(forms2[key]) == "string" then insert_if_not(forms[key], forms2[key]) elseif type(forms2[key]) == "table" then for _,a in ipairs(forms2[key]) do insert_if_not(forms[key], a) end end end end local noun_decl = {} noun_decl["0"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = stem forms["dat_sg"] = stem forms["acc_sg"] = stem forms["abl_sg"] = stem forms["voc_sg"] = stem forms["nom_pl"] = stem forms["gen_pl"] = stem forms["dat_pl"] = stem forms["acc_pl"] = stem forms["abl_pl"] = stem forms["voc_pl"] = stem -- with locative if data.loc then forms["loc_sg"] = stem forms["loc_pl"] = stem end end local function alt_gen_pl_in_um(stem, forms, types, subtitles, i_stem) if types.genplum then add_form(forms, "gen_pl", stem, (i_stem and "i" or "") .. "um") elseif types.not_genplum then -- FIXME: not a contraction. -- insert_if_not(subtitles, "uncontracted genitive plural") end end noun_decl["1"] = function(data, args) local forms, types, loc, subtitles = data.forms, data.types, data.loc, data.subtitles local stem = args[1] -- normal 1st local nom_sg = "a" local gen_loc_sg = "ae" local dat_sg = "ae" local acc_sg = "am" local abl_sg = "ā" local voc_sg = "a" local nom_voc_pl = "ae" local gen_pl = "ārum" local dat_abl_loc_pl = "īs" local acc_pl = "ās" insert_if_not(data.title, "primera declinación") insert_if_not(data.categories, "LA:Sustantivos de la primera declinación") -- ām if types.am then nom_sg = "ām" acc_sg = "ām" abl_sg = {"ām", "ā"} voc_sg = "ām" -- all Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") --Greek Ma if types.Ma then nom_sg = "ās" acc_sg = "ān" voc_sg = "ā" -- Greek Me elseif types.Me then nom_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" -- Greek else nom_sg = "ē" gen_loc_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" end end -- ābus if types.abus then dat_abl_loc_pl = "ābus" end add_form(forms, "nom_sg", stem, nom_sg) add_form(forms, "gen_sg", stem, gen_loc_sg) add_form(forms, "dat_sg", stem, dat_sg) add_form(forms, "acc_sg", stem, acc_sg) add_form(forms, "abl_sg", stem, abl_sg) add_form(forms, "voc_sg", stem, voc_sg) add_form(forms, {"nom_pl", "voc_pl"}, stem, nom_voc_pl) add_form(forms, "gen_pl", stem, gen_pl) add_form(forms, {"dat_pl", "abl_pl"}, stem, dat_abl_loc_pl) add_form(forms, "acc_pl", stem, acc_pl) -- with locative if loc then add_form(forms, "loc_sg", stem, gen_loc_sg) add_form(forms, "loc_pl", stem, dat_abl_loc_pl) end end noun_decl["2"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "segunda declinación") insert_if_not(data.categories, "LA:Sustantivos de la segunda declinación") -- normal 2nd forms["nom_sg"] = stem1 .. "us" forms["gen_sg"] = stem1 .. "ī" forms["dat_sg"] = stem1 .. "ō" forms["acc_sg"] = stem1 .. "um" forms["abl_sg"] = stem1 .. "ō" forms["voc_sg"] = stem1 .. "e" forms["nom_pl"] = stem1 .. "ī" forms["gen_pl"] = stem1 .. "ōrum" forms["dat_pl"] = stem1 .. "īs" forms["acc_pl"] = stem1 .. "ōs" forms["abl_pl"] = stem1 .. "īs" forms["voc_pl"] = stem1 .. "ī" -- all neuter if types.N then forms["nom_sg"] = stem1 .. "um" forms["voc_sg"] = stem1 .. "um" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- neuter ium if types.ium then forms["nom_sg"] = stem1 .. "ium" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" forms["voc_sg"] = stem1 .. "ium" forms["nom_pl"] = stem1 .. "ia" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "ia" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "ia" -- neuter us, plural a elseif types.a then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- -vom (aevom, etc.) elseif types.vom then forms["nom_sg"] = stem1 .. "om" forms["acc_sg"] = stem1 .. "om" forms["voc_sg"] = stem1 .. "om" -- neuter Greek in -os (cētos) elseif types.Greek and types.us then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "os" forms["voc_sg"] = stem1 .. "os" forms["nom_pl"] = stem1 .. "ē" forms["gen_pl"] = stem1 .. "ōn" forms["acc_pl"] = stem1 .. "ē" forms["voc_pl"] = stem1 .. "ē" -- neuter Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "on" forms["acc_sg"] = stem1 .. "on" forms["voc_sg"] = stem1 .. "on" -- neuter us elseif types.us then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "ī" forms["acc_pl"] = stem1 .. "ōs" forms["voc_pl"] = stem1 .. "ī" end -- er elseif types.er then forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "ī" forms["dat_sg"] = stem2 .. "ō" forms["acc_sg"] = stem2 .. "um" forms["abl_sg"] = stem2 .. "ō" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ī" forms["gen_pl"] = stem2 .. "ōrum" forms["dat_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "ōs" forms["abl_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "ī" -- ius elseif types.ius then forms["nom_sg"] = stem1 .. "ius" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" if types.voci then -- Only for proper names and fīlius, genius forms["voc_sg"] = stem1 .. "ī" else forms["voc_sg"] = stem1 .. "ie" end forms["nom_pl"] = stem1 .. "iī" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "iōs" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "iī" -- -vos (servos, etc.) elseif types.vos then forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "om" -- Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "on" if data.num == "pl" then forms["nom_pl"] = stem1 .. "oe" forms["voc_pl"] = stem1 .. "oe" else forms["nom_pl"] = {stem1 .. "ī", stem1 .. "oe"} forms["voc_pl"] = {stem1 .. "ī", stem1 .. "oe"} end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- with -um genitive plural alt_gen_pl_in_um(stem2, forms, types, subtitles, types.ius or types.ium) -- with locative if data.loc then if types.ius or types.ium then forms["loc_sg"] = stem2 .. "iī" forms["loc_pl"] = stem2 .. "iīs" else forms["loc_sg"] = stem2 .. "ī" forms["loc_pl"] = stem2 .. "īs" end end end local acc_sg_i_stem_subtypes = { acc_im = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [abl -ī]; -- cannabis, senapis, sinapis [abl -e, -ī] acc_sg = {"im"}, title = {"accusative singular in ''-im''"}, }, acc_im_in = { -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [abl -ī]; -- Baetis, Tigris [acc -e, -ī] acc_sg = {"im", "in"}, title = {"accusative singular in ''-im'' or ''-in''"}, }, acc_im_in_em = { -- e.g. tigris, river Līris acc_sg = {"im", "in", "em"}, title = {"accusative singular in ''-im'', ''-in'' or ''-em''"}, }, acc_im_em = { acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or ''-em''"}, }, acc_im_occ_em = { -- febris, pelvis, puppis, restis, securis, turris [abl -ī, -e] acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or occasionally ''-em''"}, }, acc_em_im = { -- aqualis, clavis, lens, navis [abl -e, -ī]; -- cutis, restis [abl -e] acc_sg = {"em", "im"}, title = {"accusative singular in ''-em'' or ''-im''"}, }, } local abl_sg_i_stem_subtypes = { abl_i = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [acc -im]; -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [acc -im or -in]; -- canalis "water pipe", months in -is or -er, nouns originally i-stem adjectives such as aedilis, affinis, bipennis, familiaris, sodalis, volucris, etc. [acc -em] abl_sg = {"ī"}, title = {"ablative singular in ''-ī''"}, }, abl_i_e = { -- febris, pelvis, puppis, restis, securis, turris [acc -im, -em] abl_sg = {"ī", "e"}, title = {"ablative singular in ''-ī'' or ''-e''"}, }, abl_e_i = { -- cannabis, senapis, sinapis [acc -im]; -- Baetis, Tigris [acc -im, -in]; -- aqualis, clavis, lens, navis [acc -em, -im]; -- finis, mugilis, occiput, pugil, rus, supellex, vectis [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or ''-ī''"}, }, abl_e_occ_i = { -- amnis, anguis, avis, civis, classis, fustis, ignis, imber, orbis, pars, postis, sors, unguis, vesper [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or occasionally ''-ī''"}, }, } local function extract_stem(form, ending) local base = match(form, "^(.*)" .. ending .. "$") if not base then error("Form " .. form .. " should end in -" .. ending) end return base end local function count_vowels(stem) return select(2, toNFD(stem):gsub("[aeiouyAEIOUY]", "")) end noun_decl["3"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] -- local function non_i_stem_type() -- return (count_vowels(stem1) > count_vowels(stem2) and "parisyllabic" or "imparisyllabic") .. " non-i-stem" -- end insert_if_not(data.title, "tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") --normal 3rd forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "is" forms["dat_sg"] = stem2 .. "ī" forms["acc_sg"] = stem2 .. "em" forms["abl_sg"] = stem2 .. "e" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ēs" forms["gen_pl"] = stem2 .. "um" forms["dat_pl"] = stem2 .. "ibus" forms["acc_pl"] = stem2 .. "ēs" forms["abl_pl"] = stem2 .. "ibus" forms["voc_pl"] = stem2 .. "ēs" local acc_sg_i_stem_subtype = false local not_acc_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if acc_sg_i_stem_subtypes[subtype] then acc_sg_i_stem_subtype = true break end end for acc_sg_subtype, _ in pairs(acc_sg_i_stem_subtypes) do if types["not_" .. acc_sg_subtype] then not_acc_sg_i_stem_subtype = true break end end local abl_sg_i_stem_subtype = false local not_abl_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if abl_sg_i_stem_subtypes[subtype] then abl_sg_i_stem_subtype = true break end end for abl_sg_subtype, _ in pairs(abl_sg_i_stem_subtypes) do if types["not_" .. abl_sg_subtype] then not_abl_sg_i_stem_subtype = true break end end -- all Greek if types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") -- Greek er if types.er then stem1 = extract_stem(stem1, "ēr") forms["nom_sg"] = stem1 .. "ēr" forms["gen_sg"] = stem1 .. "eris" forms["dat_sg"] = stem1 .. "erī" forms["acc_sg"] = {stem1 .. "era", stem1 .. "erem"} forms["abl_sg"] = stem1 .. "ere" forms["voc_sg"] = stem1 .. "ēr" forms["nom_pl"] = stem1 .. "erēs" forms["gen_pl"] = stem1 .. "erum" forms["dat_pl"] = stem1 .. "eribus" forms["acc_pl"] = stem1 .. "erēs" forms["abl_pl"] = stem1 .. "eribus" forms["voc_pl"] = stem1 .. "erēs" -- Greek on elseif types.on then stem1 = extract_stem(stem1, "ōn") forms["nom_sg"] = stem1 .. "ōn" forms["gen_sg"] = {stem1 .. "ontis", stem1 .. "ontos"} forms["dat_sg"] = stem1 .. "ontī" forms["acc_sg"] = stem1 .. "onta" forms["abl_sg"] = stem1 .. "onte" forms["voc_sg"] = stem1 .. "ōn" forms["nom_pl"] = stem1 .. "ontēs" forms["gen_pl"] = {stem1 .. "ontum", stem1 .. "ontium"} forms["dat_pl"] = stem1 .. "ontibus" forms["acc_pl"] = {stem1 .. "ontēs", stem1 .. "ontās"} forms["abl_pl"] = stem1 .. "ontibus" forms["voc_pl"] = stem1 .. "ontēs" -- Greek i-stem elseif types.I then forms["gen_sg"] = {stem2 .. "is", stem2 .. "eōs", stem2 .. "ios"} forms["acc_sg"] = {stem2 .. "im", stem2 .. "in", stem2 .. "em{MED}"} forms["abl_sg"] = {stem2 .. "ī", stem2 .. "e{MED}"} forms["voc_sg"] = {stem2 .. "is", stem2 .. "i"} forms["nom_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["gen_pl"] = {stem2 .. "ium", stem2 .. "eōn"} forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["voc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} if types.poetic_esi then forms["dat_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} forms["abl_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} end -- normal Greek else forms["gen_sg"] = stem2 .. "os" if match(toNFD(stem2), "[yY]" .. ACCENT .. "*$") then forms["acc_sg"] = stem2 .. "n" else forms["acc_sg"] = stem2 .. "a" end forms["nom_pl"] = stem2 .. "es" forms["acc_pl"] = stem2 .. "as" forms["voc_pl"] = stem2 .. "es" if match(toNFD(stem1), "[iyIY]" .. ACCENT .. "*s$") then -- Per Hiley, words in -is and -ys have a poetic vocative -- without the -s, but otherwise the vocative is the same -- as the nominative. forms["voc_sg"] = {stem1, (stem1:gsub("s$", "")).."{L}"} end end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- polis if types.polis then stem1 = extract_stem(stem1, "polis") insert_if_not(data.title, "parcialmente griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "polis" forms["gen_sg"] = stem1 .. "polis" forms["dat_sg"] = stem1 .. "polī" forms["acc_sg"] = {stem1 .. "polim", stem1 .. "polin"} forms["abl_sg"] = stem1 .. "polī" forms["voc_sg"] = {stem1 .. "polis", stem1 .. "polī"} end -- all neuter if types.N then forms["acc_sg"] = stem1 -- neuter I stem if types.I then -- pure variety if types.pure then forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "ia" forms["gen_pl"] = stem2 .. "ium" forms["acc_pl"] = stem2 .. "ia" forms["voc_pl"] = stem2 .. "ia" -- non-pure variety (rare) else forms["nom_pl"] = stem2 .. "a" forms["gen_pl"] = {stem2 .. "ium", stem2 .. "um"} forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- normal neuter else forms["nom_pl"] = stem2 .. "a" forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- I stem elseif types.I or acc_sg_i_stem_subtype or abl_sg_i_stem_subtype then forms["gen_pl"] = stem2 .. "ium" -- Per Allen and Greenough, Hiley and others, the acc_pl in -īs -- applied originally to all i-stem nouns, and was current as an -- alternative form up through Caesar. forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "īs"} -- pure variety if types.pure then forms["acc_sg"] = stem2 .. "im" forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "īs" end local num = data.num for subtype, _ in pairs(types) do local acc_sg_i_stem_props = acc_sg_i_stem_subtypes[subtype] if acc_sg_i_stem_props then forms["acc_sg"] = {} for _, ending in ipairs(acc_sg_i_stem_props.acc_sg) do insert_if_not(forms["acc_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(acc_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end -- FIXME: needs to be done for neuter nouns as well. for subtype, _ in pairs(types) do local abl_sg_i_stem_props = abl_sg_i_stem_subtypes[subtype] if abl_sg_i_stem_props then forms["abl_sg"] = {} for _, ending in ipairs(abl_sg_i_stem_props.abl_sg) do insert_if_not(forms["abl_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(abl_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end end -- with locative if data.loc then -- As far as I can tell, in general both dative singular and -- ablative singular could be used for the third-declension locative, -- with different time periods preferring different forms. -- http://dcc.dickinson.edu/grammar/latin/3rd-declension-locative-case -- mentions rūrī along with either Carthāginī or Carthāgine. -- Wikipedia in https://en.wikipedia.org/wiki/Locative_case#Latin -- says this: -- -- In archaic times, the locative singular of third declension nouns -- was still interchangeable between ablative and dative forms, but in -- the Augustan Period the use of the ablative form became fixed. -- Therefore, both forms "rūrī" and "rūre" may be encountered. -- -- Lewis and Short confirm this. local loc_sg = forms["dat_sg"] if type(loc_sg) == "table" then loc_sg = deep_copy(loc_sg) else loc_sg = {loc_sg} end local abl_sg = forms["abl_sg"] if type(abl_sg) == "table" then for _, form in ipairs(abl_sg) do insert_if_not(loc_sg, deep_copy(form)) end else insert_if_not(loc_sg, abl_sg) end forms["loc_sg"] = loc_sg forms["loc_pl"] = deep_copy(forms["abl_pl"]) --The following is what we used to have, but I simply cannot believe it. --if types.Greek and not types.s then -- forms["loc_pl"] = stem2 .. "ēs" --end end end noun_decl["4"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "cuarta declinación") insert_if_not(data.categories, "LA:Sustantivos de la cuarta declinación") -- normal 4th forms["nom_sg"] = stem .. "us" forms["gen_sg"] = stem .. "ūs" forms["dat_sg"] = stem .. "uī" forms["acc_sg"] = stem .. "um" forms["abl_sg"] = stem .. "ū" forms["voc_sg"] = stem .. "us" forms["nom_pl"] = stem .. "ūs" forms["gen_pl"] = stem .. "uum" forms["dat_pl"] = stem .. "ibus" forms["acc_pl"] = stem .. "ūs" forms["abl_pl"] = stem .. "ibus" forms["voc_pl"] = stem .. "ūs" if types.echo then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end add_form(forms, "acc_sg", stem, "ōn") elseif types.Callisto then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end end -- neuter if types.N then forms["nom_sg"] = stem .. "ū̆{?}" forms["gen_sg"] = {stem .. "ūs{C}", stem .. "ū{S}"} forms["dat_sg"] = {stem .. "uī{C}", stem .. "ū{S}"} forms["acc_sg"] = stem .. "ū̆{?}" forms["voc_sg"] = stem .. "ū̆{?}" forms["nom_pl"] = stem .. "ua" forms["acc_pl"] = stem .. "ua" forms["voc_pl"] = stem .. "ua" end -- ubus if types.ubus then forms["dat_pl"] = stem .. "ubus" forms["abl_pl"] = stem .. "ubus" end -- with locative if data.loc then forms["loc_sg"] = forms["abl_sg"] forms["loc_pl"] = forms["abl_pl"] end end noun_decl["5"] = function(data, args) local forms, types = data.forms, data.types local stem = args[1] insert_if_not(data.title, "quinta declinación") insert_if_not(data.categories, "LA:Sustantivos de la quinta declinación") -- ies if types.i then stem = stem .. "i" end forms["nom_sg"] = stem .. "ēs" forms["gen_sg"] = stem .. "eī" forms["dat_sg"] = stem .. "eī" forms["acc_sg"] = stem .. "em" forms["abl_sg"] = stem .. "ē" forms["voc_sg"] = stem .. "ēs" forms["nom_pl"] = stem .. "ēs" forms["gen_pl"] = stem .. "ērum" forms["dat_pl"] = stem .. "ēbus" forms["acc_pl"] = stem .. "ēs" forms["abl_pl"] = stem .. "ēbus" forms["voc_pl"] = stem .. "ēs" -- ies if types.i then forms["gen_sg"] = stem .. "ēī" forms["dat_sg"] = stem .. "ēī" end --with locative if data.loc then forms["loc_sg"] = stem .. "ē" forms["loc_pl"] = stem .. "ēbus" end end noun_decl["sgpl"] = function(data, args) local forms = data.forms local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem1 forms["gen_sg"] = stem1 forms["dat_sg"] = stem1 forms["acc_sg"] = stem1 forms["abl_sg"] = stem1 forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 forms["gen_pl"] = stem2 forms["dat_pl"] = stem2 forms["acc_pl"] = stem2 forms["abl_pl"] = stem2 forms["voc_pl"] = stem2 -- with locative if data.loc then forms["loc_sg"] = stem1 forms["loc_pl"] = stem2 end end noun_decl["indecl"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = stem forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} -- with locative (for multiword terms) if data.loc then forms["loc_sg"] = {} forms["loc_pl"] = {} end data.num = "sg" end noun_decl["irreg"] = function(data, args) local forms, subtitles, notes = data.forms, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "irregular") insert_if_not(data.categories, "LA:Sustantivos irregulares") forms["nom_sg"] = {} forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = {} forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} if stem == "bōs" then data.decl = "3" local stem1, stem2 = "bōs", "bov" noun_decl["3"](data, {stem1, stem2}) add_form(forms, "abl_sg", stem2, "īd{†}") add_form(forms, "gen_pl", "bo", "um") add_form(forms, "gen_pl", stem2, "erum") add_form(forms, "dat_pl", "", "bōbus") add_form(forms, "dat_pl", "", "būbus") add_form(forms, "abl_pl", "", "bōbus") add_form(forms, "abl_pl", "", "būbus") elseif stem:match("^[dD]eus$") then data.decl = "2" local dD = stem:sub(1, 1) forms["nom_sg"] = dD .. "eus" forms["gen_sg"] = dD .. "eī" forms["dat_sg"] = dD .. "eō" forms["acc_sg"] = dD .. "eum" forms["abl_sg"] = dD .. "eō" forms["voc_sg"] = {dD .. "eus", dD .. "ee"} if stem == "deus" then forms["nom_pl"] = {"dī", "diī", "deī"} forms["gen_pl"] = {"deōrum", "deum"} forms["dat_pl"] = {"dīs", "diīs", "deīs"} forms["acc_pl"] = "deōs" forms["abl_pl"] = {"dīs", "diīs", "deīs"} forms["voc_pl"] = {"dī", "diī", "deī"} end elseif stem == "domus" then data.decl = "4,2" insert_if_not(data.title, "cuarta/segunda declinación") forms["nom_sg"] = "domus" forms["gen_sg"] = {"domūs", "domī"} forms["dat_sg"] = {"domuī", "domō", "domū"} forms["acc_sg"] = "domum" forms["abl_sg"] = {"domū", "domō"} forms["voc_sg"] = "domus" forms["loc_sg"] = "domī" forms["nom_pl"] = "domūs" forms["gen_pl"] = {"domuum", "domōrum"} forms["dat_pl"] = "domibus" forms["acc_pl"] = {"domūs", "domōs"} forms["abl_pl"] = "domibus" forms["voc_pl"] = "domūs" forms["loc_pl"] = {} data.loc = true elseif match(stem, "^[IÏJ]ēs[uū]" .. BREVE .. "?s$") then local ij = sub(stem, 1, 1) local uu = match(stem, "[uū]" .. BREVE .. "?") forms["nom_sg"] = stem forms["gen_sg"] = ij .. "ēsū" forms["dat_sg"] = ij .. "ēsū" forms["acc_sg"] = ij .. "ēs" .. uu .. "m" forms["abl_sg"] = ij .. "ēsū" forms["voc_sg"] = ij .. "ēsū" data.num = "sg" elseif stem == "Mōsēs" or stem == "Moesēs" or match(stem, "^M[oō]" .. BREVE .. "?[īȳ]sēs$") then local mos = sub(stem, 1, -3) forms["nom_sg"] = stem forms["gen_sg"] = {mos .. "ī", mos .. "ēī", mos .. "is", mos .. "ēn", mos .. "eōs"} forms["dat_sg"] = mos .. "ī" forms["acc_sg"] = {mos .. "ēn", mos .. "em"} forms["abl_sg"] = {mos .. "e", mos .. "ēn", mos .. "ī"} forms["voc_sg"] = {mos .. "ēs", mos .. "ē"} data.num = "sg" elseif stem:match("^[ij]ūgerum$") then data.decl = "2,3" local ij = stem:sub(1, 1) insert_if_not(data.title, "segunda/tercera declinación híbrido") forms["nom_sg"] = ij .. "ūgerum" forms["gen_sg"] = ij .. "ūgerī" forms["dat_sg"] = ij .. "ūgerō" forms["acc_sg"] = ij .. "ūgerum" forms["abl_sg"] = ij .. "ūgerō" forms["voc_sg"] = ij .. "ūgerum" forms["nom_pl"] = ij .. "ūgera" forms["gen_pl"] = ij .. "ūgerum" forms["dat_pl"] = ij .. "ūgeribus" forms["acc_pl"] = ij .. "ūgera" forms["abl_pl"] = {ij .. "ūgeribus", ij .. "ūgerīs{†}"} forms["voc_pl"] = ij .. "ūgera" elseif stem == "sūs" then data.decl = "3" forms["nom_sg"] = "sūs" forms["gen_sg"] = "suis" forms["dat_sg"] = "suī" forms["acc_sg"] = "suem" forms["abl_sg"] = "sue" forms["voc_sg"] = "sūs" forms["nom_pl"] = "suēs" forms["gen_pl"] = "suum" forms["dat_pl"] = {"suibus", "sūbus", "subus"} forms["acc_pl"] = "suēs" forms["abl_pl"] = {"suibus", "sūbus", "subus"} forms["voc_pl"] = "suēs" elseif stem == "ēthos" then data.decl = "3" insert_if_not(data.title, "tercera declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "ēthos" forms["gen_sg"] = "ētheos" forms["acc_sg"] = "ēthos" forms["voc_sg"] = "ēthos" forms["nom_pl"] = {"ēthea", "ēthē"} forms["dat_pl"] = {"ēthesi", "ēthesin"} forms["acc_pl"] = {"ēthea", "ēthē"} forms["abl_pl"] = {"ēthesi", "ēthesin"} forms["voc_pl"] = {"ēthea", "ēthē"} elseif stem == "Athōs" then data.decl = "2" insert_if_not(data.title, "segunda declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "Athōs" forms["gen_sg"] = "Athō" forms["dat_sg"] = "Athō" forms["acc_sg"] = {"Athō", "Athōn"} forms["abl_sg"] = "Athō" forms["voc_sg"] = "Athōs" data.num = "sg" elseif stem:match("^[uv]ēnum$") then data.decl = "4,2" local uv = stem:sub(1, 1) insert_if_not(data.title, "cuarta/segunda declinación, defectivo") forms["dat_sg"] = {uv .. "ēnuī", uv .. "ēnō"} forms["acc_sg"] = uv .. "ēnum" data.num = "sg" elseif stem:match("^[uv]īs$") then data.decl = "3" local uv = stem:sub(1, 1) insert_if_not(data.title, "defectivo") forms["nom_sg"] = uv .. "īs" forms["gen_sg"] = uv .. "īs" forms["dat_sg"] = uv .. "ī" forms["acc_sg"] = uv .. "im" forms["abl_sg"] = uv .. "ī" forms["voc_sg"] = uv .. "īs" forms["nom_pl"] = uv .. "īrēs" forms["gen_pl"] = uv .. "īrium" forms["dat_pl"] = uv .. "īribus" forms["acc_pl"] = {uv .. "īrēs", uv .. "īrīs"} forms["abl_pl"] = uv .. "īribus" forms["voc_pl"] = uv .. "īrēs" else error("Stem " .. stem .. " not recognized.") end end local adj_decl = {} adj_decl["0+"] = function(data, args) local forms, categories = data.forms, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = stem forms["gen_sg_m"] = stem forms["gen_pl_m"] = stem forms["dat_sg_m"] = stem forms["dat_pl_m"] = stem forms["acc_sg_m"] = stem forms["acc_pl_m"] = stem forms["abl_sg_m"] = stem forms["abl_pl_m"] = stem forms["voc_sg_m"] = stem forms["voc_pl_m"] = stem forms["loc_sg_m"] = stem forms["loc_pl_m"] = stem end adj_decl["1&2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera y segunda declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local original if types.er then local final2 = stem:sub(-2) if final2 == "er" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") elseif final2 == "ur" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") else error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem) end stem, original = args[2], stem end local us = "us" local a_sf = "a" local um = "um" local ae_gsf = "ae" local am = "am" local a_macron = "ā" local i_pl = stem .. "ī" if types.greekA or types.greekE then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") if types.greekA then us = "os" um = "on" am = "ān" else us = "os" a_sf = "ē" um = "on" ae_gsf = "ēs" am = "ēn" a_macron = "ē" end i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = original or (stem .. us) forms["nom_sg_f"] = stem .. a_sf forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_f"] = stem .. ae_gsf forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_f"] = stem .. "ae" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_f"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_f"] = stem .. am forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_f"] = stem .. a_macron forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_f"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = original or (stem .. "e") forms["voc_sg_f"] = stem .. a_sf forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" if types.ius then insert_if_not(data.title, "pronominal") --insert_if_not(subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''") forms["gen_sg_m"] = stem .. "ī̆us" forms["gen_sg_f"] = stem .. "ī̆us" forms["gen_sg_n"] = stem .. "ī̆us" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_f"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" elseif types.not_ius then insert_if_not(data.title, "no pronominal") --insert_if_not(subtitles, "with normal genitive and dative singular") end if stem == "me" then forms["voc_sg_m"] = "mī" end if types.ic then --insert_if_not(subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''") local oc = "oc" local oc_macron = "ōc" if stem == "ill" then oc = "uc" oc_macron = "ūc" end forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = stem .. oc forms["nom_pl_n"] = stem .. "aec" forms["gen_sg_m"] = stem .. "uius" forms["gen_sg_f"] = stem .. "uius" forms["gen_sg_n"] = stem .. "uius" forms["dat_sg_m"] = stem .. "uic" forms["dat_sg_f"] = stem .. "uic" forms["dat_sg_n"] = stem .. "uic" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = stem .. oc forms["acc_pl_n"] = stem .. "aec" forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. oc_macron forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} end if types.distr then if stem:sub(-1) == "n" then forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum{R}"} forms["gen_pl_f"] = {stem .. "um", stem .. "ārum{R}"} forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum{R}"} else error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem) end end forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["1-1+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") forms["nom_sg_m"] = stem .. "a" forms["nom_pl_m"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ae" forms["gen_pl_m"] = stem .. "ārum" forms["dat_sg_m"] = stem .. "ae" forms["dat_pl_m"] = stem .. "īs" forms["acc_sg_m"] = stem .. "am" forms["acc_sg_n"] = stem .. "a" forms["acc_pl_m"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ā" forms["abl_pl_m"] = stem .. "īs" forms["voc_sg_m"] = stem .. "a" forms["voc_pl_m"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["2-2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "segunda declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local us = "us" local um = "um" local i_pl = stem .. "ī" if types.greek then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") us = "os" um = "on" i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = stem .. us forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = stem .. "e" forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end local function abl_i_e(...) local function update_slot(forms, slot, f, do_copy) if not forms[slot] then return do_copy elseif do_copy then f = deep_copy(f) end forms[slot] = f return true end function abl_i_e(stem, forms, types) local f, do_copy if types["abl_e_i"] then f = {stem .. "e", stem .. "ī"} elseif types["abl_i_e"] then f = {stem .. "ī", stem .. "e"} else return end do_copy = update_slot(forms, "abl_sg_m", f, do_copy) do_copy = update_slot(forms, "abl_sg_f", f, do_copy) -- Neuter doesn't take -e with i-stems. if not types.I then update_slot(forms, "abl_sg_n", f, do_copy) end end return abl_i_e(...) end adj_decl["3-1+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) if types.par then forms["nom_pl_n"] = stem2 .. "a" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["abl_sg_m"] = stem2 .. "e" forms["abl_sg_n"] = stem2 .. "e" forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"} -- Really? forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"} -- Why does this happen? forms["acc_pl_n"] = stem2 .. "a" forms["voc_pl_n"] = stem2 .. "a" end local es_base = stem1:match("^(.-)ēs$") if es_base and es_base == stem2 then if types.greek then forms["nom_sg_n"] = {stem2 .. "ē̆s{?}"} forms["acc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_m"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["nom_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["acc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["voc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["abl_sg_m"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["abl_sg_n"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["gen_pl_m"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} forms["gen_pl_n"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Adjetivos griegos") elseif types.not_greek then insert_if_not(data.title, "no griego") end end end adj_decl["3-def+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, defectivo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = stem2 .. "ēs" forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" if types.tor then insert_if_not(data.title, "tercera declinación, solo en masculino") insert_if_not(categories, "LA:Adjetivos solo en masculino") remove_forms(forms, {"_f$", "_n$"}) forms["nom_sg_m"] = stem1 forms["gen_sg_m"] = stem2 .. "is" forms["dat_sg_m"] = stem2 .. "ī" forms["acc_sg_m"] = stem2 .. "em" forms["abl_sg_m"] = stem2 .. "e" forms["voc_sg_m"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["gen_pl_m"] = stem2 .. "um" forms["dat_pl_m"] = stem2 .. "ibus" forms["acc_pl_m"] = stem2 .. "ēs" forms["abl_pl_m"] = stem2 .. "ibus" forms["voc_pl_m"] = stem2 .. "ēs" end if types.trix then insert_if_not(data.title, "tercera declinación, solo en femenino o en neutro plural") insert_if_not(categories, "LA:Adjetivos solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en neutro") remove_forms(forms, {"_m$", "sg_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.trixf then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.idis then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = {stem2 .. "is", stem2 .. "os"} forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = {stem2 .. "em", stem2 .. "a"} forms["abl_sg_f"] = stem2 .. "e" forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} forms["gen_pl_f"] = stem2 .. "um" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = {stem2 .. "ēs", stem2 .. "as"} forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} end forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-C+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1 = args[1] local stem2 = stem1 .. "ōr" insert_if_not(data.title, "tercera declinación, comparativo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos comparativos") forms["nom_sg_m"] = stem1 .. "or" forms["nom_sg_n"] = stem1 .. "us" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "a" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 .. "us" forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} forms["acc_pl_n"] = stem2 .. "a" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 .. "or" forms["voc_sg_n"] = stem1 .. "us" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "a" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-P+"] = function(data, args) local forms, notes = data.forms, data.notes local stem2 = args[2] adj_decl["3-1+"](data, args) insert_if_not(data.title, "tercera declinación, participio") insert_if_not(data.categories, "LA:Adjetivos de la tercera declinación") forms["abl_sg_m"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["abl_sg_n"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} end adj_decl["3-2+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem = args[1] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem .. "is" forms["nom_sg_n"] = stem .. "e" forms["nom_pl_m"] = stem .. "ēs" forms["nom_pl_n"] = stem .. "ia" forms["gen_sg_m"] = stem .. "is" forms["gen_sg_n"] = stem .. "is" forms["gen_pl_m"] = stem .. "ium" forms["gen_pl_n"] = stem .. "ium" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" forms["dat_pl_m"] = stem .. "ibus" forms["dat_pl_n"] = stem .. "ibus" forms["acc_sg_m"] = stem .. "em" forms["acc_sg_n"] = stem .. "e" forms["acc_pl_m"] = {stem .. "īs", stem .. "ēs"} forms["acc_pl_n"] = stem .. "ia" forms["abl_sg_m"] = stem .. "ī" forms["abl_sg_n"] = stem .. "ī" forms["abl_pl_m"] = stem .. "ibus" forms["abl_pl_n"] = stem .. "ibus" -- abl_i_e(stem, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem .. "is" forms["voc_sg_n"] = stem .. "e" forms["voc_pl_m"] = stem .. "ēs" forms["voc_pl_n"] = stem .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-3+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con tres terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_f"] = stem2 .. "is" forms["nom_sg_n"] = stem2 .. "e" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_f"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_f"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_f"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_f"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_f"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_f"] = stem2 .. "em" forms["acc_sg_n"] = stem2 .. "e" forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_f"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_f"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_f"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" -- abl_i_e(stem2, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem1 forms["voc_sg_f"] = stem2 .. "is" forms["voc_sg_n"] = stem2 .. "e" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_f"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["indecl+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = {} forms["gen_sg_m"] = {} forms["gen_pl_m"] = {} forms["dat_sg_m"] = {} forms["dat_pl_m"] = {} forms["acc_sg_m"] = stem forms["acc_pl_m"] = {} forms["abl_sg_m"] = {} forms["abl_pl_m"] = {} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["irreg+"] = function(data,args) local forms, types, pos, notes, categories = data.forms, data.types, data.pos, data.notes, data.categories local arg1 = args[1] insert_if_not(data.title, "irregular") insert_if_not(categories, "LA:Adjetivos irregulares") if arg1 == "duo" or arg1 == "ambō" then local stem = sub(arg1, 1, -2) -- data.title = stem == "amb" and "irregular adjective" or "numeral" data.num = "pl" local stem_with_o = stem .. (stem == "amb" and "ō" or "o") forms["nom_pl_m"] = stem_with_o forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem_with_o forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_pl_m"] = stem .. "ōbus" forms["dat_pl_f"] = stem .. "ābus" forms["dat_pl_n"] = stem .. "ōbus" forms["acc_pl_m"] = {stem .. "ōs", stem_with_o} forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem_with_o forms["abl_pl_m"] = stem .. "ōbus" forms["abl_pl_f"] = stem .. "ābus" forms["abl_pl_n"] = stem .. "ōbus" forms["voc_pl_m"] = stem_with_o forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem_with_o if stem == "du" then forms["gen_pl_m"] = {forms["gen_pl_m"], "duum", "duom{†}"} forms["gen_pl_n"] = {forms["gen_pl_n"], "duum", "duom{†}"} end elseif arg1:sub(-6) == "mīlle" then insert_if_not(data.title, "numeral semiindeclinable") local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "le" forms["nom_pl_m"] = {stem .. "ia", stem .. "lia"} forms["gen_sg_m"] = stem .. "le" forms["gen_pl_m"] = {stem .. "ium", stem .. "lium"} forms["dat_sg_m"] = stem .. "le" forms["dat_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["acc_sg_m"] = stem .. "le" forms["acc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["abl_sg_m"] = stem .. "le" forms["abl_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["voc_sg_m"] = stem .. "le" forms["voc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) elseif arg1 == "ille" or arg1 == "iste" or arg1 == "ipse" or arg1 == "olle" then local stem = arg1:sub(1, -2) types.ius = true adj_decl["1&2+"](data, {stem}) insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) forms["nom_sg_m"] = arg1 if arg1 == "ipse" then add_form(forms, "nom_sg_n", stem, "ud{MED}") add_form(forms, "acc_sg_n", stem, "ud{MED}") else forms["nom_sg_n"] = stem .. "ud" forms["acc_sg_n"] = stem .. "ud" end forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} elseif arg1 == "illic" or arg1 == "istic" or arg1 == "isthic" then insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["gen_sg_m"] = stem .. "ī̆usce" forms["gen_sg_f"] = stem .. "ī̆usce" forms["gen_sg_n"] = stem .. "ī̆usce" forms["dat_sg_m"] = stem .. "īc" forms["dat_sg_f"] = stem .. "īc" forms["dat_sg_n"] = stem .. "īc" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. "ōc" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["nom_pl_m"] = stem .. "īsce" forms["nom_pl_f"] = stem .. "aec" forms["nom_pl_n"] = stem .. "aec" forms["gen_pl_m"] = stem .. "ōrunc{?}" forms["gen_pl_f"] = stem .. "ārunc{?}" forms["gen_ok_n"] = stem .. "ōrunc{?}" forms["dat_pl_m"] = stem .. "īsce" forms["dat_pl_f"] = stem .. "īsce" forms["dat_pl_n"] = stem .. "īsce" forms["acc_pl_m"] = stem .. "ōsce" forms["acc_pl_f"] = stem .. "āsce" forms["acc_pl_n"] = stem .. "aec" forms["abl_pl_m"] = stem .. "īsce" forms["abl_pl_f"] = stem .. "īsce" forms["abl_pl_n"] = stem .. "īsce" forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "hice" then insert_if_not(data.title, "demostrativo") -- .. " pronoun" forms["nom_sg_m"] = "hice" forms["nom_sg_f"] = "haece" forms["nom_sg_n"] = "hoce" forms["nom_pl_m"] = "hīce" forms["nom_pl_f"] = "haece" forms["nom_pl_n"] = "haece" forms["gen_sg_m"] = "huiusce" forms["gen_sg_f"] = "huiusce" forms["gen_sg_n"] = "huiusce" forms["gen_pl_m"] = {"hōrunce", "hōrumce"} forms["gen_pl_f"] = {"hārunce", "hārumce"} forms["gen_pl_n"] = {"hōrunce", "hōrumce"} forms["dat_sg_m"] = "huīce" forms["dat_sg_f"] = "huīce" forms["dat_sg_n"] = "huīce" forms["dat_pl_m"] = "hīsce" forms["dat_pl_f"] = "hīsce" forms["dat_pl_n"] = "hīsce" forms["acc_sg_m"] = "hunce" forms["acc_sg_f"] = "hance" forms["acc_sg_n"] = "hoce" forms["acc_pl_m"] = "hōsce" forms["acc_pl_f"] = "hāsce" forms["acc_pl_n"] = "haece" forms["abl_sg_m"] = "hōce" forms["abl_sg_f"] = "hāce" forms["abl_sg_n"] = "hōce" forms["abl_pl_m"] = "hīsce" forms["abl_pl_f"] = "hīsce" forms["abl_pl_n"] = "hīsce" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "plūs" then insert_if_not(data.title, "comparativo") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación con una terminación") data.note = "Ninguna de las formas en singular se usaron en latín clásico" forms["nom_sg_n"] = "plūs" forms["nom_pl_m"] = "plūrēs" forms["nom_pl_n"] = "plūra" forms["gen_sg_m"] = "plūris" forms["gen_sg_n"] = "plūris" forms["gen_pl_m"] = "plūrium" forms["gen_pl_n"] = "plūrium" forms["dat_sg_m"] = "plūrī" forms["dat_sg_n"] = "plūrī" forms["dat_pl_m"] = "plūribus" forms["dat_pl_n"] = "plūribus" forms["acc_sg_m"] = "plūrem" forms["acc_sg_f"] = "plūrem" forms["acc_sg_n"] = "plūs" forms["acc_pl_m"] = {"plūrēs", "plūrīs"} forms["acc_pl_n"] = "plūra" forms["abl_sg_m"] = {"plūrī", "plūre"} forms["abl_sg_f"] = {"plūrī", "plūre"} forms["abl_sg_n"] = {"plūrī", "plūre"} forms["abl_pl_m"] = "plūribus" forms["abl_pl_n"] = "plūribus" forms["voc_sg_n"] = "plūs" forms["voc_pl_m"] = "plūrēs" forms["voc_pl_n"] = "plūra" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif match(arg1, "^egō̆?$") or arg1 == "nōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "nōs" forms["gen_sg_m"] = "meī" forms["gen_pl_m"] = {"nostrī", "nostrum"} forms["dat_sg_m"] = "mihī̆" forms["dat_pl_m"] = "nōbīs" forms["acc_sg_m"] = {"mē", "mēmē"} forms["acc_pl_m"] = "nōs" forms["abl_sg_m"] = {"mē", "mēmē"} forms["abl_pl_m"] = "nōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "nōs" elseif arg1 == "tū" or arg1 == "vōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "vōs" forms["gen_sg_m"] = "tuī" forms["gen_pl_m"] = {"vestrī", "vestrum"} forms["dat_sg_m"] = "tibī̆" forms["dat_pl_m"] = "vōbīs" forms["acc_sg_m"] = {"tē", "tētē"} forms["acc_pl_m"] = "vōs" forms["abl_sg_m"] = {"tē", "tētē"} forms["abl_pl_m"] = "vōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "vōs" elseif arg1 == "suī" then insert_if_not(data.title, "pronombre reflexivo") forms["nom_sg_m"] = {} forms["nom_pl_m"] = {} forms["gen_sg_m"] = arg1 forms["gen_pl_m"] = forms["gen_sg_m"] forms["dat_sg_m"] = "sibī̆" forms["dat_pl_m"] = forms["dat_sg_m"] forms["acc_sg_m"] = {"sē", "sēsē"} forms["acc_pl_m"] = {"sē", "sēsē"} forms["abl_sg_m"] = {"sē", "sēsē"} forms["abl_pl_m"] = {"sē", "sēsē"} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} elseif arg1 == "is" or arg1 == "īdem" then insert_if_not(data.title, "pronombre demostrativo") forms["nom_sg_m"] = "is" forms["nom_sg_f"] = "ea" forms["nom_sg_n"] = "id" forms["nom_pl_m"] = {"iī", "eī", "ī"} forms["nom_pl_f"] = "eae" forms["nom_pl_n"] = "ea" forms["gen_sg_m"] = {"eius", "ejus"} forms["gen_sg_f"] = {"eius", "ejus"} forms["gen_sg_n"] = {"eius", "ejus"} forms["gen_pl_m"] = {"eōrum", "eum"} forms["gen_pl_f"] = "eārum" forms["gen_pl_n"] = {"eōrum", "eum"} forms["dat_sg_m"] = {"eī", "e͡i", "ēī"} forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"} forms["dat_sg_n"] = {"eī", "e͡i", "ēī"} forms["dat_pl_m"] = {"iīs", "eīs", "īs"} forms["dat_pl_f"] = {"iīs", "eīs", "īs", "eābus"} forms["dat_pl_n"] = {"iīs", "eīs", "īs"} forms["acc_sg_m"] = "eum" forms["acc_sg_f"] = "eam" forms["acc_sg_n"] = "id" forms["acc_pl_m"] = "eōs" forms["acc_pl_f"] = "eās" forms["acc_pl_n"] = "ea" forms["abl_sg_m"] = "eō" forms["abl_sg_f"] = "eā" forms["abl_sg_n"] = "eō" forms["abl_pl_m"] = {"iīs", "eīs", "īs"} forms["abl_pl_f"] = {"iīs", "eīs", "īs"} forms["abl_pl_n"] = {"iīs", "eīs", "īs"} if arg1 == "īdem" then forms["nom_sg_m"] = "ī" forms["nom_sg_n"] = "i" forms["acc_sg_n"] = "i" end elseif arg1 == "quis" or arg1 == "quī" then data.note = "La forma ''qua'' es preferida frente a ''quae'' cuando se usa como indefinido" local id = "id" if arg1 == "quī" then insert_if_not(data.title, "determinante relativo/interrogativo") id = "od" forms["nom_sg_m"] = {"quī", "quis", "quei{†}"} forms["nom_sg_f"] = {"quae", "qua"} forms["acc_sg_f"] = "quam" forms["abl_sg_m"] = "quō" forms["abl_sg_f"] = "quā" forms["abl_sg_n"] = "quō" else insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = {"quis", "quī"} forms["nom_sg_f"] = {"quae", "qua", "quis{†}"} forms["acc_sg_f"] = {"quam", "quem{†}"} forms["abl_sg_m"] = {"quō", "quī"} forms["abl_sg_f"] = {"quā", "quī"} forms["abl_sg_n"] = {"quō", "quī"} end forms["nom_sg_n"] = "qu"..id forms["nom_pl_m"] = {"quī", "quei{†}"} forms["nom_pl_f"] = "quae" forms["nom_pl_n"] = {"quae", "qua"} forms["gen_sg_m"] = {"cuius", "quoius{†}"} forms["gen_sg_f"] = {"cuius", "quoius{†}"} forms["gen_sg_n"] = {"cuius", "quoius{†}"} forms["gen_pl_m"] = "quōrum" forms["gen_pl_f"] = "quārum" forms["gen_pl_n"] = "quōrum" forms["dat_sg_m"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_f"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_n"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_n"] = {"quibus", "quīs", "queis{†}"} forms["acc_sg_m"] = "quem" forms["acc_sg_n"] = "qu"..id forms["acc_pl_m"] = "quōs" forms["acc_pl_f"] = "quās" forms["acc_pl_n"] = {"quae", "qua"} forms["abl_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_n"] = {"quibus", "quīs", "queis{†}"} elseif arg1 == "aliquī" then insert_if_not(data.title, "determinante indefinido") forms["nom_sg_m"] = {"aliquī{DET/ADJ}", "aliquis{PRON/SUST}"} forms["nom_sg_f"] = {"aliqua", "aliquae{R}"} forms["nom_sg_n"] = "aliquod" forms["nom_pl_m"] = "aliquī" forms["nom_pl_f"] = "aliquae" forms["nom_pl_n"] = "aliqua" forms["gen_sg_m"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_f"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_n"] = {"alicuius", "aliquoius{†}"} forms["gen_pl_m"] = "aliquōrum" forms["gen_pl_f"] = "aliquārum" forms["gen_pl_n"] = "aliquōrum" forms["dat_sg_m"] = {"alicui", "aliquoi{†}"} forms["dat_sg_f"] = {"alicui", "aliquoi{†}"} forms["dat_sg_n"] = {"alicui", "aliquoi{†}"} forms["dat_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["acc_sg_m"] = "aliquem" forms["acc_sg_f"] = "aliquam" forms["acc_sg_n"] = "aliquod" forms["acc_pl_m"] = "aliquōs" forms["acc_pl_f"] = "aliquās" forms["acc_pl_n"] = "aliqua" forms["abl_sg_m"] = "aliquō" forms["abl_sg_f"] = "aliquā" forms["abl_sg_n"] = "aliquō" forms["abl_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} elseif arg1 == "quisquam" then insert_if_not(data.title, "determinante indefinido, concordancia en negativo") data.note = "En latín clásico, era preferidas las formas de ''ūllus'' en lugar de las esta voz para el femenino y el neutro." forms["nom_sg_m"] = "quisquam" forms["nom_sg_f"] = {"quaequam", "quisquam{†}"} forms["nom_sg_n"] = "quodquam" forms["nom_pl_m"] = "quīquam" forms["nom_pl_f"] = "quaequam" forms["nom_pl_n"] = "quaequam" forms["gen_sg_m"] = "cuiusquam" forms["gen_sg_f"] = "cuiusquam" forms["gen_sg_n"] = "cuiusquam" forms["gen_pl_m"] = "quōrumquam" forms["gen_pl_f"] = "quārumquam" forms["gen_pl_n"] = "quōrumquam" forms["dat_sg_m"] = "cuiquam" forms["dat_sg_f"] = "cuiquam" forms["dat_sg_n"] = "cuiquam" forms["dat_pl_m"] = "quibusquam" forms["dat_pl_f"] = "quibusquam" forms["dat_pl_n"] = "quibusquam" forms["acc_sg_m"] = "quemquam" forms["acc_sg_f"] = {"quamquam", "quemquam{†}"} forms["acc_sg_n"] = "quodquam" forms["acc_pl_m"] = "quōsquam" forms["acc_pl_f"] = "quāsquam" forms["acc_pl_n"] = "quaequam" forms["abl_sg_m"] = {"quōquam", "quīquam{†}"} forms["abl_sg_f"] = "quāquam" forms["abl_sg_n"] = "quōquam" forms["abl_pl_m"] = "quibusquam" forms["abl_pl_f"] = "quibusquam" forms["abl_pl_n"] = "quibusquam" forms["voc_sg_m"] = "quisquam" forms["voc_sg_f"] = "quaequam" forms["voc_sg_n"] = "quodquam" forms["voc_pl_m"] = "quīquam" forms["voc_pl_f"] = "quaequam" forms["voc_pl_n"] = "quaequam" elseif arg1 == "quisquis" then insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = "quisquis" forms["nom_sg_f"] = "quisquis" forms["nom_sg_n"] = {"quidquid", "quicquid"} forms["nom_pl_m"] = "quīquī" forms["nom_pl_f"] = "quaequae" forms["nom_pl_n"] = "quaequae" forms["gen_sg_m"] = "cuiuscuius" forms["gen_sg_f"] = "cuiuscuius" forms["gen_sg_n"] = "cuiuscuius" forms["gen_pl_m"] = "quōrumquōrum" forms["gen_pl_f"] = "quārumquārum" forms["gen_pl_n"] = "quōrumquōrum" forms["dat_sg_m"] = "cuicui" forms["dat_sg_f"] = "cuicui" forms["dat_sg_n"] = "cuicui" forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"} forms["acc_sg_m"] = "quemquem" forms["acc_sg_f"] = "quamquam" forms["acc_sg_n"] = {"quidquid", "quicquid"} forms["acc_pl_m"] = "quōsquōs" forms["acc_pl_f"] = "quāsquās" forms["acc_pl_n"] = "quaequae" forms["abl_sg_m"] = "quōquō" forms["abl_sg_f"] = "quāquā" forms["abl_sg_n"] = "quōquō" forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"} forms["voc_sg_m"] = "quisquis" forms["voc_sg_f"] = "quisquis" forms["voc_sg_n"] = {"quidquid", "quicquid"} forms["voc_pl_m"] = "quīquī" forms["voc_pl_f"] = "quaequae" forms["voc_pl_n"] = "quaequae" elseif arg1 == "ecquis" then insert_if_not(data.title, "pronombre interrogativo") forms["nom_sg_m"] = {"ecquis", "ecquī"} forms["nom_sg_f"] = {"ecqua", "ecquae"} forms["nom_sg_n"] = "ecquid" forms["nom_pl_m"] = "ecquī" forms["nom_pl_f"] = "ecquae" forms["nom_pl_n"] = {"ecqua", "ecquae"} forms["gen_sg_m"] = "eccuius" forms["gen_sg_f"] = "eccuius" forms["gen_sg_n"] = "eccuius" forms["dat_sg_m"] = "eccui" forms["dat_sg_f"] = "eccui" forms["dat_sg_n"] = "eccui" forms["acc_sg_m"] = "ecquem" forms["acc_sg_f"] = "ecquam" forms["acc_sg_n"] = "ecquod" forms["acc_pl_m"] = "ecquōs" forms["acc_pl_f"] = "ecquās" forms["acc_pl_n"] = {"ecqua", "ecquae"} forms["abl_sg_m"] = {"ecquō", "ecquī"} forms["abl_sg_f"] = {"ecquā", "ecquī"} forms["abl_sg_n"] = {"ecquō", "ecquī"} elseif arg1 == "quīdam" then insert_if_not(data.title, "pronombre indefinido") forms["nom_sg_m"] = "quīdam" forms["nom_sg_f"] = "quaedam" forms["nom_sg_n"] = "quiddam" forms["nom_pl_m"] = {"quīdam", "quēsdam{†}"} forms["nom_pl_f"] = "quaedam" forms["nom_pl_n"] = "quaedam" forms["gen_sg_m"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_f"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_n"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_pl_m"] = {"quōrundam", "quōrumdam"} forms["gen_pl_f"] = {"quārundam", "quārumdam"} forms["gen_pl_n"] = {"quōrundam", "quōrumdam"} forms["dat_sg_m"] = {"cuidam", "quoidam{†}"} forms["dat_sg_f"] = {"cuidam", "quoidam{†}"} forms["dat_sg_n"] = {"cuidam", "quoidam{†}"} forms["dat_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_n"] = {"quibusdam", "quīsdam{†}"} forms["acc_sg_m"] = {"quendam", "quemdam"} forms["acc_sg_f"] = {"quandam", "quamdam"} forms["acc_sg_n"] = "quiddam" forms["acc_pl_m"] = {"quōsdam", "quēsdam{†}"} forms["acc_pl_f"] = "quāsdam" forms["acc_pl_n"] = "quaedam" forms["abl_sg_m"] = "quōdam" forms["abl_sg_f"] = "quādam" forms["abl_sg_n"] = "quōdam" forms["abl_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_n"] = {"quibusdam", "quīsdam{†}"} elseif arg1 == "nēmō" then insert_if_not(data.title, "Determinante y pronombre, concordancia en negativo") forms["nom_sg_m"] = "nēmō" forms["nom_sg_f"] = "nēmō" forms["gen_sg_m"] = {"nūllī̆us", "nēminis{R}"} forms["gen_sg_f"] = {"nūllī̆us", "nēminis{R}"} forms["dat_sg_m"] = "nēminī" forms["dat_sg_f"] = "nēminī" forms["acc_sg_m"] = "nēminem" forms["acc_sg_f"] = "nēminem" forms["abl_sg_m"] = {"nūllō", "nēmine{R}"} forms["abl_sg_f"] = {"nūllā", "nēmine{R}"} else error('adjective ' .. arg1 .. ' not recognized') end end local function extract_base(lemma, ending) if ending:find("(", nil, true) then return match(lemma, ending) end return match(lemma, "^(.*)" .. ending .. "$") end local function get_noun_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local subtypes = ending_and_subtypes[2] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. -- In addition, M or F as a subtype is canceled by N, and -- vice-versa, but M doesn't cancel F or vice-versa; instead, -- we simply ignore the conflicting gender specification when -- constructing the combination of specified and inferred subtypes. -- The reason for this is that neuters have distinct declensions -- from masculines and feminines, but masculines and feminines have -- the same declension, and various nouns in Latin that are -- normally masculine are exceptionally feminine and vice-versa -- (nauta, agricola, fraxinus, malus "apple tree", manus, rēs, -- etc.). -- -- In addition, sg as a subtype is canceled by pl and vice-versa. -- It's also possible to specify both, which will override sg but -- not cancel it (in the sense that it won't prevent the relevant -- rule from matching). For example, there's a rule specifying that -- lemmas beginning with a capital letter and ending in -ius take -- the ius.voci.sg subtypes. Specifying such a lemma with the -- subtype both will result in the ius.voci.both subtypes, whereas -- specifying such a lemma with the subtype pl will cause this rule -- not to match, and it will fall through to a less specific rule -- that returns just the ius subtype, which will be combined with -- the explicitly specified pl subtype to produce ius.pl. if specified_subtypes["-" .. subtype] or subtype == "N" and (specified_subtypes.M or specified_subtypes.F) or (subtype == "M" or subtype == "F") and specified_subtypes.N or subtype == "sg" and specified_subtypes.pl or subtype == "pl" and specified_subtypes.sg then not_this_subtype = true break end end end if not not_this_subtype then if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] local base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending == stem2 then return base, stem2, subtypes end else local base = extract_base(lemma, ending) if base then return base, stem2, subtypes end end end end if decltype then error("Unrecognized ending for declension-" .. decltype .. " noun: " .. lemma) end return lemma, stem2, keys_to_list(specified_subtypes) end local patterns = { {"[mM]a", "%0t"}, {"e", ""}, {"([aoAO])([lr])", "%1" .. MACRON .. "%2"}, {"[eE]l", "%0l"}, {"([mM])en", "%1in"}, {"([tT]ūd)ō", "%1in"}, {"([gG])ō", "%1in"}, {"[ōŌ]", "%1n"}, {"er", "r"}, {"[ēi]s", ""}, {"([āēīōūȳĀĒĪŌŪȲ]n)s", function(v) return (gsub(toNFD(v), MACRON, "") .. "t") end}, {"([cC])eps", "%1ipit"}, {"([bp])s", "%1"}, {"us", "or"}, {"s", "t"}, {"ex", "ic"}, {"x", "c"}, } local function make_stem2(stem) local n for _, pattern in ipairs(patterns) do local key = pattern[1] stem, n = gsub(stem, key .. "$", pattern[2]) if n > 0 then -- debug_track("la-utilities/" .. key) REVISAR return toNFC(stem) end end -- debug_track("la-utilities") REVISAR return stem end local function detect_noun_subtype(lemma, stem2, typ, subtypes) local base, _ if typ == "1" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ām", {"F", "am"}}, {"ās", {"M", "Greek", "Ma"}}, {"ēs", {"M", "Greek", "Me"}}, {"ē", {"F", "Greek"}}, {"ae", {"F", "pl"}}, {"a", {"F"}}, }) elseif typ == "2" then local detected_subtypes lemma, stem2, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(.*r)$", {"M", "er"}}, {"^(.*v)os$", {"M", "vos"}}, {"^(.*v)om$", {"N", "vom"}}, -- If the lemma ends in -os and the user said N or -M, then the -- following won't apply, and the second (neuter) -os will applly. {"os", {"M", "Greek"}}, {"os", {"N", "Greek", "us"}}, {"on", {"N", "Greek"}}, -- -ius beginning with a capital letter is assumed a proper name, -- and takes the voci subtype (vocative in -ī) along with the ius -- subtype and sg-only. Other nouns in -ius just take the ius -- subtype. Explicitly specify "sg" so that if .pl is given, -- this rule won't apply. {"^(%u.*)ius$", {"M", "ius", "voci", "sg"}}, {"ius", {"M", "ius"}}, {"ium", {"N", "ium"}}, -- If the lemma ends in -us and the user said N or -M, then the -- following won't apply, and the second (neuter) -us will applly. {"us", {"M"}}, {"us", {"N", "us"}}, {"um", {"N"}}, {"iī", {"M", "ius", "pl"}}, {"ia", {"N", "ium", "pl"}}, -- If the lemma ends in -ī and the user said N or -M, then the -- following won't apply, and the second (neuter) -ī will applly. {"ī", {"M", "pl"}}, {"ī", {"N", "us", "pl"}}, {"oe", {"M", "Greek", "pl"}}, {"a", {"N", "pl"}}, }) stem2 = stem2 or lemma return lemma, stem2, detected_subtypes elseif typ == "3" then if subtypes.pl then if subtypes.Greek then base = lemma:match("^(.*)erēs$") if base then return base .. "ēr", base .. "er", {"er"} end base = lemma:match("^(.*)ontēs$") if base then return base .. "ōn", base .. "ont", {"on"} end base = lemma:match("^(.*)es$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural Greek noun: " .. lemma) end base = lemma:match("^(.*)ia$") if base then return base, stem2 or base, {"N", "I", "pure"} end base = lemma:match("^(.*)a$") if base then return base, stem2 or base, {"N"} end base = lemma:match("^(.*)ēs$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural noun: " .. lemma) end stem2 = stem2 or make_stem2(lemma) local detected_subtypes if subtypes.Greek then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"is", ""}, {"I"}}, {"ēr", {"er"}}, {"ōn", {"on"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} end if not subtypes.N then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"^(%u.*pol)is$", ""}, {"F", "polis", "sg", "loc"}}, {{"tūdō", "tūdin"}, {"F"}}, {{"tās", "tāt"}, {"F"}}, {{"tūs", "tūt"}, {"F"}}, {{"tiō", "tiōn"}, {"F"}}, {{"siō", "siōn"}, {"F"}}, {{"xiō", "xiōn"}, {"F"}}, {{"gō", "gin"}, {"F"}}, {{"or", "ōr"}, {"M"}}, {{"tr[iī]x", "trīc"}, {"F"}}, {{"is", ""}, {"I"}}, {{"^(%l.*)ēs$", ""}, {"I"}}, }) if base then return lemma, stem2, detected_subtypes end end base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"us", "or"}, {"N"}}, {{"us", "er"}, {"N"}}, {{"ma", "mat"}, {"N"}}, {{"men", "min"}, {"N"}}, {{"^(%u.*)e$", ""}, {"N", "sg"}}, {{"e", ""}, {"N", "I", "pure"}}, {{"al", "āl"}, {"N", "I", "pure"}}, {{"ar", "ār"}, {"N", "I", "pure"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} elseif typ == "4" then if subtypes.echo or subtypes.Callisto then base = lemma:match("^(.*)ō$") if not base then error("Declension-4 noun of subtype .echo or .Callisto should end in -ō: " .. lemma) end if subtypes.Callisto then return base, nil, {"F", "sg"} else return base, nil, {"F"} end end return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", {"M"}}, {"ū̆", {"N"}}, {"ūs", {"M", "pl"}}, {"ua", {"N", "pl"}}, }) elseif typ == "5" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"iēs", {"F", "i"}}, {"iēs", {"F", "i", "pl"}}, {"ēs", {"F"}}, {"ēs", {"F", "pl"}}, }) elseif typ == "sgpl" then return lemma, stem2, {} elseif typ == "irreg" and lemma == "domus" then -- [[domus]] auto-sets data.loc = true, but we need to know this -- before declining the noun so we can propagate it to other segments. return lemma, nil, {"loc"} elseif typ == "indecl" or typ == "irreg" and ( lemma == "Deus" or match(lemma, "^[IJ]ēs[uū]s$") or lemma == "Athōs" or lemma == "vēnum" ) then -- Indeclinable nouns, and certain irregular nouns, set data.num = "sg", -- but we need to know this before declining the noun so we can -- propagate it to other segments. return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", {"both"}}, {"", {"sg"}}, {"", {"pl"}}, }) elseif typ == "indecl" or typ == "irreg" then return lemma, nil, {} else return nil, nil, {} end end -- Given ENDINGS_AND_SUBTYPES (a list of four-tuples of ENDING, RETTYPE, -- SUBTYPES, PROCESS_RETVAL), check each ENDING in turn against LEMMA and -- STEM2. If it matches, return a four-tuple BASE, STEM2, RETTYPE, NEW_SUBTYPES -- where BASE is normally the remainder of LEMMA minus the ending, STEM2 is -- as passed in, RETTYPE is as passed in, and NEW_SUBTYPES is the same as -- SUBTYPES minus any subtypes beginning with a hyphen. If no endings match, -- throw an error if DECLTYPPE is non-nil, mentioning the DECLTYPE -- (user-specified declension); but if DECLTYPE is nil, just return the tuple -- nil, nil, nil, nil. -- -- In order for a given entry to match, ENDING must match and also the subtypes -- in SUBTYPES (a list) must not be incompatible with the passed-in -- user-specified subtypes SPECIFIED_SUBTYPES (a set, i.e. a table where the -- keys are strings and the value is always true). "Incompatible" means that -- a given SUBTYPE is specified in either one and -SUBTYPE in the other, or -- that "pl" is found in SPECIFIED_SUBTYPES and not in SUBTYPES. -- -- The ending spec in ENDINGS_AND_SUBTYPES is one of the following: -- -- 1. A simple string, e.g. "tūdō", specifying an ending. -- 2. A regex that should match the entire lemma (it should be anchored at -- the beginning with ^ and at the end with $), and contains a single -- capturing group to match the base. -- 3. A pair {SIMPLE_STRING_OR_REGEX, STEM2_ENDING} where -- SIMPLE_STRING_OR_REGEX is one of the previous two possibilities and -- STEM2_ENDING is a string specifying the corresponding ending that must -- be present in STEM2. If this form is used, the combination of -- base + STEM2_ENDING must exactly match STEM2 in order for this entry -- to be considered a match. An example is {"is", ""}, which will match -- lemma == "follis", stem2 == "foll", but not lemma == "lapis", -- stem2 == "lapid". -- -- If PROCESS_STEM2 is given and the returned STEM2 would be nil, call -- process_stem2(BASE) to get the STEM2 to return. local function get_adj_type_and_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes, process_stem2) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local rettype = ending_and_subtypes[2] local subtypes = ending_and_subtypes[3] local process_retval = ending_and_subtypes[4] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. if specified_subtypes["-" .. subtype] then not_this_subtype = true break end -- A subtype is canceled if the user specified SUBTYPE and -- -SUBTYPE is given in the to-be-returned subtypes. local must_not_be_present = subtype:match("^%-(.*)$") if must_not_be_present and specified_subtypes[must_not_be_present] then not_this_subtype = true break end end end if not not_this_subtype then local base if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending ~= stem2 then base = nil end else base = extract_base(lemma, ending) end if base then -- Remove subtypes of the form -SUBTYPE from the subtypes -- to be returned. local new_subtypes = {} for _, subtype in ipairs(subtypes) do if subtype:sub(1, 1) ~= "-" then insert(new_subtypes, subtype) end end if process_retval then base, stem2 = process_retval(base, stem2) end if process_stem2 then stem2 = stem2 or process_stem2(base) end return base, stem2, rettype, new_subtypes end end end if not decltype then return lemma, stem2, nil, keys_to_list(specified_subtypes) elseif decltype == "" then error("Unrecognized ending for adjective: " .. lemma) else error("Unrecognized ending for declension-" .. decltype .. " adjective: " .. lemma) end end -- Autodetect the type and subtype of an adjective given all the information -- specified by the user: lemma, stem2, declension type and specified subtypes. -- Four values are returned: the lemma base (i.e. the stem of the lemma, as -- required by the declension functions), the value of stem2 to pass to the -- declension function, the declension type and the autodetected subtypes. -- Note that this will not detect a given subtype if -SUBTYPE is specified for -- any subtype that would be returned, or if SUBTYPE is specified and -SUBTYPE -- is among the subtypes that would be returned (such subtypes are filtered out -- of the returned subtypes). local function detect_adj_type_and_subtype(lemma, stem2, typ, subtypes) local function base_as_stem2(base, stem2) return base, base end local function constant_base(baseval) return function(base, stem2) return baseval, nil end end local function decl12_stem2(base) return base end local function decl3_stem2(base) return make_stem2(base) end local decl12_entries = { {"us", "1&2+", {}}, {"a", "1&2+", {}}, {"um", "1&2+", {}}, {"ī", "1&2+", {"pl"}}, {"ae", "1&2+", {"pl"}}, {"a", "1&2+", {"pl"}}, -- Nearly all -os adjectives are greekA {"os", "1&2+", {"greekA", "-greekE"}}, {"os", "1&2+", {"greekE", "-greekA"}}, {"ē", "1&2+", {"greekE", "-greekA"}}, {"on", "1&2+", {"greekA", "-greekE"}}, {"on", "1&2+", {"greekE", "-greekA"}}, {"^(.*er)$", "1&2+", {"er"}}, {"^(.*ur)$", "1&2+", {"er"}}, {"^(h)ic$", "1&2+", {"ic"}}, } local decl3_entries = { {"^(.*er)$", "3-3+", {"I"}}, {"^(.*er)$", "3-3+", {}}, {"is", "3-2+", {"I"}}, {"is", "3-2+", {}}, {"e", "3-2+", {"I"}}, {"e", "3-2+", {}}, {"^(.*[ij])or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(.*[ij])or$", "3-C+", {}}, {"^(min)or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(min)or$", "3-C+", {}}, {"^(.*trīx)$", "3-def+", {"trix", "abl_i_e", "-abl_e_i"}}, {"^(.*trīx)$", "3-def+", {"trix"}}, {"^(.*tor)$", "3-def+", {"tor", "abl_i_e", "-abl_e_i"}}, {"^(.*tor)$", "3-def+", {"tor"}}, -- Detect -ēs as 3-1 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like quadripēs, volucripēs). -- Essentially, for declension-3 adjectives, we require that -- .pl is given if the lemma is plural. -- -- Most 3-1 adjectives are i-stem (e.g. audāx) so we require -I -- to be given with non-i-stem adjectives. The first entry below -- will apply when -I isn't given, the second when it is given. {"^(.*ēs)$", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"I"}}, {"^(.*ēs)$", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"par"}}, {"^(.*[ij])ōrēs$", "3-C+", {"pl"}}, {"^(min)ōrēs$", "3-C+", {"pl"}}, -- If .pl with -ēs, we don't know if the adjective is 3-1, 3-2 -- or 3-3. Since 3-2 is probably the most common, we infer it -- (as well as the fact that these adjectives *are* in a sense -- 3-2 since they have a distinct neuter in -(i)a. Note that -- we have two entries here; the first one will apply unless -- -I is given, and will infer an i-stem adjective; the second -- one will apply otherwise (and infer a non-i-stem 3-1 adjective). {"ēs", "3-2+", {"pl", "I"}, base_as_stem2}, {"ēs", "3-1+", {"pl", "par"}, base_as_stem2}, -- Same for neuters. {"ia", "3-2+", {"pl", "I"}, base_as_stem2}, {"a", "3-1+", {"pl", "par"}, base_as_stem2}, -- As above for -ēs but for miscellaneous singulars. {"", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"I"}}, {"", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"par"}}, } local function get_subtypes_and_endings(typ, f) local subtypes_and_endings = {} for _, v in ipairs(decl3_entries) do if f(v) then v = deep_copy(v) v[2] = typ insert(subtypes_and_endings, v) end end return subtypes_and_endings end local function compare(spec) return spec[2] == typ end if typ == "+" then local base, new_stem2, rettype, new_subtypes = get_adj_type_and_subtype_by_ending(lemma, stem2, nil, subtypes, decl12_entries, decl12_stem2) if rettype then return base, new_stem2, rettype, new_subtypes else return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) end elseif typ == "3+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) elseif typ == "1&2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl12_entries, decl12_stem2) elseif typ == "1-1+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"a", typ, {}}, {"ae", typ, {"pl"}}, }) elseif typ == "2-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", typ, {}}, {"um", typ, {}}, {"ī", typ, {"pl"}}, {"a", typ, {"pl"}}, {"os", typ, {"greek"}}, {"on", typ, {"greek"}}, {"oe", typ, {"greek", "pl"}}, }) elseif typ == "3-1+" then -- Use the specs from `decl3_entries`, but add the two i-stem 3-2+ specs when plural-only, as they're the same when 3-1+. local subtypes_and_endings = get_subtypes_and_endings(typ, function(spec) local spec1, spec2 = spec[1], spec[2] return spec2 == typ or (spec2 == "3-2+" and spec1 == "ēs" or spec1 == "ia") end) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-def+" then -- Like 3-1+ but defective in gender local subtypes_and_endings = get_subtypes_and_endings(typ, compare) insert(subtypes_and_endings, {"", typ, {"I"}}) insert(subtypes_and_endings, {"", typ, {"par"}}) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"is", typ, {}}, {"e", typ, {}}, -- Detect -ēs as 3-2 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like isoscelēs). Essentially, -- for declension-3 adjectives, we require that .pl is given -- if the lemma is plural. {"ēs", typ, {}}, {"ēs", typ, {"pl"}}, {"ia", typ, {"pl"}}, }, decl3_stem2) elseif typ == "3-3+" or typ == "3-P+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ēs", typ, {"pl"}, base_as_stem2}, {"ia", typ, {"pl"}, base_as_stem2}, {"", typ, {}}, }, decl3_stem2) elseif typ == "3-C+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, get_subtypes_and_endings(typ, compare), decl3_stem2) elseif typ == "irreg+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(duo)$", typ, {"pl"}}, {"^(ambō)$", typ, {"pl"}}, {"^(mīll?ia)$", typ, {"N", "pl"}, constant_base("mīlle")}, -- match ea {"^(ea)$", typ, {}, constant_base("is")}, -- match id {"^(id)$", typ, {}, constant_base("is")}, -- match plural eī, iī {"^([ei]ī)$", typ, {"pl"}, constant_base("is")}, -- match plural ea, eae {"^(eae?)$", typ, {"pl"}, constant_base("is")}, -- match eadem {"^(eadem)$", typ, {}, constant_base("īdem")}, -- match īdem, idem {"^([īi]dem)$", typ, {}, constant_base("īdem")}, -- match plural īdem {"^(īdem)$", typ, {"pl"}}, -- match plural eadem, eaedem {"^(eae?dem)$", typ, {"pl"}, constant_base("īdem")}, -- match illa, ipsa, ista; it doesn't matter if we overmatch because -- we'll get an error as we use the stem itself in the returned base {"^(i[lps][lst])a$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match illud, istud; as above, it doesn't matter if we overmatch {"^(i[ls][lt])ud$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match ipsum {"^(ipsum)$", typ, {}, constant_base("ipse")}, -- match plural illī, ipsī, istī; as above, it doesn't matter if we -- overmatch {"^(i[lps][lst])ī$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- match plural illa, illae, ipsa, ipsae, ista, istae; as above, it -- doesn't matter if we overmatch {"^(i[lps][lst])ae?$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- Detect quī as non-plural unless .pl specified. {"^(quī)$", typ, {}}, -- Otherwise detect quī as plural. {"^(quī)$", typ, {"pl"}}, -- Same for quae. {"^(quae)$", typ, {}, constant_base("quī")}, {"^(quae)$", typ, {"pl"}, constant_base("quī")}, {"^(quid)$", typ, {}, constant_base("quis")}, {"^(quod)$", typ, {}, constant_base("quī")}, {"^(qui[cd]quid)$", typ, {}, constant_base("quisquis")}, {"^(quīquī)$", typ, {"pl"}, constant_base("quisquis")}, {"^(quaequae)$", typ, {"pl"}, constant_base("quisquis")}, -- match all remaining lemmas in lemma form {"", typ, {}}, }) elseif typ == "indecl+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", typ, {"both"}}, {"", typ, {"sg"}}, {"", typ, {"pl"}}, }) else -- 0+ return lemma, nil, typ, {} end end local noun_lb = { nom_sg = "sg.", gen_sg = "sg.", dat_sg = "sg.", acc_sg = "sg.", abl_sg = "sg.", voc_sg = "sg.", loc_sg = "sg.", nom_pl = "pl.", gen_pl = "pl.", dat_pl = "pl.", acc_pl = "pl.", abl_pl = "pl.", voc_pl = "pl.", loc_pl = "pl." } function export.sust(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de = "num"}, ["nota"] = {}, } for form,_ in pairs(noun_lb) do params[form] = {lista=true} end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local genero local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, detected_subtypes = detect_noun_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end if not genero then if types.M then genero = "m" end if types.N then genero = "n" end if types.F then genero = "f" end end local es_adj if not r1 and genero then local typ r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) if r1 then c = typ es_adj = true end end assert(r1, "forma no reconocida: "..r[1]) local cb = es_adj and adj_decl[c] or noun_decl[c] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) if es_adj then local forms_ = {} for form,arr in pairs(data.forms) do local f1, f2 = form:match("^(.*)(_"..genero..")$") if f1 then forms_[f1] = arr end end data.forms = forms_ end if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, noun_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if declinfo["loc_sg"] and #declinfo["loc_sg"] == 0 then declinfo["loc_sg"] = nil end if declinfo["loc_pl"] and #declinfo["loc_pl"] == 0 then declinfo["loc_pl"] = nil end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local forms = sobreescribir_formas(declinfo, args, false, {}) comprobar_defectivo(forms, {}) forms = desactivar_formas(forms, function (form) return (form:find("pl$") and nopl) or (form:find("sg$") and nosg) end ) local raiz_nom = f(forms["nom_sg"][1] or forms["nom_pl"][1] or "?") local raiz_gen = f(forms["gen_sg"][1] or forms["gen_pl"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, noun_lb) local t = {} insert(t, {{""}, {"Singular"}, {"Plural"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg"], forms["nom_pl"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg"], forms["gen_pl"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg"], forms["dat_pl"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg"], forms["acc_pl"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg"], forms["abl_pl"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg"], forms["voc_pl"]}) if (forms["loc_sg"] and forms["loc_sg"][1]) or (forms["loc_pl"] and forms["loc_pl"][1]) then insert(t, {{"Locativo", header=true, color=COLOR_H}, forms["loc_sg"], forms["loc_pl"]}) end insert(t, {{args["nota"] or "", colspan=3}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_nom..", "..raiz_gen.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local adj_lb = { nom_sg_m = "m.", nom_sg_n = "n.", nom_sg_f = "f.", nom_pl_m = "m.", nom_pl_n = "n.", nom_pl_f = "f.", gen_sg_m = "m.", gen_sg_n = "n.", gen_sg_f = "f.", gen_pl_m = "m.", gen_pl_n = "n.", gen_pl_f = "f.", dat_sg_m = "m.", dat_sg_n = "n.", dat_sg_f = "f.", dat_pl_m = "m.", dat_pl_n = "n.", dat_pl_f = "f.", acc_sg_m = "m.", acc_sg_n = "n.", acc_sg_f = "f.", acc_pl_m = "m.", acc_pl_n = "n.", acc_pl_f = "f.", abl_sg_m = "m.", abl_sg_n = "n.", abl_sg_f = "f.", abl_pl_m = "m.", abl_pl_n = "n.", abl_pl_f = "f.", voc_sg_m = "m.", voc_sg_n = "n.", voc_sg_f = "f.", voc_pl_m = "m.", voc_pl_n = "n.", voc_pl_f = "f.", } function export.adj(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de="num"}, ["gen"] = {por_defecto="mfn"}, ["nota"] = {}, } for form,_ in pairs(adj_lb) do params[form] = {lista=true} end params["dat_pl"] = {lista=true} params["abl_pl"] = {lista=true} params["loc_pl"] = {lista=true} local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) if args["dat_pl"][1] then args["dat_pl_m"] = deep_copy(args["dat_pl"]) args["dat_pl_n"] = deep_copy(args["dat_pl"]) args["dat_pl_f"] = deep_copy(args["dat_pl"]) end if args["abl_pl"][1] then args["abl_pl_m"] = deep_copy(args["abl_pl"]) args["abl_pl_n"] = deep_copy(args["abl_pl"]) args["abl_pl_f"] = deep_copy(args["abl_pl"]) end if args["loc_pl"][1] then args["loc_pl_m"] = deep_copy(args["loc_pl"]) args["loc_pl_n"] = deep_copy(args["loc_pl"]) args["loc_pl_f"] = deep_copy(args["loc_pl"]) end args["dat_pl"] = nil args["abl_pl"] = nil args["loc_pl"] = nil assert(not find(title, " "), "locuciones no soportadas aún") -- REVISAR local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") a = a or subarg b = b or "+" local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end local cb = adj_decl[typ] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) local formas_ = {} -- necesario crear otro arreglo para no modificar las claves durante la iteración for form,arr in pairs(data.forms) do local pref = match(form, "^(.*)_m$") if pref and not data.forms[pref.."_f"] then formas_[pref.."_f"] = deep_copy(arr) end if pref and not data.forms[pref.."_n"] then formas_[pref.."_n"] = deep_copy(arr) end formas_[form] = arr end data.forms = formas_ if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, adj_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local m = find(args["gen"], "m") local fem = find(args["gen"], "f") local n = find(args["gen"], "n") local forms = sobreescribir_formas(declinfo, args, false, {}, adj_lb) comprobar_defectivo(forms) forms = desactivar_formas(forms, function (form) return (form:find("pl") and nopl) or (form:find("sg") and nosg) or (form:find("m$") and not m) or (form:find("f$") and not fem) or (form:find("n$") and not n) end ) local raiz_m = f(forms["nom_sg_m"][1] or forms["nom_pl_m"][1] or "?") local raiz_f = f(forms["nom_sg_f"][1] or forms["nom_pl_f"][1] or "?") local raiz_n = f(forms["nom_sg_n"][1] or forms["nom_pl_n"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, adj_lb) local t = {} insert(t, {{"Singular", colspan=4}, header=true, color=COLOR_H}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg_m"], forms["nom_sg_f"], forms["nom_sg_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg_m"], forms["gen_sg_f"], forms["gen_sg_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg_m"], forms["dat_sg_f"], forms["dat_sg_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg_m"], forms["acc_sg_f"], forms["acc_sg_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg_m"], forms["abl_sg_f"], forms["abl_sg_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg_m"], forms["voc_sg_f"], forms["voc_sg_n"]}) insert(t, {{"Plural", colspan=4, header=true, color=COLOR_H}}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_pl_m"], forms["nom_pl_f"], forms["nom_pl_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_pl_m"], forms["gen_pl_f"], forms["gen_pl_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_pl_m"], forms["dat_pl_f"], forms["dat_pl_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_pl_m"], forms["acc_pl_f"], forms["acc_pl_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_pl_m"], forms["abl_pl_f"], forms["abl_pl_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_pl_m"], forms["voc_pl_f"], forms["voc_pl_n"]}) insert(t, {{args["nota"] or "", colspan=4}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_m..", "..raiz_f..", "..raiz_n.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local EGO, TU, IS, NOS, VOS, EI = 1, 2, 3, 4, 5, 6 local tostr = {"1", "2", "3", "4", "5", "6"} local PRONOMBRES = {"ego", "tū", "is, ea, id", "nōs", "vōs", "eī, eae, ea"} local PRONOMBRES_SUBJ = {"ut ego", "ut tū", "ut is, ut ea, ut id", "ut nōs", "ut vōs", "ut eī, ut eae, ut ea"} local PRONOMBRES_IMP = {"―", "(tū)", "(is, ea, id)", "―", "(vōs)", "(eī, eae, ea)"} local IMPERSONALES = {"", "", "(id)", "", "", ""} local function obtener_pronombre(forma, impers) local conj, p = match(forma, "^(.*)(%d)$") if not p then return nil end p = tonumber(p) if impers then return IMPERSONALES[p] else if find(conj, "^subj") then return PRONOMBRES_SUBJ[p] end if find(conj, "^imper") then return PRONOMBRES_IMP[p] end return PRONOMBRES[p] end end local sufijos = { ["1"] = { inf_act = {"āre","isse"}, inf_pas = {"ārī"}, part_act = {"āns","ūrus"}, part_pas = {"andus","us"}, ger = {"andī","andō","andum"}, sup = {"um","ū"}, ind_pres = {"ō","ās","at","āmus","ātis","ant"}, ind_imp = {"ābam","ābās","ābat","ābāmus","ābātis","ābant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ābō","ābis","ābit","ābimus","ābitis","ābunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","āris","ātur","āmur","āminī","antur", nil,"āre"}, ind_imp_pas = {"ābar","ābāris","ābātur","ābāmur","ābāminī","ābantur", nil,"ābāre"}, ind_fut_pas = {"ābor","āberis","ābitur","ābimur","ābiminī","ābuntur", nil,"ābere"}, subj_pres = {"em","ēs","et","ēmus","ētis","ent"}, subj_imp = {"ārem","ārēs","āret","ārēmus","ārētis","ārent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"er","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_imp_pas = {"ārer","ārēris","ārētur","ārēmur","ārēminī","ārentur", nil,"ārēre"}, imper_pres = {nil,"ā",nil,nil,"āte",nil}, imper_fut = {nil,"ātō","ātō",nil,"ātōte","antō"}, imper_pres_pas = {nil,"āre",nil,nil,"āminī",nil}, imper_fut_pas = {nil,"ātor","ātor",nil,nil,"antor"}, }, ["2"] = { inf_act = {"ēre","isse"}, inf_pas = {"ērī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"eō","ēs","et","ēmus","ētis","ent"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ēbō","ēbis","ēbit","ēbimus","ēbitis","ēbunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"eor","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ēbor","ēberis","ēbitur","ēbimur","ēbiminī","ēbuntur", nil,"ēbere"}, subj_pres = {"eam","eās","eat","eāmus","eātis","eant"}, subj_imp = {"ērem","ērēs","ēret","ērēmus","ērētis","ērent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ear","eāris","eātur","eāmur","eāminī","eantur", nil,"eāre"}, subj_imp_pas = {"ērer","ērēris","ērētur","ērēmur","ērēminī","ērentur", nil,"ērēre"}, imper_pres = {nil,"ē",nil,nil,"ēte",nil}, imper_fut = {nil,"ētō","ētō",nil,"ētōte","entō"}, imper_pres_pas = {nil,"ēre",nil,nil,"ēminī",nil}, imper_fut_pas = {nil,"ētor","ētor",nil,nil,"entor"}, }, ["3"] = { -- 3 (comparar [[capio]] con [[lego]], las raíces con capi- y leg- pero hay que eliminar la doble ii) inf_act = {"ere","isse"}, inf_pas = {"ī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", nil,"ere"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_pres = {"am","ās","at","āmus","ātis","ant"}, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", nil,"āre"}, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", nil,"erēre"}, imper_pres = {nil,"e",nil,nil,"ite",nil}, imper_fut = {nil,"itō","itō",nil,"itōte","untō"}, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil}, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor"}, }, ["3/4"] = { inf_act = {"ere","isse","īre","isse"}, inf_pas = {"ī","īrī"}, part_act = {"ēns","iēns","ūrus"}, part_pas = {"endus","iendus","us"}, ger = {"endī","endō","endum","iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt", "iō","īs",nil,"īmus","ītis","iunt" }, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant", "iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant" }, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent", "iam","iēs","iet","iēmus","iētis","ient" }, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", "ior","ere","ītur","īmur","īminī","iuntur", nil,"īris",nil,nil,nil,nil, nil,"īre" }, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", "iēbar","ēbāre","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāris",nil,nil,nil,nil, nil,"iēbāre" }, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", "iar","ēre","iētur","iēmur","iēminī","ientur", nil,"iēris",nil,nil,nil,nil, nil,"iēre" }, subj_pres = {"am","ās","at","āmus","ātis","ant", "iam","iās","iat","iāmus","iātis","iant", }, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent", "īrem","īrēs","īret","īrēmus","īrētis","īrent" }, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", "iar","āre","iātur","iāmur","iāminī","iantur", nil,"iāris",nil,nil,nil,nil, nil,"iāre" }, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", "īrer","erēre","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēris",nil,nil,nil,nil, nil,"īrēre" }, imper_pres = {nil,"e",nil,nil,"ite",nil, nil,"ī",nil,nil,"īte",nil }, imper_fut = {nil,"itō","itō",nil,"itōte","untō", nil,"ītō","ītō",nil,"ītōte","iuntō" }, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil, nil,"īre",nil,nil,"īminī",nil }, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor", nil,"ītor","ītor",nil,nil,"iuntor" }, }, ["4"] = { inf_act = {"īre","isse"}, inf_pas = {"īrī"}, part_act = {"iēns","ūrus"}, part_pas = {"iendus","us"}, ger = {"iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"iō","īs","it","īmus","ītis","iunt"}, ind_imp = {"iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"iam","iēs","iet","iēmus","iētis","ient"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"ior","īris","ītur","īmur","īminī","iuntur", nil,"īre"}, ind_imp_pas = {"iēbar","iēbāris","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāre"}, ind_fut_pas = {"iar","iēris","iētur","iēmur","iēminī","ientur", nil,"iēre"}, subj_pres = {"iam","iās","iat","iāmus","iātis","iant"}, subj_imp = {"īrem","īrēs","īret","īrēmus","īrētis","īrent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"iar","iāris","iātur","iāmur","iāminī","iantur", nil,"iāre"}, subj_imp_pas = {"īrer","īrēris","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēre"}, imper_pres = {nil,"ī",nil,nil,"īte",nil}, imper_fut = {nil,"ītō","ītō",nil,"ītōte","iuntō"}, imper_pres_pas = {nil,"īre",nil,nil,"īminī",nil}, imper_fut_pas = {nil,"ītor","ītor",nil,nil,"iuntor"}, } } local formas_no_personales = { inf_act = true, inf_pas = true, part_act = true, part_pas = true, ger = true, sup = true, } local formas_personales = { ind_pres = true, ind_imp = true, ind_perf = true, ind_pluperf = true, ind_fut = true, ind_fut_perf = true, ind_fut_sig = true, ind_pres_pas = true, ind_imp_pas = true, ind_fut_pas = true, subj_pres = true, subj_imp = true, subj_perf = true, subj_pluperf = true, subj_aor_sig = true, subj_pres_pas = true, subj_imp_pas = true, imper_pres = true, imper_fut = true, imper_pres_pas = true, imper_fut_pas = true, } local formas = merge(formas_no_personales, formas_personales) local verbos_irregulares = { {"aiō", {"aiō", "aiiō", "aijō", "ajō"}, { desactivar = {"inf_pas","part_pas","ger","sup","ind_pluperf","ind_fut","ind_fut_perf", "ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_perf","subj_pluperf","subj_pres_pas", "subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {"ai"}, nucleoperf = {"a"}, nucleosup = {}, nucleosigm = {}, inf_act = {"aiere"}, ind_pres = {nil,nil,nil,{}}, ind_perf = {{},nil,nil,{},{}}, subj_pres = {nil,nil,nil,{},{}}, subj_imp = {{},{},nil,{},{},{}}, imper_pres = {{},{"ai"},{},{},{},{}}, }}, {"cedo", {"cedo"}, { desactivar = {"inf_act","inf_pas","part_act","part_pas","ger","sup","ind_pluperf","ind_pres","ind_imp","ind_perf", "ind_fut","ind_fut_perf","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres","subj_imp","subj_perf", "subj_pluperf","subj_pres_pas","subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, imper_pres = {nil,{"cedo"},nil,nil,{"cette","cedile"},nil}, }}, {"dīcō", {"dīcō"}, { conj = "3", nucleopres = {"dīc"}, nucleoperf = {"dīx"}, nucleosup = {"dict"}, nucleosigm = {"dīx"}, desactivar = {}, imper_pres = {nil, {"dīc", "dīce"}}, inf_pas = {"dīcī", "dīcier{L}"}, }}, {"dō", {"dō"}, { conj = "1", nucleopres = {"d"}, nucleoperf = {"ded"}, nucleosup = {"dat"}, nucleosigm = {}, desactivar = {}, inf_act = {"dare","dedisse"}, inf_pas = {"darī"}, ind_pres = {nil,nil,nil,{"damus"},{"datis"},nil}, ind_imp = {{"dabam"},{"dabās"},{"dabat"},{"dabāmus"},{"dabātis"},{"dabant"}}, ind_fut = {{"dabō"},{"dabis"},{"dabit"},{"dabimus"},{"dabitis"},{"dabunt"}}, ind_imp_pas = {{"dabar"},{"dabāris","dabāre"},{"dabātur"},{"dabāmur"},{"dabāminī"},{"dabantur"}}, ind_fut_pas = {{"dabor"},{"daberis","dabere"},{"dabitur"},{"dabimur"},{"dabiminī"},{"dabuntur"}}, subj_imp = {{"darem"},{"darēs"},{"daret"},{"darēmus"},{"darētis"},{"darent"}}, subj_imp_pas = {{"darer"},{"darēris","darēre"},{"darētur"},{"darēmur"},{"darēminī"},{"darentur"}}, imper_pres = {nil,nil,nil,nil,{"date"},nil}, imper_fut = {nil,{"datō"},{"datō"},nil,{"datōte"},{"dantō"}}, imper_pres_pas = {nil,{"dare"},nil,nil,{"daminī"},nil}, imper_fut_pas = {nil,{"dator"},{"dator"},nil,nil,{"dator"}}, }}, {"dūcō", {"dūcō"}, { conj = "3", nucleopres = {"dūc"}, nucleoperf = {"dūx"}, nucleosup = {"duct"}, nucleosigm = {}, desactivar = {}, imper_pres = {nil, {"dūc", "dūce"}}, }}, {"edō", {"edō", "ëdō"}, { conj = "3", nucleopres = {"ed"}, nucleoperf = {"ed"}, nucleosup = {""}, nucleosigm = {}, desactivar = {}, inf_act = {"edere","ēsse"}, part_act = {"edēns","ēsūrus","ēssūrus","ēstūrus"}, part_pas = {"edendus","edundus","ēsus","ēssus","ēstus"}, sup = {"ēsum","ēssum","ēstum","ēsū","ēssū","ēstū"}, ind_pres = {nil,{"edis","ēs"},{"edit","ēst"},nil,{"editis","ēstis"},nil}, ind_pres_pas = {nil,{"ederis","edere","ēssis","ēsse"},{"editur","ēstur"}}, subj_pres = {{"edam","edim"},{"edās","edīs"},{"edat","edit","ēst"},{"edāmus","edīmus"},{"edātis","edītis"},{"edant","edint"}}, subj_imp = {{"ederem","ēssem"},{"ederēs","ēssēs"},{"ederet","ēsset"},{"ederēmus","ēssēmus"},{"ederētis","ēssētis"},{"ederent","ēssent"}}, subj_imp_pas = {{"ederer","ēsser"},{"ederēris","ederēre","ēssēris","ēssēre"},{"ederetur","ēssetur"},{"ederēmur","ēssēmur"},{"ederēminī","ēssēminī"},{"ederentur","ēssentur"}}, imper_pres = {nil,{"ede","ēs"},nil,nil,{"edite","ēste"},nil}, imper_fut = {nil,{"editō","ēstō"},{"editō","ēstō"},nil,{"editōte","ēstōte"},{"eduntō"}}, imper_pres_pas = {nil,{"edere","ēsse"},nil,nil,{"ediminī"},nil}, imper_fut_pas = {nil,{"editor","ēstor"},{"editor","ēstor"},nil,nil,{"eduntor"}}, }}, {"eō", {"eō", "ëō"}, { conj = "4", nucleopres = {""}, nucleoperf = {""}, nucleosup = {""}, nucleosigm = {}, desactivar = {"imper_pres_pas"}, inf_act = {"īre","īsse","iisse","īvisse"}, inf_pas = {"īrī","īrier"}, part_act = {"iēns","itūrus"}, part_pas = {"eundum","itum"}, ger = {"eundī","eundō","eundum"}, sup = {"itum","itū"}, ind_pres = {{"eō"},{"īs"},{"it"},{"īmus"},{"ītis"},{"eunt"}}, ind_imp = {{"ībam"},{"ībās"},{"ībat"},{"ībāmus"},{"ībātis"},{"ībant"}}, ind_perf = {{"iī","īvī"},{"īstī","iistī","īvistī"},{"iit","īvit"},{"iimus","īvimus"},{"īstis","iistis","īvistis"},{"iērunt","iēre","īvērunt","īvēre"}}, ind_pluperf = {{"ieram","īveram"},{"ierās","īverās"},{"ierat","īverat"},{"ierāmus","īverāmus"},{"ierātis","īverātis"},{"ierant","īverant"}}, ind_fut = {{"ībō"},{"ībis"},{"ībit"},{"ībimus"},{"ībitis"},{"ībunt"}}, ind_fut_perf = {{"ierō","īverō"},{"ieris","īveris"},{"ierit","īverit"},{"ierimus","īverimus"},{"ieritis","īveritis"},{"ierint","īverint"}}, ind_fut_sig = {nil,nil,nil,nil,nil,nil}, ind_pres_pas = {{},{},{"ītur"},{},{},{}}, ind_imp_pas = {{},{},{"ībātur"},{},{},{}}, ind_fut_pas = {{},{},{"ībitur"},{},{},{}}, subj_pres = {{"eam"},{"eās"},{"eat"},{"eāmus"},{"eātis"},{"eant"}}, subj_imp = {{"īrem"},{"īrēs"},{"īret"},{"īrēmus"},{"īrētis"},{"īrent"}}, subj_perf = {{"ierim","īverim"},{"ierīs","īverīs"},{"ierit","īverit"},{"ierīmus","īverīmus"},{"ierītis","īverītis"},{"ierint","īverint"}}, subj_pluperf = {{"īssem","iissem","īvissem"},{"īssēs","iissēs","īvissēs"},{"īsset","iisset","īvisset"},{"īssēmus","iissēmus","īvissēmus"},{"īssētis","iissētis","īvissētis"},{"īssent","iissent","īvissent"}}, subj_aor_sig = {nil,nil,nil,nil,nil,nil}, subj_pres_pas = {{},{},{"eātur"},{},{},{}}, subj_imp_pas = {{},{},{"īrētur"},{},{},{}}, imper_pres = {nil,nil,nil,nil,nil,nil}, imper_fut = {nil,nil,nil,nil,nil,{"euntō"}}, imper_fut_pas = {nil,{},nil,nil,nil,{}}, }}, {"faciō", {"faciō"}, { conj = "3", I = true, inf_act = {"facere", "fāre", "fēcisse"}, inf_pas = {"fierī"}, part_pas = {"faciendus", "faciundus", "factus"}, nucleopres = {"fac"}, nucleoperf = {"fēc"}, nucleosup = {"fact"}, nucleosigm = {"fax","faxs","facs"}, desactivar = {}, ind_pres_pas = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, ind_imp_pas = {{"fīēbam"},{"fīēbās"},{"fīēbat"},{"fīēbāmus"},{"fīēbātis"},{"fīēbant"}}, ind_fut_pas = {{"fīam"},{"fīēs"},{"fīet"},{"fīēmus"},{"fīētis"},{"fīent"}}, subj_pres_pas = {{"fīam"},{"fīās"},{"fīat"},{"fīāmus"},{"fīātis"},{"fīant"}}, subj_imp_pas = {{"fierem"},{"fierēs"},{"fieret"},{"fierēmus"},{"fierētis"},{"fierent"}}, imper_pres = {nil,{"fac","face"},nil,nil,nil,nil}, imper_pres_pas = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut_pas = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"ferō", {"ferō"}, { conj = "3", nucleopres = {"fer"}, nucleoperf = {"tul", "tetul{†}"}, nucleosup = {"lāt"}, nucleosigm = {}, desactivar = {}, inf_act = {"ferre", "tulisse", "tetulisse{†}"}, inf_pas = {"ferrī"}, ind_pres = {nil,{"fers"},{"fert"},nil,{"fertis"}}, ind_pres_pas = {nil,{"ferris","ferre"}}, subj_imp = {{"ferrem"},{"ferrēs"},{"ferret"},{"ferrēmus"},{"ferrētis"},{"ferrent"}}, subj_imp_pas = {{"ferrer"},{"ferrēris","ferrēre"},{"ferrētur"},{"ferrēmur"},{"ferrēminī"},{"ferrentur"}}, imper_pres = {nil,{"fer"},nil,nil,{"ferte"},nil}, imper_pres_pas = {nil,{"ferre"},nil,nil,nil,nil}, imper_fut = {nil,{"fertō"},{"fertō"},nil,{"fertōte"},{"feruntō"}}, imper_fut_pas = {nil,{"fertor"},{"fertor"},nil,nil,nil}, }}, {"fīō", {"fīō"}, { conj = "3", nucleopres = {"fī"}, nucleoperf = {}, nucleosup = {"fact"}, nucleosigm = {}, semidep = true, desactivar = {}, inf_act = {"fierī"}, ind_pres = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, imper_pres = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"inquam", {"inquam"}, { conj = "3", nucleopres = {"inqui"}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, nopasivo = true, desactivar = {"inf_act","inf_pas","part_pas","ger"}, ind_pres = {{"inquam"}}, }}, {"possum", {"possum"}, { conj = "3", nucleopres = {"pot"}, nucleoperf = {"pot"}, nucleosup = {}, nucleosigm = {}, pres = "possō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"posse","potesse{†}"}, part_act = {"potēns"}, ind_pres = {{"possum"},{"potes"},{"potest"},{"possumus"},{"potestis"},{"possunt"}}, ind_imp = {{"poteram"},{"poterās"},{"poterat"},{"poterāmus"},{"poterātis"},{"poterant"}}, ind_fut = {{"poterō"},{"poteris","potere"},{"poterit"},{"poterimus"},{"poteritis"},{"poterunt"}}, ind_perf = {{"potuī"},{"potuistī"},{"potuit"},{"potuimus"},{"potuistis"},{"potuērunt","potuēre"}}, ind_pluperf = {{"potueram"},{"potuerās"},{"potuerat"},{"potuerāmus"},{"potuerātis"},{"potuerant"}}, ind_fut_perf = {{"potuerō"},{"potueris"},{"potuerit"},{"potuerimus"},{"potueritis"},{"potuerunt"}}, subj_pres = {{"possem"},{"possēs"},{"possēt"},{"possēmus"},{"possētis"},{"possent"}}, subj_imp = {{"possim"},{"possīs"},{"possit"},{"possīmus"},{"possītis"},{"possint"}}, subj_perf = {{"potuerim"},{"potuerīs"},{"potuerit"},{"potuerīmus"},{"potuerītis"},{"potuerint"}}, subj_pluperf = {{"potuissem"},{"potuissēs"},{"potuisset"},{"potuissēmus"},{"potuissētis"},{"potuissent"}}, }}, {"sum", {"sum"}, { conj = "3", nucleopres = {"s"}, nucleoperf = {"fu"}, nucleosup = {}, nucleosigm = {}, pres = "sō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres_pas","imper_fut_pas"}, inf_act = {"esse"}, part_act = {"futūrus"}, ind_pres = {{"sum"},{"es"},{"est"},{"sumus"},{"estis"},{"sunt"}}, ind_imp = {{"eram"},{"erās"},{"erat"},{"erāmus"},{"erātis"},{"erant"}}, ind_fut = {{"erō"},{"eris","ere"},{"erit"},{"erimus"},{"eritis"},{"erunt"}}, subj_pres = {{"sim","siem","fuam{†}"},{"sīs","siēs","fuās{†}"},{"sit","siet","fuat{†}"},{"sīmus","siēmus","fuāmus{†}"},{"sītis","siētis","fuātis{†}"},{"sint","sient","fuant{†}"}}, subj_imp = {{"essem","forem"},{"essēs","forēs"},{"esset","foret"},{"essēmus","forēmus"},{"essētis","forētis"},{"essent","forent"}}, imper_pres = {nil,{"es"},nil,nil,{"este"},nil}, imper_fut = {nil,{"estō"},{"estō"},nil,{"estōte"},nil}, }}, {"mālō", {"mālō"}, { conj = "3", nucleopres = {"māl"}, nucleoperf = {"mālu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"mālle","māluisse"}, ind_pres = {{"mālō"},{"māvīs"},{"māvult"},{"mālumus"},{"māvultis"},{"mālunt"}}, subj_pres = {{"mālim"},{"mālīs"},{"mālit"},{"mālīmus"},{"mālītis"},{"mālint"}}, subj_imp = {{"māllem"},{"māllēs"},{"māllet"},{"māllēmus"},{"māllētis"},{"māllent"}}, }}, {"nōlō", {"nōlō"}, { conj = "3", nucleopres = {"nōl"}, nucleoperf = {"nōlu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"nōlle","nōluisse"}, ind_pres = {{"nōlō"},{"nōn vīs","nevīs{†}"},{"nōn vult","nōn volt","nevolt{†}"},{"nōlumus"},{"nōn vultis","nōn voltis","nōltis{†}"},{"nōlunt"}}, subj_pres = {{"nōlim"},{"nōlīs"},{"nōlit"},{"nōlīmus"},{"nōlītis"},{"nōlint"}}, subj_imp = {{"nōllem"},{"nōllēs"},{"nōllet"},{"nōllēmus"},{"nōllētis"},{"nōllent"}}, }}, {"volō", {"volō"}, { conj = "3", nucleopres = {"vol"}, nucleoperf = {"volu"}, nucleosup = {"volit"}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"velle","voluisse"}, ind_pres = {{"volō"},{"vīs"},{"vult","volt{†}"},{"volumus"},{"vultis","voltis{†}"},{"volunt"}}, subj_pres = {{"velim","volim{†}"},{"velīs","volīs{†}"},{"velit","volit{†}"},{"velīmus","volīmus{†}"},{"velītis","volītis{†}"},{"velint","volint{†}"}}, subj_imp = {{"vellem"},{"vellēs"},{"vellet"},{"vellēmus"},{"vellētis"},{"vellent"}}, }}, } local function combinar_prefijo_nucleosufijo(prefijo, nucleosufijo) return prefijo..nucleosufijo end local function combinar_nucleo_sufijo(nucleo, sufijo, agregar_i) if agregar_i and (not find(sufijo, "^[iī]")) and (sufijo ~= "e") and (not find(sufijo, "^er")) then return nucleo.."~i~"..sufijo end return nucleo..sufijo end local function agregar_forma(conjugado, conjinfo, forma) conjinfo[forma] = conjinfo[forma] or {} local sufijos_ = sufijos[conjinfo.conj][forma] local nucleos local prefijo if forma == "sup" then nucleos = conjinfo.nucleosup prefijo = conjinfo.prefijosup or conjinfo.prefijo elseif find(forma, "sig") then nucleos = conjinfo.nucleosigm prefijo = conjinfo.prefijosigm or conjinfo.prefijo elseif find(forma, "perf") then nucleos = conjinfo.nucleoperf prefijo = conjinfo.prefijoperf or conjinfo.prefijo else nucleos = conjinfo.nucleopres prefijo = conjinfo.prefijo end if formas_no_personales[forma] then if conjinfo[forma][1] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma]) do insert_if_not(conjugado[forma], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else for _, sufijo in ipairs(sufijos_) do local nucleos_ = nucleos if forma == "inf_act" and sufijo == "isse" then nucleos_ = conjinfo.nucleoperf elseif forma == "part_act" and sufijo == "ūrus" then nucleos_ = conjinfo.nucleosup elseif forma == "part_pas" and sufijo == "us" then nucleos_ = conjinfo.nucleosup end local agregar_i = conjinfo.I and nucleos_ == conjinfo.nucleopres for _,nucleo in ipairs(nucleos_) do insert_if_not(conjugado[forma], combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(nucleo, sufijo, agregar_i))) end end end return end for i = EGO, EI do local p = tostr[i] if conjinfo[forma][i] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma][i]) do insert_if_not(conjugado[forma..p], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else local k = i while sufijos_[k] do local agregar_i = conjinfo.I and nucleos == conjinfo.nucleopres for j, n in ipairs(nucleos) do local x = combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(n, sufijos_[k], agregar_i)) if conjinfo.always_sync_perf and (forma == "ind_perf" or forma == "ind_pluperf" or forma == "ind_fut_perf" or forma == "subj_perf" or forma == "subj_pluperf") then x = x:gsub("īvī", "iī") x = x:gsub("īvi", "ī") x = x:gsub("īve", "ī") x = x:gsub("īvē", "ē") end insert_if_not(conjugado[forma..p], x) end k = k + 6 end end end end local function get_subtype_by_ending(pres, conjinfo, specs) for _, spec in ipairs(specs) do local base = extract_base(pres, spec[1]) if base then for _,s in ipairs(spec[2]) do if conjinfo[s] == nil then conjinfo[s] = true end end return base end end error("Unrecognized ending for conjugation " .. conjinfo["conj"]) end local function detect_v_type_and_subtypes(conjinfo) local pres = conjinfo["v"] local conj_arg = conjinfo["conj"] pres = toNFC(pres) local base_conj_arg, auto_perf_supine = conj_arg:match("^([124]/?4?)(%+%+?)$") if base_conj_arg then if auto_perf_supine == "++" and base_conj_arg ~= "4" then error("Conjugation types 1++ and 2++ not allowed") end conj_arg = base_conj_arg end conjinfo.conj = conj_arg if conj_arg == "1" then local base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"at", {"impers"}}, {"ātur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "āv" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "āt" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "āss" end end elseif conj_arg == "2" then local base = get_subtype_by_ending(pres, conjinfo, { {"eō", {}}, {"eor", {"dep"}}, {"et", {"impers"}}, {"ētur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "u" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "it" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3" then local base if conjinfo.I == false then -- si explícitamente se indicó que no es del tipo -io, hay que excluir sufijos base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) else base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) end if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end assert(conjinfo["nucleoperf"][1], "especifique todos los núcleos para verbos de la tercera conjugación") assert(conjinfo["nucleosup"][1], "especifique todos los núcleos para verbos de la tercera conjugación") if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3/4" then local base base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "4" then local base = get_subtype_by_ending(pres, conjinfo, { {"iō", {}}, {"ior", {"dep"}}, {"it", {"impers"}}, {"ītur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "irreg" then for _,p in ipairs(verbos_irregulares) do for _,rx in ipairs(p[2]) do local pref, verb = match(conjinfo.v, "^(.*)("..rx..")$") if verb then conjinfo.v = verb conjinfo.prefijo = pref if conjinfo.nucleoperf[1] and conjinfo.nucleoperf[1] ~= "-" then -- [[ecfero]] conjinfo.prefijoperf = conjinfo.nucleoperf[1] conjinfo.nucleoperf = {} end if conjinfo.nucleosup[1] and conjinfo.nucleosup[1] ~= "-" then conjinfo.prefijosup = conjinfo.nucleosup[1] conjinfo.nucleosup = {} end if conjinfo.nucleosigm[1] and conjinfo.nucleosigm[1] ~= "-" then conjinfo.prefijosigm = conjinfo.nucleosigm[1] conjinfo.nucleosigm = {} end conjinfo.irreg = true conjinfo.conj = p[3].conj for k,val in pairs(p[3]) do if not conjinfo[k] or (type(conjinfo[k]) == "table" and not conjinfo[k][1]) then conjinfo[k] = deep_copy(val) end end return conjinfo end end end error("Unrecognized conjugation '" .. conj_arg .. "'") else error("Unrecognized conjugation '" .. conj_arg .. "'") end return conjinfo end function export.v(frame) local title_ = mw.title.getCurrentTitle() local tit = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {alias_de = "conj"}, [2] = {alias_de = "pres"}, [3] = {alias_de = "nucleoperf"}, [4] = {alias_de = "nucleosup"}, [5] = {alias_de = "nucleosigm"}, ["impers"] = {}, -- pas para formas pasivas solamente ["impersonal"] = {alias_de = "impers"}, ["dep"] = {tipo="bool"}, ["depon"] = {alias_de="dep"}, ["deponente"] = {alias_de="dep"}, ["semidep"] = {tipo="bool"}, ["semidepon"] = {alias_de="semidep"}, ["semideponente"] = {alias_de="semidep"}, ["sigm"] = {tipo="bool"}, ["nopasivo"] = {tipo="bool"}, ["soloperf"] = {tipo="bool"}, ["I"] = {tipo="bool"}, ["p3inf"] = {tipo="bool"}, -- sin uso ["poet_sync_perf"] = {tipo="bool"}, -- sin uso ["always_sync_perf"] = {tipo="bool"}, -- solo en [[saevio]] ["conj"] = {requerido=true}, ["pres"] = {requerido=true}, ["nucleopres"] = {lista = true}, ["nucleoperf"] = {lista = true}, ["nucleosup"] = {lista = true}, ["nucleosigm"] = {lista = true}, ["núcleopres"] = {alias_de="nucleopres"}, ["núcleoperf"] = {alias_de="nucleoperf"}, ["núcleosup"] = {alias_de="nucleosup"}, ["paradigma"] = {lista = true}, ["desactivarnucleos"] = {tipo="bool", por_defecto=true}, -- para [[-o]] ["nota"] = {}, } local conjugado = {} for forma,_ in pairs(formas_no_personales) do params[forma] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma] = {} end for forma,_ in pairs(formas_personales) do for i,s in ipairs(tostr) do params[forma..s] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma..s] = {} if i == 1 then params[forma] = {alias_de=forma..s} end end end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) assert(not find(tit, " "), "locuciones no soportadas aún") assert(not (args["dep"] and args["semidep"]), "un verbo no puede ser deponente y semideponente a la vez") local conjinfo = { conj = args.conj, prefijo="", v=args.pres, desactivar = {}, dep=args.dep, semidep=args.semidep, sigm=args.sigm, impers=args.impers, nopasivo=args.nopasivo, soloperf=args.soloperf, I=args.I, p3inf=args.p3inf, poet_sync_perf=args.poet_sync_perf, -- sin uso always_sync_perf=args.always_sync_perf, nucleopres = deep_copy(args.nucleopres), nucleoperf = deep_copy(args.nucleoperf), nucleosup = deep_copy(args.nucleosup), nucleosigm = deep_copy(args.nucleosigm) } conjinfo = detect_v_type_and_subtypes(conjinfo) conjinfo.conj = conjinfo.conj if conjinfo.impers == true then conjinfo.impers = "3" end -- no puede ir conjinfo acá abajo porque si es un sufijo va a quedar "-" en la raíz, lo que anularía todas las formas conjugadas, tiene que venir directo de args if args.desactivarnucleos then if args.nucleopres[1] == "-" then conjinfo.nucleopres = {} end if args.nucleoperf[1] == "-" then conjinfo.nucleoperf = {} end if args.nucleosup[1] == "-" then conjinfo.nucleosup = {} end if args.nucleosigm[1] == "-" then conjinfo.nucleosigm = {} end end local es_irregular = conjinfo.irreg for _,d in ipairs(conjinfo.desactivar) do if formas_no_personales[d] then args[d] = {"no"} else args[d.."2"] = {"no"} end end for forma,_ in pairs(formas) do agregar_forma(conjugado, conjinfo, forma) end local resultante = sobreescribir_formas(conjugado, args) local mostrar_fut_sig = #resultante["ind_fut_sig1"] > 0 local mostrar_aor_sig = #resultante["subj_aor_sig1"] > 0 local defectivo = comprobar_defectivo(resultante, {"^imper", "_sig"}, tostr) local defect2 resultante, defect2 = desactivar_formas(resultante, function (form) return (conjinfo.nopasivo and form:find("_pas")) or (conjinfo.soloperf and not form:find("perf")) or (conjinfo.impers == "pas" and form:find("_pas[^3]")) or (conjinfo.impers == "pas3" and form:find("_pas[^3]")) or (conjinfo.impers == "pas36" and form:find("_pas[^36]")) end ) if defect2 then defectivo = true end -- por ahora innecesario -- local part_no_adj = {} -- for _,e in ipairs(resultante.part) do -- if (find(e, 'PART') or not find(e, 'ADJ')) and not find(e, "†") then -- insert(part_no_adj, gsub1(e, '%b{}', '')) -- end -- end local tit_pres = f(resultante["ind_pres1"][1] or "―") local tit_inf = f(resultante["inf_act"][1] or "―") local tit_perf = f(resultante["ind_perf1"][1] or "―") local tit_sup = f(resultante["sup"][1] or "―") resultante = agregar_enlaces(resultante, tit, normalizar_enlace) local es_impersonal = conjinfo.impers resultante = formatear_formas(resultante, function (x) return obtener_pronombre(x, es_impersonal) end) local impers = conjinfo.impers local cs, cs1, cs2, fila_pronombres_ind, fila_pronombres_subj, fila_pronombres_imper, mostrar_imper if impers == "3" then fila_pronombres_ind = {"", "(id)", color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", "(quod id)", color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", "(id)", color=COLOR_IMPER, header=true, class="pc"} cs = 2 elseif impers == "36" then error("no soportado actualmente") cs = 3 else fila_pronombres_ind = {"", PRONOMBRES[1], PRONOMBRES[2], PRONOMBRES[3], PRONOMBRES[4], PRONOMBRES[5], PRONOMBRES[6], color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", PRONOMBRES_SUBJ[1], PRONOMBRES_SUBJ[2], PRONOMBRES_SUBJ[3], PRONOMBRES_SUBJ[4], PRONOMBRES_SUBJ[5], PRONOMBRES_SUBJ[6], color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", PRONOMBRES_IMP[1], PRONOMBRES_IMP[2], PRONOMBRES_IMP[3], PRONOMBRES_IMP[4], PRONOMBRES_IMP[5], PRONOMBRES_IMP[6], color=COLOR_IMPER, header=true, class="pc"} cs = 7 mostrar_imper = true end cs1 = cs -- math.floor(cs / 2) -- cs2 = cs - cs1 local t = {} insert(t, {{"Formas no personales (verboides)", colspan=cs}, color=COLOR_H, header=true}) if impers == "3" then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else resultante.inf_act.colspan = cs1-1 resultante.inf_pas.colspan = cs1-1 resultante.part_act.colspan = cs1-1 resultante.part_pas.colspan = cs1-1 resultante.ger.colspan = cs1-1 resultante.sup.colspan = cs1-1 if conjinfo.dep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) elseif conjinfo.semidep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) end end local function ic(tiempo) if impers == "3" then return resultante[tiempo.."3"] elseif impers == "36" then return resultante[tiempo.."3"], resultante[tiempo.."6"] end return resultante[tiempo.."1"], resultante[tiempo.."2"], resultante[tiempo.."3"], resultante[tiempo.."4"], resultante[tiempo.."5"], resultante[tiempo.."6"] end insert(t, {{"Formas personales", colspan=cs}, color=COLOR_H, header=true}) insert(t, {{"Modo indicativo", colspan=cs}, color=COLOR_IND, header=true}) insert(t, fila_pronombres_ind) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end else insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) insert(t, {{"Pretérito perfecto", color=COLOR_IND, header=true}, ic("ind_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_IND, header=true}, ic("ind_pluperf")}) insert(t, {{"Futuro perfecto", color=COLOR_IND, header=true}, ic("ind_fut_perf")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) end insert(t, {{"Modo subjuntivo", colspan=cs}, color=COLOR_SUBJ, header=true}) insert(t, fila_pronombres_subj) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end else insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) insert(t, {{"Pretérito perfecto", color=COLOR_SUBJ, header=true}, ic("subj_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_SUBJ, header=true}, ic("subj_pluperf")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) end insert(t, {{"Modo imperativo", colspan=cs}, color=COLOR_IMPER, header=true}) insert(t, fila_pronombres_imper) if mostrar_imper then if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) else insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) insert(t, {{"Presente pasivo", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) end else insert(t, {{"Como verbo "..(impers == "3" and "impersonal" or "terciopersonal")..", ''"..tit.."'' CARECE de imperativo", color=COLOR_IMPER, header=true, colspan=cs}}) end insert(t, {{f("Leyenda: † arcaico, x no normativo, ~■~ cambio ortográfico, #■# irregularidad"), colspan=cs}}) args["nota"] = args["nota"] or "" if conjinfo.impers == "utc3" then args["nota"] = args["nota"].." NOTA: se usa también como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "umc3" then args["nota"] = args["nota"].." NOTA: se usa más como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "utc36" then args["nota"] = args["nota"].." NOTA: se usa también como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "umc36" then args["nota"] = args["nota"].." NOTA: se usa más como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "pas" or conjinfo.imeprs == "pas3" then args["nota"] = args["nota"].." NOTA: impersonal para las formas pasivas" end if conjinfo.impers == "pas36" then args["nota"] = args["nota"].." NOTA: formas pasivas terciopersonales (solamente tercera persona singular y plural)" end if conjinfo.soloperf then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas del perfecto y pluscuamperfecto con valor de presente, imperfecto o futuro" end if conjinfo.nopasivo then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas activas" end insert(t, {{args["nota"] and args["nota"] or "", colspan=cs}}) local cats = {} local subtits = {} local conj_str if conjinfo.conj == "1" then conj_str = "primera conjugación" elseif conjinfo.conj == "2" then conj_str = "segunda conjugación" elseif conjinfo.conj == "3" then conj_str = "tercera conjugación" elseif conjinfo.conj == "3/4" then conj_str = "tercera/cuarta conjugación" else conj_str = "cuarta conjugación" end insert(cats, "LA:Verbos de la "..conj_str) insert(subtits, conj_str) impers = impers or "" if impers == "3" or find(impers, "^u[tm]c3$") then insert(subtits, "impersonal") insert(cats, "LA:Verbos impersonales") end if defectivo then insert(subtits, "defectivo") insert(cats, "LA:Verbos defectivos") end if conjinfo.dep then insert(subtits, "deponente") insert(cats, "LA:Verbos deponentes") end if conjinfo.semidep then insert(subtits, "semideponente") insert(cats, "LA:Verbos semideponentes") end if es_irregular then insert(subtits, "irregular") insert(cats, "LA:Verbos irregulares") else insert(subtits, "regular") insert(cats, "LA:Verbos regulares") end return renderizar_tabla( frame, "'''Conjugación de ''"..tit_pres..", "..tit_inf..", "..tit_perf..", "..tit_sup.."'''''&emsp;&emsp;("..concat(subtits, ", ")..")", t, ns == 0 and cats or {}) end function export.adv(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { ["n"] = {}, ["nota"] = {alias_de = "n"}, ["comp"] = {lista = true}, ["comparativo"] = {alias_de = "comp"}, ["compnota"] = {lista = true}, ["sup"] = {lista = true}, ["superlativo"] = {alias_de = "sup"}, ["supnota"] = {lista = true}, } local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local head = args[1] local modo = args[2] local enc local cats = {} local cat_pref = "LA:Adverbios" if modo == "-" then enc = "sin comparativo ni superlativo" insert(cats, cat_pref.." incomparables") return renderizar_encabezado( frame, head, enc, args["n"], {}, ns == 0 and cats or {}, normalizar_enlace ) end local flex = {comp={},sup={}} local stem for _, suff in ipairs{"iter", "nter", "ter", "er", "iē", "ē", "rā", "im", "ō"} do stem = match(head, "^(.*)" .. suff .. "$") if stem ~= nil then local comp_suff, sup_suff = "ius", "issimē" if suff == "nter" then stem = stem .. "nt" end if suff == "rā" then comp_suff = "er" .. comp_suff sup_suff = "imē" end insert(flex.comp, stem .. comp_suff) insert(flex.sup, stem .. sup_suff) break end end if not stem and not args.comp[1] and not args.sup[1] then error("Unrecognized adverb type, recognized types are “-ē”, “-er”, “-ter”, “-iter”, “-im”, or “-ō”, “-ra” or specify irregular forms or “-” if incomparable.") end local formas, irr = sobreescribir_formas(flex, args) if args["comp"][1] == "no" then enc = "sin comparativo" insert(cats, cat_pref.." sin comparativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) elseif args["sup"][1] == "no" then enc = "sin superlativo" insert(cats, cat_pref.." sin superlativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end if irr then enc = f("#irregular#") insert(cats, cat_pref.." irregulares") end return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}, {"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end return export 4eaiel3o5jmqv6xwiafnm9wajk6yhes 6123507 6123506 2026-07-25T01:53:56Z Tmagc 158167 6123507 Scribunto text/plain -- FLEXIÓN DEL LATÍN -- Adaptado desde en.wikt por Tmagc local export = {} local unpack = unpack or table.unpack local insert = table.insert local concat = table.concat local m_table = require("Módulo:tabla") local keys_to_list = m_table.keysToList local insert_if_not = m_table.insertIfNot local deep_copy = m_table.deepCopy local contains = m_table.contains local merge = m_table.merge local m_str = require("Módulo:string") local u = m_str.char local match = m_str.match local sub = m_str.sub local gsub = m_str.gsub local split = m_str.split local gsplit = m_str.gsplit local find = m_str.find local m_str_avanzado = require("Módulo:string/avanzado") local toNFD = m_str_avanzado.toNFD local toNFC = m_str_avanzado.toNFC local m_flex = require("Módulo:flex") local f = m_flex.f local f_links = m_flex.f_links local parsear_arreglo = m_flex.parsear_arreglo local separar_palabras = m_flex.separar_palabras local combinar_copulativa = m_flex.combinar_copulativa local sobreescribir_formas = m_flex.sobreescribir_formas local desactivar_formas = m_flex.desactivar_formas local agregar_enlaces = m_flex.agregar_enlaces local formatear_formas = m_flex.formatear_formas local comprobar_defectivo = m_flex.comprobar_defectivo local renderizar_tabla = m_flex.renderizar_tabla local renderizar_encabezado = m_flex.renderizar_encabezado local COLOR_H = m_flex.COLOR_H local COLOR_NP = m_flex.COLOR_NP local COLOR_IND = m_flex.COLOR_IND local COLOR_SUBJ = m_flex.COLOR_SUBJ local COLOR_IMPER = m_flex.COLOR_IMPER local MACRON = u(0x304) local BREVE = u(0x306) local DIAER = u(0x308) local DBREVE = u(0x361) local ACCENT = "[" .. MACRON .. BREVE .. DIAER .. DBREVE .. "]" local VOWEL = "[aæeioœuyAÆEIOŒUY]" local cons_to_vowel = { ["j"] = "i", ["J"] = "I", ["v"] = "u", ["V"] = "U", } local function normalizar_enlace(x) x = toNFD(x) x = gsub(x, ACCENT, "") return toNFC(x) end local function join(a, b) a, b = toNFD(a), toNFD(b) -- If the first part ends in "j" or "v", convert it to "i" or "u" unless -- the second part begins with a vowel. if not match(b, "^" .. VOWEL) then a = gsub(a, "[jvJV]$", cons_to_vowel) end return toNFC(a..b) end local function add_form(decl, slot, stem, suf) if type(slot) == "string" then slot = {slot} end for _,slt in ipairs(slot) do if type(decl[slt]) == "nil" or decl[slt] == "" then decl[slt] = {} elseif type(decl[slt]) == "string" then decl[slt] = {decl[slt]} end insert_if_not(decl[slt], join(stem, suf)) end end local function remove_forms(decl, forms) for form,_ in pairs(decl) do for _,rx in ipairs(forms) do if form:find(rx) then forms[form] = {} break end end end end local function merge_forms(forms, forms2, keys) keys = keys or forms2 for key,arr in pairs(keys) do if not forms[key] then forms[key] = {} end if type(forms2[key]) == "string" then insert_if_not(forms[key], forms2[key]) elseif type(forms2[key]) == "table" then for _,a in ipairs(forms2[key]) do insert_if_not(forms[key], a) end end end end local noun_decl = {} noun_decl["0"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = stem forms["dat_sg"] = stem forms["acc_sg"] = stem forms["abl_sg"] = stem forms["voc_sg"] = stem forms["nom_pl"] = stem forms["gen_pl"] = stem forms["dat_pl"] = stem forms["acc_pl"] = stem forms["abl_pl"] = stem forms["voc_pl"] = stem -- with locative if data.loc then forms["loc_sg"] = stem forms["loc_pl"] = stem end end local function alt_gen_pl_in_um(stem, forms, types, subtitles, i_stem) if types.genplum then add_form(forms, "gen_pl", stem, (i_stem and "i" or "") .. "um") elseif types.not_genplum then -- FIXME: not a contraction. -- insert_if_not(subtitles, "uncontracted genitive plural") end end noun_decl["1"] = function(data, args) local forms, types, loc, subtitles = data.forms, data.types, data.loc, data.subtitles local stem = args[1] -- normal 1st local nom_sg = "a" local gen_loc_sg = "ae" local dat_sg = "ae" local acc_sg = "am" local abl_sg = "ā" local voc_sg = "a" local nom_voc_pl = "ae" local gen_pl = "ārum" local dat_abl_loc_pl = "īs" local acc_pl = "ās" insert_if_not(data.title, "primera declinación") insert_if_not(data.categories, "LA:Sustantivos de la primera declinación") -- ām if types.am then nom_sg = "ām" acc_sg = "ām" abl_sg = {"ām", "ā"} voc_sg = "ām" -- all Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") --Greek Ma if types.Ma then nom_sg = "ās" acc_sg = "ān" voc_sg = "ā" -- Greek Me elseif types.Me then nom_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" -- Greek else nom_sg = "ē" gen_loc_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" end end -- ābus if types.abus then dat_abl_loc_pl = "ābus" end add_form(forms, "nom_sg", stem, nom_sg) add_form(forms, "gen_sg", stem, gen_loc_sg) add_form(forms, "dat_sg", stem, dat_sg) add_form(forms, "acc_sg", stem, acc_sg) add_form(forms, "abl_sg", stem, abl_sg) add_form(forms, "voc_sg", stem, voc_sg) add_form(forms, {"nom_pl", "voc_pl"}, stem, nom_voc_pl) add_form(forms, "gen_pl", stem, gen_pl) add_form(forms, {"dat_pl", "abl_pl"}, stem, dat_abl_loc_pl) add_form(forms, "acc_pl", stem, acc_pl) -- with locative if loc then add_form(forms, "loc_sg", stem, gen_loc_sg) add_form(forms, "loc_pl", stem, dat_abl_loc_pl) end end noun_decl["2"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "segunda declinación") insert_if_not(data.categories, "LA:Sustantivos de la segunda declinación") -- normal 2nd forms["nom_sg"] = stem1 .. "us" forms["gen_sg"] = stem1 .. "ī" forms["dat_sg"] = stem1 .. "ō" forms["acc_sg"] = stem1 .. "um" forms["abl_sg"] = stem1 .. "ō" forms["voc_sg"] = stem1 .. "e" forms["nom_pl"] = stem1 .. "ī" forms["gen_pl"] = stem1 .. "ōrum" forms["dat_pl"] = stem1 .. "īs" forms["acc_pl"] = stem1 .. "ōs" forms["abl_pl"] = stem1 .. "īs" forms["voc_pl"] = stem1 .. "ī" -- all neuter if types.N then forms["nom_sg"] = stem1 .. "um" forms["voc_sg"] = stem1 .. "um" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- neuter ium if types.ium then forms["nom_sg"] = stem1 .. "ium" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" forms["voc_sg"] = stem1 .. "ium" forms["nom_pl"] = stem1 .. "ia" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "ia" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "ia" -- neuter us, plural a elseif types.a then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- -vom (aevom, etc.) elseif types.vom then forms["nom_sg"] = stem1 .. "om" forms["acc_sg"] = stem1 .. "om" forms["voc_sg"] = stem1 .. "om" -- neuter Greek in -os (cētos) elseif types.Greek and types.us then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "os" forms["voc_sg"] = stem1 .. "os" forms["nom_pl"] = stem1 .. "ē" forms["gen_pl"] = stem1 .. "ōn" forms["acc_pl"] = stem1 .. "ē" forms["voc_pl"] = stem1 .. "ē" -- neuter Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "on" forms["acc_sg"] = stem1 .. "on" forms["voc_sg"] = stem1 .. "on" -- neuter us elseif types.us then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "ī" forms["acc_pl"] = stem1 .. "ōs" forms["voc_pl"] = stem1 .. "ī" end -- er elseif types.er then forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "ī" forms["dat_sg"] = stem2 .. "ō" forms["acc_sg"] = stem2 .. "um" forms["abl_sg"] = stem2 .. "ō" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ī" forms["gen_pl"] = stem2 .. "ōrum" forms["dat_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "ōs" forms["abl_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "ī" -- ius elseif types.ius then forms["nom_sg"] = stem1 .. "ius" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" if types.voci then -- Only for proper names and fīlius, genius forms["voc_sg"] = stem1 .. "ī" else forms["voc_sg"] = stem1 .. "ie" end forms["nom_pl"] = stem1 .. "iī" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "iōs" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "iī" -- -vos (servos, etc.) elseif types.vos then forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "om" -- Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "on" if data.num == "pl" then forms["nom_pl"] = stem1 .. "oe" forms["voc_pl"] = stem1 .. "oe" else forms["nom_pl"] = {stem1 .. "ī", stem1 .. "oe"} forms["voc_pl"] = {stem1 .. "ī", stem1 .. "oe"} end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- with -um genitive plural alt_gen_pl_in_um(stem2, forms, types, subtitles, types.ius or types.ium) -- with locative if data.loc then if types.ius or types.ium then forms["loc_sg"] = stem2 .. "iī" forms["loc_pl"] = stem2 .. "iīs" else forms["loc_sg"] = stem2 .. "ī" forms["loc_pl"] = stem2 .. "īs" end end end local acc_sg_i_stem_subtypes = { acc_im = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [abl -ī]; -- cannabis, senapis, sinapis [abl -e, -ī] acc_sg = {"im"}, title = {"accusative singular in ''-im''"}, }, acc_im_in = { -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [abl -ī]; -- Baetis, Tigris [acc -e, -ī] acc_sg = {"im", "in"}, title = {"accusative singular in ''-im'' or ''-in''"}, }, acc_im_in_em = { -- e.g. tigris, river Līris acc_sg = {"im", "in", "em"}, title = {"accusative singular in ''-im'', ''-in'' or ''-em''"}, }, acc_im_em = { acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or ''-em''"}, }, acc_im_occ_em = { -- febris, pelvis, puppis, restis, securis, turris [abl -ī, -e] acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or occasionally ''-em''"}, }, acc_em_im = { -- aqualis, clavis, lens, navis [abl -e, -ī]; -- cutis, restis [abl -e] acc_sg = {"em", "im"}, title = {"accusative singular in ''-em'' or ''-im''"}, }, } local abl_sg_i_stem_subtypes = { abl_i = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [acc -im]; -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [acc -im or -in]; -- canalis "water pipe", months in -is or -er, nouns originally i-stem adjectives such as aedilis, affinis, bipennis, familiaris, sodalis, volucris, etc. [acc -em] abl_sg = {"ī"}, title = {"ablative singular in ''-ī''"}, }, abl_i_e = { -- febris, pelvis, puppis, restis, securis, turris [acc -im, -em] abl_sg = {"ī", "e"}, title = {"ablative singular in ''-ī'' or ''-e''"}, }, abl_e_i = { -- cannabis, senapis, sinapis [acc -im]; -- Baetis, Tigris [acc -im, -in]; -- aqualis, clavis, lens, navis [acc -em, -im]; -- finis, mugilis, occiput, pugil, rus, supellex, vectis [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or ''-ī''"}, }, abl_e_occ_i = { -- amnis, anguis, avis, civis, classis, fustis, ignis, imber, orbis, pars, postis, sors, unguis, vesper [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or occasionally ''-ī''"}, }, } local function extract_stem(form, ending) local base = match(form, "^(.*)" .. ending .. "$") if not base then error("Form " .. form .. " should end in -" .. ending) end return base end local function count_vowels(stem) return select(2, toNFD(stem):gsub("[aeiouyAEIOUY]", "")) end noun_decl["3"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] -- local function non_i_stem_type() -- return (count_vowels(stem1) > count_vowels(stem2) and "parisyllabic" or "imparisyllabic") .. " non-i-stem" -- end insert_if_not(data.title, "tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") --normal 3rd forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "is" forms["dat_sg"] = stem2 .. "ī" forms["acc_sg"] = stem2 .. "em" forms["abl_sg"] = stem2 .. "e" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ēs" forms["gen_pl"] = stem2 .. "um" forms["dat_pl"] = stem2 .. "ibus" forms["acc_pl"] = stem2 .. "ēs" forms["abl_pl"] = stem2 .. "ibus" forms["voc_pl"] = stem2 .. "ēs" local acc_sg_i_stem_subtype = false local not_acc_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if acc_sg_i_stem_subtypes[subtype] then acc_sg_i_stem_subtype = true break end end for acc_sg_subtype, _ in pairs(acc_sg_i_stem_subtypes) do if types["not_" .. acc_sg_subtype] then not_acc_sg_i_stem_subtype = true break end end local abl_sg_i_stem_subtype = false local not_abl_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if abl_sg_i_stem_subtypes[subtype] then abl_sg_i_stem_subtype = true break end end for abl_sg_subtype, _ in pairs(abl_sg_i_stem_subtypes) do if types["not_" .. abl_sg_subtype] then not_abl_sg_i_stem_subtype = true break end end -- all Greek if types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") -- Greek er if types.er then stem1 = extract_stem(stem1, "ēr") forms["nom_sg"] = stem1 .. "ēr" forms["gen_sg"] = stem1 .. "eris" forms["dat_sg"] = stem1 .. "erī" forms["acc_sg"] = {stem1 .. "era", stem1 .. "erem"} forms["abl_sg"] = stem1 .. "ere" forms["voc_sg"] = stem1 .. "ēr" forms["nom_pl"] = stem1 .. "erēs" forms["gen_pl"] = stem1 .. "erum" forms["dat_pl"] = stem1 .. "eribus" forms["acc_pl"] = stem1 .. "erēs" forms["abl_pl"] = stem1 .. "eribus" forms["voc_pl"] = stem1 .. "erēs" -- Greek on elseif types.on then stem1 = extract_stem(stem1, "ōn") forms["nom_sg"] = stem1 .. "ōn" forms["gen_sg"] = {stem1 .. "ontis", stem1 .. "ontos"} forms["dat_sg"] = stem1 .. "ontī" forms["acc_sg"] = stem1 .. "onta" forms["abl_sg"] = stem1 .. "onte" forms["voc_sg"] = stem1 .. "ōn" forms["nom_pl"] = stem1 .. "ontēs" forms["gen_pl"] = {stem1 .. "ontum", stem1 .. "ontium"} forms["dat_pl"] = stem1 .. "ontibus" forms["acc_pl"] = {stem1 .. "ontēs", stem1 .. "ontās"} forms["abl_pl"] = stem1 .. "ontibus" forms["voc_pl"] = stem1 .. "ontēs" -- Greek i-stem elseif types.I then forms["gen_sg"] = {stem2 .. "is", stem2 .. "eōs", stem2 .. "ios"} forms["acc_sg"] = {stem2 .. "im", stem2 .. "in", stem2 .. "em{MED}"} forms["abl_sg"] = {stem2 .. "ī", stem2 .. "e{MED}"} forms["voc_sg"] = {stem2 .. "is", stem2 .. "i"} forms["nom_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["gen_pl"] = {stem2 .. "ium", stem2 .. "eōn"} forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["voc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} if types.poetic_esi then forms["dat_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} forms["abl_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} end -- normal Greek else forms["gen_sg"] = stem2 .. "os" if match(toNFD(stem2), "[yY]" .. ACCENT .. "*$") then forms["acc_sg"] = stem2 .. "n" else forms["acc_sg"] = stem2 .. "a" end forms["nom_pl"] = stem2 .. "es" forms["acc_pl"] = stem2 .. "as" forms["voc_pl"] = stem2 .. "es" if match(toNFD(stem1), "[iyIY]" .. ACCENT .. "*s$") then -- Per Hiley, words in -is and -ys have a poetic vocative -- without the -s, but otherwise the vocative is the same -- as the nominative. forms["voc_sg"] = {stem1, (stem1:gsub("s$", "")).."{L}"} end end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- polis if types.polis then stem1 = extract_stem(stem1, "polis") insert_if_not(data.title, "parcialmente griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "polis" forms["gen_sg"] = stem1 .. "polis" forms["dat_sg"] = stem1 .. "polī" forms["acc_sg"] = {stem1 .. "polim", stem1 .. "polin"} forms["abl_sg"] = stem1 .. "polī" forms["voc_sg"] = {stem1 .. "polis", stem1 .. "polī"} end -- all neuter if types.N then forms["acc_sg"] = stem1 -- neuter I stem if types.I then -- pure variety if types.pure then forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "ia" forms["gen_pl"] = stem2 .. "ium" forms["acc_pl"] = stem2 .. "ia" forms["voc_pl"] = stem2 .. "ia" -- non-pure variety (rare) else forms["nom_pl"] = stem2 .. "a" forms["gen_pl"] = {stem2 .. "ium", stem2 .. "um"} forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- normal neuter else forms["nom_pl"] = stem2 .. "a" forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- I stem elseif types.I or acc_sg_i_stem_subtype or abl_sg_i_stem_subtype then forms["gen_pl"] = stem2 .. "ium" -- Per Allen and Greenough, Hiley and others, the acc_pl in -īs -- applied originally to all i-stem nouns, and was current as an -- alternative form up through Caesar. forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "īs"} -- pure variety if types.pure then forms["acc_sg"] = stem2 .. "im" forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "īs" end local num = data.num for subtype, _ in pairs(types) do local acc_sg_i_stem_props = acc_sg_i_stem_subtypes[subtype] if acc_sg_i_stem_props then forms["acc_sg"] = {} for _, ending in ipairs(acc_sg_i_stem_props.acc_sg) do insert_if_not(forms["acc_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(acc_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end -- FIXME: needs to be done for neuter nouns as well. for subtype, _ in pairs(types) do local abl_sg_i_stem_props = abl_sg_i_stem_subtypes[subtype] if abl_sg_i_stem_props then forms["abl_sg"] = {} for _, ending in ipairs(abl_sg_i_stem_props.abl_sg) do insert_if_not(forms["abl_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(abl_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end end -- with locative if data.loc then -- As far as I can tell, in general both dative singular and -- ablative singular could be used for the third-declension locative, -- with different time periods preferring different forms. -- http://dcc.dickinson.edu/grammar/latin/3rd-declension-locative-case -- mentions rūrī along with either Carthāginī or Carthāgine. -- Wikipedia in https://en.wikipedia.org/wiki/Locative_case#Latin -- says this: -- -- In archaic times, the locative singular of third declension nouns -- was still interchangeable between ablative and dative forms, but in -- the Augustan Period the use of the ablative form became fixed. -- Therefore, both forms "rūrī" and "rūre" may be encountered. -- -- Lewis and Short confirm this. local loc_sg = forms["dat_sg"] if type(loc_sg) == "table" then loc_sg = deep_copy(loc_sg) else loc_sg = {loc_sg} end local abl_sg = forms["abl_sg"] if type(abl_sg) == "table" then for _, form in ipairs(abl_sg) do insert_if_not(loc_sg, deep_copy(form)) end else insert_if_not(loc_sg, abl_sg) end forms["loc_sg"] = loc_sg forms["loc_pl"] = deep_copy(forms["abl_pl"]) --The following is what we used to have, but I simply cannot believe it. --if types.Greek and not types.s then -- forms["loc_pl"] = stem2 .. "ēs" --end end end noun_decl["4"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "cuarta declinación") insert_if_not(data.categories, "LA:Sustantivos de la cuarta declinación") -- normal 4th forms["nom_sg"] = stem .. "us" forms["gen_sg"] = stem .. "ūs" forms["dat_sg"] = stem .. "uī" forms["acc_sg"] = stem .. "um" forms["abl_sg"] = stem .. "ū" forms["voc_sg"] = stem .. "us" forms["nom_pl"] = stem .. "ūs" forms["gen_pl"] = stem .. "uum" forms["dat_pl"] = stem .. "ibus" forms["acc_pl"] = stem .. "ūs" forms["abl_pl"] = stem .. "ibus" forms["voc_pl"] = stem .. "ūs" if types.echo then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end add_form(forms, "acc_sg", stem, "ōn") elseif types.Callisto then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end end -- neuter if types.N then forms["nom_sg"] = stem .. "ū̆{?}" forms["gen_sg"] = {stem .. "ūs{C}", stem .. "ū{S}"} forms["dat_sg"] = {stem .. "uī{C}", stem .. "ū{S}"} forms["acc_sg"] = stem .. "ū̆{?}" forms["voc_sg"] = stem .. "ū̆{?}" forms["nom_pl"] = stem .. "ua" forms["acc_pl"] = stem .. "ua" forms["voc_pl"] = stem .. "ua" end -- ubus if types.ubus then forms["dat_pl"] = stem .. "ubus" forms["abl_pl"] = stem .. "ubus" end -- with locative if data.loc then forms["loc_sg"] = forms["abl_sg"] forms["loc_pl"] = forms["abl_pl"] end end noun_decl["5"] = function(data, args) local forms, types = data.forms, data.types local stem = args[1] insert_if_not(data.title, "quinta declinación") insert_if_not(data.categories, "LA:Sustantivos de la quinta declinación") -- ies if types.i then stem = stem .. "i" end forms["nom_sg"] = stem .. "ēs" forms["gen_sg"] = stem .. "eī" forms["dat_sg"] = stem .. "eī" forms["acc_sg"] = stem .. "em" forms["abl_sg"] = stem .. "ē" forms["voc_sg"] = stem .. "ēs" forms["nom_pl"] = stem .. "ēs" forms["gen_pl"] = stem .. "ērum" forms["dat_pl"] = stem .. "ēbus" forms["acc_pl"] = stem .. "ēs" forms["abl_pl"] = stem .. "ēbus" forms["voc_pl"] = stem .. "ēs" -- ies if types.i then forms["gen_sg"] = stem .. "ēī" forms["dat_sg"] = stem .. "ēī" end --with locative if data.loc then forms["loc_sg"] = stem .. "ē" forms["loc_pl"] = stem .. "ēbus" end end noun_decl["sgpl"] = function(data, args) local forms = data.forms local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem1 forms["gen_sg"] = stem1 forms["dat_sg"] = stem1 forms["acc_sg"] = stem1 forms["abl_sg"] = stem1 forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 forms["gen_pl"] = stem2 forms["dat_pl"] = stem2 forms["acc_pl"] = stem2 forms["abl_pl"] = stem2 forms["voc_pl"] = stem2 -- with locative if data.loc then forms["loc_sg"] = stem1 forms["loc_pl"] = stem2 end end noun_decl["indecl"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = stem forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} -- with locative (for multiword terms) if data.loc then forms["loc_sg"] = {} forms["loc_pl"] = {} end data.num = "sg" end noun_decl["irreg"] = function(data, args) local forms, subtitles, notes = data.forms, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "irregular") insert_if_not(data.categories, "LA:Sustantivos irregulares") forms["nom_sg"] = {} forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = {} forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} if stem == "bōs" then data.decl = "3" local stem1, stem2 = "bōs", "bov" noun_decl["3"](data, {stem1, stem2}) add_form(forms, "abl_sg", stem2, "īd{†}") add_form(forms, "gen_pl", "bo", "um") add_form(forms, "gen_pl", stem2, "erum") add_form(forms, "dat_pl", "", "bōbus") add_form(forms, "dat_pl", "", "būbus") add_form(forms, "abl_pl", "", "bōbus") add_form(forms, "abl_pl", "", "būbus") elseif stem:match("^[dD]eus$") then data.decl = "2" local dD = stem:sub(1, 1) forms["nom_sg"] = dD .. "eus" forms["gen_sg"] = dD .. "eī" forms["dat_sg"] = dD .. "eō" forms["acc_sg"] = dD .. "eum" forms["abl_sg"] = dD .. "eō" forms["voc_sg"] = {dD .. "eus", dD .. "ee"} if stem == "deus" then forms["nom_pl"] = {"dī", "diī", "deī"} forms["gen_pl"] = {"deōrum", "deum"} forms["dat_pl"] = {"dīs", "diīs", "deīs"} forms["acc_pl"] = "deōs" forms["abl_pl"] = {"dīs", "diīs", "deīs"} forms["voc_pl"] = {"dī", "diī", "deī"} end elseif stem == "domus" then data.decl = "4,2" insert_if_not(data.title, "cuarta/segunda declinación") forms["nom_sg"] = "domus" forms["gen_sg"] = {"domūs", "domī"} forms["dat_sg"] = {"domuī", "domō", "domū"} forms["acc_sg"] = "domum" forms["abl_sg"] = {"domū", "domō"} forms["voc_sg"] = "domus" forms["loc_sg"] = "domī" forms["nom_pl"] = "domūs" forms["gen_pl"] = {"domuum", "domōrum"} forms["dat_pl"] = "domibus" forms["acc_pl"] = {"domūs", "domōs"} forms["abl_pl"] = "domibus" forms["voc_pl"] = "domūs" forms["loc_pl"] = {} data.loc = true elseif match(stem, "^[IÏJ]ēs[uū]" .. BREVE .. "?s$") then local ij = sub(stem, 1, 1) local uu = match(stem, "[uū]" .. BREVE .. "?") forms["nom_sg"] = stem forms["gen_sg"] = ij .. "ēsū" forms["dat_sg"] = ij .. "ēsū" forms["acc_sg"] = ij .. "ēs" .. uu .. "m" forms["abl_sg"] = ij .. "ēsū" forms["voc_sg"] = ij .. "ēsū" data.num = "sg" elseif stem == "Mōsēs" or stem == "Moesēs" or match(stem, "^M[oō]" .. BREVE .. "?[īȳ]sēs$") then local mos = sub(stem, 1, -3) forms["nom_sg"] = stem forms["gen_sg"] = {mos .. "ī", mos .. "ēī", mos .. "is", mos .. "ēn", mos .. "eōs"} forms["dat_sg"] = mos .. "ī" forms["acc_sg"] = {mos .. "ēn", mos .. "em"} forms["abl_sg"] = {mos .. "e", mos .. "ēn", mos .. "ī"} forms["voc_sg"] = {mos .. "ēs", mos .. "ē"} data.num = "sg" elseif stem:match("^[ij]ūgerum$") then data.decl = "2,3" local ij = stem:sub(1, 1) insert_if_not(data.title, "segunda/tercera declinación híbrido") forms["nom_sg"] = ij .. "ūgerum" forms["gen_sg"] = ij .. "ūgerī" forms["dat_sg"] = ij .. "ūgerō" forms["acc_sg"] = ij .. "ūgerum" forms["abl_sg"] = ij .. "ūgerō" forms["voc_sg"] = ij .. "ūgerum" forms["nom_pl"] = ij .. "ūgera" forms["gen_pl"] = ij .. "ūgerum" forms["dat_pl"] = ij .. "ūgeribus" forms["acc_pl"] = ij .. "ūgera" forms["abl_pl"] = {ij .. "ūgeribus", ij .. "ūgerīs{†}"} forms["voc_pl"] = ij .. "ūgera" elseif stem == "sūs" then data.decl = "3" forms["nom_sg"] = "sūs" forms["gen_sg"] = "suis" forms["dat_sg"] = "suī" forms["acc_sg"] = "suem" forms["abl_sg"] = "sue" forms["voc_sg"] = "sūs" forms["nom_pl"] = "suēs" forms["gen_pl"] = "suum" forms["dat_pl"] = {"suibus", "sūbus", "subus"} forms["acc_pl"] = "suēs" forms["abl_pl"] = {"suibus", "sūbus", "subus"} forms["voc_pl"] = "suēs" elseif stem == "ēthos" then data.decl = "3" insert_if_not(data.title, "tercera declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "ēthos" forms["gen_sg"] = "ētheos" forms["acc_sg"] = "ēthos" forms["voc_sg"] = "ēthos" forms["nom_pl"] = {"ēthea", "ēthē"} forms["dat_pl"] = {"ēthesi", "ēthesin"} forms["acc_pl"] = {"ēthea", "ēthē"} forms["abl_pl"] = {"ēthesi", "ēthesin"} forms["voc_pl"] = {"ēthea", "ēthē"} elseif stem == "Athōs" then data.decl = "2" insert_if_not(data.title, "segunda declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "Athōs" forms["gen_sg"] = "Athō" forms["dat_sg"] = "Athō" forms["acc_sg"] = {"Athō", "Athōn"} forms["abl_sg"] = "Athō" forms["voc_sg"] = "Athōs" data.num = "sg" elseif stem:match("^[uv]ēnum$") then data.decl = "4,2" local uv = stem:sub(1, 1) insert_if_not(data.title, "cuarta/segunda declinación, defectivo") forms["dat_sg"] = {uv .. "ēnuī", uv .. "ēnō"} forms["acc_sg"] = uv .. "ēnum" data.num = "sg" elseif stem:match("^[uv]īs$") then data.decl = "3" local uv = stem:sub(1, 1) insert_if_not(data.title, "defectivo") forms["nom_sg"] = uv .. "īs" forms["gen_sg"] = uv .. "īs" forms["dat_sg"] = uv .. "ī" forms["acc_sg"] = uv .. "im" forms["abl_sg"] = uv .. "ī" forms["voc_sg"] = uv .. "īs" forms["nom_pl"] = uv .. "īrēs" forms["gen_pl"] = uv .. "īrium" forms["dat_pl"] = uv .. "īribus" forms["acc_pl"] = {uv .. "īrēs", uv .. "īrīs"} forms["abl_pl"] = uv .. "īribus" forms["voc_pl"] = uv .. "īrēs" else error("Stem " .. stem .. " not recognized.") end end local adj_decl = {} adj_decl["0+"] = function(data, args) local forms, categories = data.forms, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = stem forms["gen_sg_m"] = stem forms["gen_pl_m"] = stem forms["dat_sg_m"] = stem forms["dat_pl_m"] = stem forms["acc_sg_m"] = stem forms["acc_pl_m"] = stem forms["abl_sg_m"] = stem forms["abl_pl_m"] = stem forms["voc_sg_m"] = stem forms["voc_pl_m"] = stem forms["loc_sg_m"] = stem forms["loc_pl_m"] = stem end adj_decl["1&2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera y segunda declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local original if types.er then local final2 = stem:sub(-2) if final2 == "er" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") elseif final2 == "ur" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") else error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem) end stem, original = args[2], stem end local us = "us" local a_sf = "a" local um = "um" local ae_gsf = "ae" local am = "am" local a_macron = "ā" local i_pl = stem .. "ī" if types.greekA or types.greekE then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") if types.greekA then us = "os" um = "on" am = "ān" else us = "os" a_sf = "ē" um = "on" ae_gsf = "ēs" am = "ēn" a_macron = "ē" end i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = original or (stem .. us) forms["nom_sg_f"] = stem .. a_sf forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_f"] = stem .. ae_gsf forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_f"] = stem .. "ae" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_f"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_f"] = stem .. am forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_f"] = stem .. a_macron forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_f"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = original or (stem .. "e") forms["voc_sg_f"] = stem .. a_sf forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" if types.ius then insert_if_not(data.title, "pronominal") --insert_if_not(subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''") forms["gen_sg_m"] = stem .. "ī̆us" forms["gen_sg_f"] = stem .. "ī̆us" forms["gen_sg_n"] = stem .. "ī̆us" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_f"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" elseif types.not_ius then insert_if_not(data.title, "no pronominal") --insert_if_not(subtitles, "with normal genitive and dative singular") end if stem == "me" then forms["voc_sg_m"] = "mī" end if types.ic then --insert_if_not(subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''") local oc = "oc" local oc_macron = "ōc" if stem == "ill" then oc = "uc" oc_macron = "ūc" end forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = stem .. oc forms["nom_pl_n"] = stem .. "aec" forms["gen_sg_m"] = stem .. "uius" forms["gen_sg_f"] = stem .. "uius" forms["gen_sg_n"] = stem .. "uius" forms["dat_sg_m"] = stem .. "uic" forms["dat_sg_f"] = stem .. "uic" forms["dat_sg_n"] = stem .. "uic" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = stem .. oc forms["acc_pl_n"] = stem .. "aec" forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. oc_macron forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} end if types.distr then if stem:sub(-1) == "n" then forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum{R}"} forms["gen_pl_f"] = {stem .. "um", stem .. "ārum{R}"} forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum{R}"} else error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem) end end forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["1-1+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") forms["nom_sg_m"] = stem .. "a" forms["nom_pl_m"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ae" forms["gen_pl_m"] = stem .. "ārum" forms["dat_sg_m"] = stem .. "ae" forms["dat_pl_m"] = stem .. "īs" forms["acc_sg_m"] = stem .. "am" forms["acc_sg_n"] = stem .. "a" forms["acc_pl_m"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ā" forms["abl_pl_m"] = stem .. "īs" forms["voc_sg_m"] = stem .. "a" forms["voc_pl_m"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["2-2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "segunda declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local us = "us" local um = "um" local i_pl = stem .. "ī" if types.greek then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") us = "os" um = "on" i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = stem .. us forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = stem .. "e" forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end local function abl_i_e(...) local function update_slot(forms, slot, f, do_copy) if not forms[slot] then return do_copy elseif do_copy then f = deep_copy(f) end forms[slot] = f return true end function abl_i_e(stem, forms, types) local f, do_copy if types["abl_e_i"] then f = {stem .. "e", stem .. "ī"} elseif types["abl_i_e"] then f = {stem .. "ī", stem .. "e"} else return end do_copy = update_slot(forms, "abl_sg_m", f, do_copy) do_copy = update_slot(forms, "abl_sg_f", f, do_copy) -- Neuter doesn't take -e with i-stems. if not types.I then update_slot(forms, "abl_sg_n", f, do_copy) end end return abl_i_e(...) end adj_decl["3-1+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) if types.par then forms["nom_pl_n"] = stem2 .. "a" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["abl_sg_m"] = stem2 .. "e" forms["abl_sg_n"] = stem2 .. "e" forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"} -- Really? forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"} -- Why does this happen? forms["acc_pl_n"] = stem2 .. "a" forms["voc_pl_n"] = stem2 .. "a" end local es_base = stem1:match("^(.-)ēs$") if es_base and es_base == stem2 then if types.greek then forms["nom_sg_n"] = {stem2 .. "ē̆s{?}"} forms["acc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_m"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["nom_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["acc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["voc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["abl_sg_m"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["abl_sg_n"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["gen_pl_m"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} forms["gen_pl_n"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Adjetivos griegos") elseif types.not_greek then insert_if_not(data.title, "no griego") end end end adj_decl["3-def+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, defectivo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = stem2 .. "ēs" forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" if types.tor then insert_if_not(data.title, "tercera declinación, solo en masculino") insert_if_not(categories, "LA:Adjetivos solo en masculino") remove_forms(forms, {"_f$", "_n$"}) forms["nom_sg_m"] = stem1 forms["gen_sg_m"] = stem2 .. "is" forms["dat_sg_m"] = stem2 .. "ī" forms["acc_sg_m"] = stem2 .. "em" forms["abl_sg_m"] = stem2 .. "e" forms["voc_sg_m"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["gen_pl_m"] = stem2 .. "um" forms["dat_pl_m"] = stem2 .. "ibus" forms["acc_pl_m"] = stem2 .. "ēs" forms["abl_pl_m"] = stem2 .. "ibus" forms["voc_pl_m"] = stem2 .. "ēs" end if types.trix then insert_if_not(data.title, "tercera declinación, solo en femenino o en neutro plural") insert_if_not(categories, "LA:Adjetivos solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en neutro") remove_forms(forms, {"_m$", "sg_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.trixf then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.idis then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = {stem2 .. "is", stem2 .. "os"} forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = {stem2 .. "em", stem2 .. "a"} forms["abl_sg_f"] = stem2 .. "e" forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} forms["gen_pl_f"] = stem2 .. "um" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = {stem2 .. "ēs", stem2 .. "as"} forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} end forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-C+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1 = args[1] local stem2 = stem1 .. "ōr" insert_if_not(data.title, "tercera declinación, comparativo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos comparativos") forms["nom_sg_m"] = stem1 .. "or" forms["nom_sg_n"] = stem1 .. "us" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "a" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 .. "us" forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} forms["acc_pl_n"] = stem2 .. "a" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 .. "or" forms["voc_sg_n"] = stem1 .. "us" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "a" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-P+"] = function(data, args) local forms, notes = data.forms, data.notes local stem2 = args[2] adj_decl["3-1+"](data, args) insert_if_not(data.title, "tercera declinación, participio") insert_if_not(data.categories, "LA:Adjetivos de la tercera declinación") forms["abl_sg_m"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["abl_sg_n"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} end adj_decl["3-2+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem = args[1] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem .. "is" forms["nom_sg_n"] = stem .. "e" forms["nom_pl_m"] = stem .. "ēs" forms["nom_pl_n"] = stem .. "ia" forms["gen_sg_m"] = stem .. "is" forms["gen_sg_n"] = stem .. "is" forms["gen_pl_m"] = stem .. "ium" forms["gen_pl_n"] = stem .. "ium" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" forms["dat_pl_m"] = stem .. "ibus" forms["dat_pl_n"] = stem .. "ibus" forms["acc_sg_m"] = stem .. "em" forms["acc_sg_n"] = stem .. "e" forms["acc_pl_m"] = {stem .. "īs", stem .. "ēs"} forms["acc_pl_n"] = stem .. "ia" forms["abl_sg_m"] = stem .. "ī" forms["abl_sg_n"] = stem .. "ī" forms["abl_pl_m"] = stem .. "ibus" forms["abl_pl_n"] = stem .. "ibus" -- abl_i_e(stem, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem .. "is" forms["voc_sg_n"] = stem .. "e" forms["voc_pl_m"] = stem .. "ēs" forms["voc_pl_n"] = stem .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-3+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con tres terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_f"] = stem2 .. "is" forms["nom_sg_n"] = stem2 .. "e" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_f"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_f"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_f"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_f"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_f"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_f"] = stem2 .. "em" forms["acc_sg_n"] = stem2 .. "e" forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_f"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_f"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_f"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" -- abl_i_e(stem2, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem1 forms["voc_sg_f"] = stem2 .. "is" forms["voc_sg_n"] = stem2 .. "e" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_f"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["indecl+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = {} forms["gen_sg_m"] = {} forms["gen_pl_m"] = {} forms["dat_sg_m"] = {} forms["dat_pl_m"] = {} forms["acc_sg_m"] = stem forms["acc_pl_m"] = {} forms["abl_sg_m"] = {} forms["abl_pl_m"] = {} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["irreg+"] = function(data,args) local forms, types, pos, notes, categories = data.forms, data.types, data.pos, data.notes, data.categories local arg1 = args[1] insert_if_not(data.title, "irregular") insert_if_not(categories, "LA:Adjetivos irregulares") if arg1 == "duo" or arg1 == "ambō" then local stem = sub(arg1, 1, -2) -- data.title = stem == "amb" and "irregular adjective" or "numeral" data.num = "pl" local stem_with_o = stem .. (stem == "amb" and "ō" or "o") forms["nom_pl_m"] = stem_with_o forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem_with_o forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_pl_m"] = stem .. "ōbus" forms["dat_pl_f"] = stem .. "ābus" forms["dat_pl_n"] = stem .. "ōbus" forms["acc_pl_m"] = {stem .. "ōs", stem_with_o} forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem_with_o forms["abl_pl_m"] = stem .. "ōbus" forms["abl_pl_f"] = stem .. "ābus" forms["abl_pl_n"] = stem .. "ōbus" forms["voc_pl_m"] = stem_with_o forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem_with_o if stem == "du" then forms["gen_pl_m"] = {forms["gen_pl_m"], "duum", "duom{†}"} forms["gen_pl_n"] = {forms["gen_pl_n"], "duum", "duom{†}"} end elseif arg1:sub(-6) == "mīlle" then insert_if_not(data.title, "numeral semiindeclinable") local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "le" forms["nom_pl_m"] = {stem .. "ia", stem .. "lia"} forms["gen_sg_m"] = stem .. "le" forms["gen_pl_m"] = {stem .. "ium", stem .. "lium"} forms["dat_sg_m"] = stem .. "le" forms["dat_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["acc_sg_m"] = stem .. "le" forms["acc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["abl_sg_m"] = stem .. "le" forms["abl_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["voc_sg_m"] = stem .. "le" forms["voc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) elseif arg1 == "ille" or arg1 == "iste" or arg1 == "ipse" or arg1 == "olle" then local stem = arg1:sub(1, -2) types.ius = true adj_decl["1&2+"](data, {stem}) insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) forms["nom_sg_m"] = arg1 if arg1 == "ipse" then add_form(forms, "nom_sg_n", stem, "ud{MED}") add_form(forms, "acc_sg_n", stem, "ud{MED}") else forms["nom_sg_n"] = stem .. "ud" forms["acc_sg_n"] = stem .. "ud" end forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} elseif arg1 == "illic" or arg1 == "istic" or arg1 == "isthic" then insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["gen_sg_m"] = stem .. "ī̆usce" forms["gen_sg_f"] = stem .. "ī̆usce" forms["gen_sg_n"] = stem .. "ī̆usce" forms["dat_sg_m"] = stem .. "īc" forms["dat_sg_f"] = stem .. "īc" forms["dat_sg_n"] = stem .. "īc" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. "ōc" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["nom_pl_m"] = stem .. "īsce" forms["nom_pl_f"] = stem .. "aec" forms["nom_pl_n"] = stem .. "aec" forms["gen_pl_m"] = stem .. "ōrunc{?}" forms["gen_pl_f"] = stem .. "ārunc{?}" forms["gen_ok_n"] = stem .. "ōrunc{?}" forms["dat_pl_m"] = stem .. "īsce" forms["dat_pl_f"] = stem .. "īsce" forms["dat_pl_n"] = stem .. "īsce" forms["acc_pl_m"] = stem .. "ōsce" forms["acc_pl_f"] = stem .. "āsce" forms["acc_pl_n"] = stem .. "aec" forms["abl_pl_m"] = stem .. "īsce" forms["abl_pl_f"] = stem .. "īsce" forms["abl_pl_n"] = stem .. "īsce" forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "hice" then insert_if_not(data.title, "demostrativo") -- .. " pronoun" forms["nom_sg_m"] = "hice" forms["nom_sg_f"] = "haece" forms["nom_sg_n"] = "hoce" forms["nom_pl_m"] = "hīce" forms["nom_pl_f"] = "haece" forms["nom_pl_n"] = "haece" forms["gen_sg_m"] = "huiusce" forms["gen_sg_f"] = "huiusce" forms["gen_sg_n"] = "huiusce" forms["gen_pl_m"] = {"hōrunce", "hōrumce"} forms["gen_pl_f"] = {"hārunce", "hārumce"} forms["gen_pl_n"] = {"hōrunce", "hōrumce"} forms["dat_sg_m"] = "huīce" forms["dat_sg_f"] = "huīce" forms["dat_sg_n"] = "huīce" forms["dat_pl_m"] = "hīsce" forms["dat_pl_f"] = "hīsce" forms["dat_pl_n"] = "hīsce" forms["acc_sg_m"] = "hunce" forms["acc_sg_f"] = "hance" forms["acc_sg_n"] = "hoce" forms["acc_pl_m"] = "hōsce" forms["acc_pl_f"] = "hāsce" forms["acc_pl_n"] = "haece" forms["abl_sg_m"] = "hōce" forms["abl_sg_f"] = "hāce" forms["abl_sg_n"] = "hōce" forms["abl_pl_m"] = "hīsce" forms["abl_pl_f"] = "hīsce" forms["abl_pl_n"] = "hīsce" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "plūs" then insert_if_not(data.title, "comparativo") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación con una terminación") data.note = "Ninguna de las formas en singular se usaron en latín clásico" forms["nom_sg_n"] = "plūs" forms["nom_pl_m"] = "plūrēs" forms["nom_pl_n"] = "plūra" forms["gen_sg_m"] = "plūris" forms["gen_sg_n"] = "plūris" forms["gen_pl_m"] = "plūrium" forms["gen_pl_n"] = "plūrium" forms["dat_sg_m"] = "plūrī" forms["dat_sg_n"] = "plūrī" forms["dat_pl_m"] = "plūribus" forms["dat_pl_n"] = "plūribus" forms["acc_sg_m"] = "plūrem" forms["acc_sg_f"] = "plūrem" forms["acc_sg_n"] = "plūs" forms["acc_pl_m"] = {"plūrēs", "plūrīs"} forms["acc_pl_n"] = "plūra" forms["abl_sg_m"] = {"plūrī", "plūre"} forms["abl_sg_f"] = {"plūrī", "plūre"} forms["abl_sg_n"] = {"plūrī", "plūre"} forms["abl_pl_m"] = "plūribus" forms["abl_pl_n"] = "plūribus" forms["voc_sg_n"] = "plūs" forms["voc_pl_m"] = "plūrēs" forms["voc_pl_n"] = "plūra" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif match(arg1, "^egō̆?$") or arg1 == "nōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "nōs" forms["gen_sg_m"] = "meī" forms["gen_pl_m"] = {"nostrī", "nostrum"} forms["dat_sg_m"] = "mihī̆" forms["dat_pl_m"] = "nōbīs" forms["acc_sg_m"] = {"mē", "mēmē"} forms["acc_pl_m"] = "nōs" forms["abl_sg_m"] = {"mē", "mēmē"} forms["abl_pl_m"] = "nōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "nōs" elseif arg1 == "tū" or arg1 == "vōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "vōs" forms["gen_sg_m"] = "tuī" forms["gen_pl_m"] = {"vestrī", "vestrum"} forms["dat_sg_m"] = "tibī̆" forms["dat_pl_m"] = "vōbīs" forms["acc_sg_m"] = {"tē", "tētē"} forms["acc_pl_m"] = "vōs" forms["abl_sg_m"] = {"tē", "tētē"} forms["abl_pl_m"] = "vōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "vōs" elseif arg1 == "suī" then insert_if_not(data.title, "pronombre reflexivo") forms["nom_sg_m"] = {} forms["nom_pl_m"] = {} forms["gen_sg_m"] = arg1 forms["gen_pl_m"] = forms["gen_sg_m"] forms["dat_sg_m"] = "sibī̆" forms["dat_pl_m"] = forms["dat_sg_m"] forms["acc_sg_m"] = {"sē", "sēsē"} forms["acc_pl_m"] = {"sē", "sēsē"} forms["abl_sg_m"] = {"sē", "sēsē"} forms["abl_pl_m"] = {"sē", "sēsē"} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} elseif arg1 == "is" or arg1 == "īdem" then insert_if_not(data.title, "pronombre demostrativo") forms["nom_sg_m"] = "is" forms["nom_sg_f"] = "ea" forms["nom_sg_n"] = "id" forms["nom_pl_m"] = {"iī", "eī", "ī"} forms["nom_pl_f"] = "eae" forms["nom_pl_n"] = "ea" forms["gen_sg_m"] = {"eius", "ejus"} forms["gen_sg_f"] = {"eius", "ejus"} forms["gen_sg_n"] = {"eius", "ejus"} forms["gen_pl_m"] = {"eōrum", "eum"} forms["gen_pl_f"] = "eārum" forms["gen_pl_n"] = {"eōrum", "eum"} forms["dat_sg_m"] = {"eī", "e͡i", "ēī"} forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"} forms["dat_sg_n"] = {"eī", "e͡i", "ēī"} forms["dat_pl_m"] = {"iīs", "eīs", "īs"} forms["dat_pl_f"] = {"iīs", "eīs", "īs", "eābus"} forms["dat_pl_n"] = {"iīs", "eīs", "īs"} forms["acc_sg_m"] = "eum" forms["acc_sg_f"] = "eam" forms["acc_sg_n"] = "id" forms["acc_pl_m"] = "eōs" forms["acc_pl_f"] = "eās" forms["acc_pl_n"] = "ea" forms["abl_sg_m"] = "eō" forms["abl_sg_f"] = "eā" forms["abl_sg_n"] = "eō" forms["abl_pl_m"] = {"iīs", "eīs", "īs"} forms["abl_pl_f"] = {"iīs", "eīs", "īs"} forms["abl_pl_n"] = {"iīs", "eīs", "īs"} if arg1 == "īdem" then forms["nom_sg_m"] = "ī" forms["nom_sg_n"] = "i" forms["acc_sg_n"] = "i" end elseif arg1 == "quis" or arg1 == "quī" then data.note = "La forma ''qua'' es preferida frente a ''quae'' cuando se usa como indefinido" local id = "id" if arg1 == "quī" then insert_if_not(data.title, "determinante relativo/interrogativo") id = "od" forms["nom_sg_m"] = {"quī", "quis", "quei{†}"} forms["nom_sg_f"] = {"quae", "qua"} forms["acc_sg_f"] = "quam" forms["abl_sg_m"] = "quō" forms["abl_sg_f"] = "quā" forms["abl_sg_n"] = "quō" else insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = {"quis", "quī"} forms["nom_sg_f"] = {"quae", "qua", "quis{†}"} forms["acc_sg_f"] = {"quam", "quem{†}"} forms["abl_sg_m"] = {"quō", "quī"} forms["abl_sg_f"] = {"quā", "quī"} forms["abl_sg_n"] = {"quō", "quī"} end forms["nom_sg_n"] = "qu"..id forms["nom_pl_m"] = {"quī", "quei{†}"} forms["nom_pl_f"] = "quae" forms["nom_pl_n"] = {"quae", "qua"} forms["gen_sg_m"] = {"cuius", "quoius{†}"} forms["gen_sg_f"] = {"cuius", "quoius{†}"} forms["gen_sg_n"] = {"cuius", "quoius{†}"} forms["gen_pl_m"] = "quōrum" forms["gen_pl_f"] = "quārum" forms["gen_pl_n"] = "quōrum" forms["dat_sg_m"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_f"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_n"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_n"] = {"quibus", "quīs", "queis{†}"} forms["acc_sg_m"] = "quem" forms["acc_sg_n"] = "qu"..id forms["acc_pl_m"] = "quōs" forms["acc_pl_f"] = "quās" forms["acc_pl_n"] = {"quae", "qua"} forms["abl_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_n"] = {"quibus", "quīs", "queis{†}"} elseif arg1 == "aliquī" then insert_if_not(data.title, "determinante indefinido") forms["nom_sg_m"] = {"aliquī{DET/ADJ}", "aliquis{PRON/SUST}"} forms["nom_sg_f"] = {"aliqua", "aliquae{R}"} forms["nom_sg_n"] = "aliquod" forms["nom_pl_m"] = "aliquī" forms["nom_pl_f"] = "aliquae" forms["nom_pl_n"] = "aliqua" forms["gen_sg_m"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_f"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_n"] = {"alicuius", "aliquoius{†}"} forms["gen_pl_m"] = "aliquōrum" forms["gen_pl_f"] = "aliquārum" forms["gen_pl_n"] = "aliquōrum" forms["dat_sg_m"] = {"alicui", "aliquoi{†}"} forms["dat_sg_f"] = {"alicui", "aliquoi{†}"} forms["dat_sg_n"] = {"alicui", "aliquoi{†}"} forms["dat_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["acc_sg_m"] = "aliquem" forms["acc_sg_f"] = "aliquam" forms["acc_sg_n"] = "aliquod" forms["acc_pl_m"] = "aliquōs" forms["acc_pl_f"] = "aliquās" forms["acc_pl_n"] = "aliqua" forms["abl_sg_m"] = "aliquō" forms["abl_sg_f"] = "aliquā" forms["abl_sg_n"] = "aliquō" forms["abl_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} elseif arg1 == "quisquam" then insert_if_not(data.title, "determinante indefinido, concordancia en negativo") data.note = "En latín clásico, era preferidas las formas de ''ūllus'' en lugar de las esta voz para el femenino y el neutro." forms["nom_sg_m"] = "quisquam" forms["nom_sg_f"] = {"quaequam", "quisquam{†}"} forms["nom_sg_n"] = "quodquam" forms["nom_pl_m"] = "quīquam" forms["nom_pl_f"] = "quaequam" forms["nom_pl_n"] = "quaequam" forms["gen_sg_m"] = "cuiusquam" forms["gen_sg_f"] = "cuiusquam" forms["gen_sg_n"] = "cuiusquam" forms["gen_pl_m"] = "quōrumquam" forms["gen_pl_f"] = "quārumquam" forms["gen_pl_n"] = "quōrumquam" forms["dat_sg_m"] = "cuiquam" forms["dat_sg_f"] = "cuiquam" forms["dat_sg_n"] = "cuiquam" forms["dat_pl_m"] = "quibusquam" forms["dat_pl_f"] = "quibusquam" forms["dat_pl_n"] = "quibusquam" forms["acc_sg_m"] = "quemquam" forms["acc_sg_f"] = {"quamquam", "quemquam{†}"} forms["acc_sg_n"] = "quodquam" forms["acc_pl_m"] = "quōsquam" forms["acc_pl_f"] = "quāsquam" forms["acc_pl_n"] = "quaequam" forms["abl_sg_m"] = {"quōquam", "quīquam{†}"} forms["abl_sg_f"] = "quāquam" forms["abl_sg_n"] = "quōquam" forms["abl_pl_m"] = "quibusquam" forms["abl_pl_f"] = "quibusquam" forms["abl_pl_n"] = "quibusquam" forms["voc_sg_m"] = "quisquam" forms["voc_sg_f"] = "quaequam" forms["voc_sg_n"] = "quodquam" forms["voc_pl_m"] = "quīquam" forms["voc_pl_f"] = "quaequam" forms["voc_pl_n"] = "quaequam" elseif arg1 == "quisquis" then insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = "quisquis" forms["nom_sg_f"] = "quisquis" forms["nom_sg_n"] = {"quidquid", "quicquid"} forms["nom_pl_m"] = "quīquī" forms["nom_pl_f"] = "quaequae" forms["nom_pl_n"] = "quaequae" forms["gen_sg_m"] = "cuiuscuius" forms["gen_sg_f"] = "cuiuscuius" forms["gen_sg_n"] = "cuiuscuius" forms["gen_pl_m"] = "quōrumquōrum" forms["gen_pl_f"] = "quārumquārum" forms["gen_pl_n"] = "quōrumquōrum" forms["dat_sg_m"] = "cuicui" forms["dat_sg_f"] = "cuicui" forms["dat_sg_n"] = "cuicui" forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"} forms["acc_sg_m"] = "quemquem" forms["acc_sg_f"] = "quamquam" forms["acc_sg_n"] = {"quidquid", "quicquid"} forms["acc_pl_m"] = "quōsquōs" forms["acc_pl_f"] = "quāsquās" forms["acc_pl_n"] = "quaequae" forms["abl_sg_m"] = "quōquō" forms["abl_sg_f"] = "quāquā" forms["abl_sg_n"] = "quōquō" forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"} forms["voc_sg_m"] = "quisquis" forms["voc_sg_f"] = "quisquis" forms["voc_sg_n"] = {"quidquid", "quicquid"} forms["voc_pl_m"] = "quīquī" forms["voc_pl_f"] = "quaequae" forms["voc_pl_n"] = "quaequae" elseif arg1 == "ecquis" then insert_if_not(data.title, "pronombre interrogativo") forms["nom_sg_m"] = {"ecquis", "ecquī"} forms["nom_sg_f"] = {"ecqua", "ecquae"} forms["nom_sg_n"] = "ecquid" forms["nom_pl_m"] = "ecquī" forms["nom_pl_f"] = "ecquae" forms["nom_pl_n"] = {"ecqua", "ecquae"} forms["gen_sg_m"] = "eccuius" forms["gen_sg_f"] = "eccuius" forms["gen_sg_n"] = "eccuius" forms["dat_sg_m"] = "eccui" forms["dat_sg_f"] = "eccui" forms["dat_sg_n"] = "eccui" forms["acc_sg_m"] = "ecquem" forms["acc_sg_f"] = "ecquam" forms["acc_sg_n"] = "ecquod" forms["acc_pl_m"] = "ecquōs" forms["acc_pl_f"] = "ecquās" forms["acc_pl_n"] = {"ecqua", "ecquae"} forms["abl_sg_m"] = {"ecquō", "ecquī"} forms["abl_sg_f"] = {"ecquā", "ecquī"} forms["abl_sg_n"] = {"ecquō", "ecquī"} elseif arg1 == "quīdam" then insert_if_not(data.title, "pronombre indefinido") forms["nom_sg_m"] = "quīdam" forms["nom_sg_f"] = "quaedam" forms["nom_sg_n"] = "quiddam" forms["nom_pl_m"] = {"quīdam", "quēsdam{†}"} forms["nom_pl_f"] = "quaedam" forms["nom_pl_n"] = "quaedam" forms["gen_sg_m"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_f"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_n"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_pl_m"] = {"quōrundam", "quōrumdam"} forms["gen_pl_f"] = {"quārundam", "quārumdam"} forms["gen_pl_n"] = {"quōrundam", "quōrumdam"} forms["dat_sg_m"] = {"cuidam", "quoidam{†}"} forms["dat_sg_f"] = {"cuidam", "quoidam{†}"} forms["dat_sg_n"] = {"cuidam", "quoidam{†}"} forms["dat_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_n"] = {"quibusdam", "quīsdam{†}"} forms["acc_sg_m"] = {"quendam", "quemdam"} forms["acc_sg_f"] = {"quandam", "quamdam"} forms["acc_sg_n"] = "quiddam" forms["acc_pl_m"] = {"quōsdam", "quēsdam{†}"} forms["acc_pl_f"] = "quāsdam" forms["acc_pl_n"] = "quaedam" forms["abl_sg_m"] = "quōdam" forms["abl_sg_f"] = "quādam" forms["abl_sg_n"] = "quōdam" forms["abl_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_n"] = {"quibusdam", "quīsdam{†}"} elseif arg1 == "nēmō" then insert_if_not(data.title, "Determinante y pronombre, concordancia en negativo") forms["nom_sg_m"] = "nēmō" forms["nom_sg_f"] = "nēmō" forms["gen_sg_m"] = {"nūllī̆us", "nēminis{R}"} forms["gen_sg_f"] = {"nūllī̆us", "nēminis{R}"} forms["dat_sg_m"] = "nēminī" forms["dat_sg_f"] = "nēminī" forms["acc_sg_m"] = "nēminem" forms["acc_sg_f"] = "nēminem" forms["abl_sg_m"] = {"nūllō", "nēmine{R}"} forms["abl_sg_f"] = {"nūllā", "nēmine{R}"} else error('adjective ' .. arg1 .. ' not recognized') end end local function extract_base(lemma, ending) if ending:find("(", nil, true) then return match(lemma, ending) end return match(lemma, "^(.*)" .. ending .. "$") end local function get_noun_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local subtypes = ending_and_subtypes[2] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. -- In addition, M or F as a subtype is canceled by N, and -- vice-versa, but M doesn't cancel F or vice-versa; instead, -- we simply ignore the conflicting gender specification when -- constructing the combination of specified and inferred subtypes. -- The reason for this is that neuters have distinct declensions -- from masculines and feminines, but masculines and feminines have -- the same declension, and various nouns in Latin that are -- normally masculine are exceptionally feminine and vice-versa -- (nauta, agricola, fraxinus, malus "apple tree", manus, rēs, -- etc.). -- -- In addition, sg as a subtype is canceled by pl and vice-versa. -- It's also possible to specify both, which will override sg but -- not cancel it (in the sense that it won't prevent the relevant -- rule from matching). For example, there's a rule specifying that -- lemmas beginning with a capital letter and ending in -ius take -- the ius.voci.sg subtypes. Specifying such a lemma with the -- subtype both will result in the ius.voci.both subtypes, whereas -- specifying such a lemma with the subtype pl will cause this rule -- not to match, and it will fall through to a less specific rule -- that returns just the ius subtype, which will be combined with -- the explicitly specified pl subtype to produce ius.pl. if specified_subtypes["-" .. subtype] or subtype == "N" and (specified_subtypes.M or specified_subtypes.F) or (subtype == "M" or subtype == "F") and specified_subtypes.N or subtype == "sg" and specified_subtypes.pl or subtype == "pl" and specified_subtypes.sg then not_this_subtype = true break end end end if not not_this_subtype then if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] local base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending == stem2 then return base, stem2, subtypes end else local base = extract_base(lemma, ending) if base then return base, stem2, subtypes end end end end if decltype then error("Unrecognized ending for declension-" .. decltype .. " noun: " .. lemma) end return lemma, stem2, keys_to_list(specified_subtypes) end local patterns = { {"[mM]a", "%0t"}, {"e", ""}, {"([aoAO])([lr])", "%1" .. MACRON .. "%2"}, {"[eE]l", "%0l"}, {"([mM])en", "%1in"}, {"([tT]ūd)ō", "%1in"}, {"([gG])ō", "%1in"}, {"[ōŌ]", "%1n"}, {"er", "r"}, {"[ēi]s", ""}, {"([āēīōūȳĀĒĪŌŪȲ]n)s", function(v) return (gsub(toNFD(v), MACRON, "") .. "t") end}, {"([cC])eps", "%1ipit"}, {"([bp])s", "%1"}, {"us", "or"}, {"s", "t"}, {"ex", "ic"}, {"x", "c"}, } local function make_stem2(stem) local n for _, pattern in ipairs(patterns) do local key = pattern[1] stem, n = gsub(stem, key .. "$", pattern[2]) if n > 0 then -- debug_track("la-utilities/" .. key) REVISAR return toNFC(stem) end end -- debug_track("la-utilities") REVISAR return stem end local function detect_noun_subtype(lemma, stem2, typ, subtypes) local base, _ if typ == "1" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ām", {"F", "am"}}, {"ās", {"M", "Greek", "Ma"}}, {"ēs", {"M", "Greek", "Me"}}, {"ē", {"F", "Greek"}}, {"ae", {"F", "pl"}}, {"a", {"F"}}, }) elseif typ == "2" then local detected_subtypes lemma, stem2, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(.*r)$", {"M", "er"}}, {"^(.*v)os$", {"M", "vos"}}, {"^(.*v)om$", {"N", "vom"}}, -- If the lemma ends in -os and the user said N or -M, then the -- following won't apply, and the second (neuter) -os will applly. {"os", {"M", "Greek"}}, {"os", {"N", "Greek", "us"}}, {"on", {"N", "Greek"}}, -- -ius beginning with a capital letter is assumed a proper name, -- and takes the voci subtype (vocative in -ī) along with the ius -- subtype and sg-only. Other nouns in -ius just take the ius -- subtype. Explicitly specify "sg" so that if .pl is given, -- this rule won't apply. {"^(%u.*)ius$", {"M", "ius", "voci", "sg"}}, {"ius", {"M", "ius"}}, {"ium", {"N", "ium"}}, -- If the lemma ends in -us and the user said N or -M, then the -- following won't apply, and the second (neuter) -us will applly. {"us", {"M"}}, {"us", {"N", "us"}}, {"um", {"N"}}, {"iī", {"M", "ius", "pl"}}, {"ia", {"N", "ium", "pl"}}, -- If the lemma ends in -ī and the user said N or -M, then the -- following won't apply, and the second (neuter) -ī will applly. {"ī", {"M", "pl"}}, {"ī", {"N", "us", "pl"}}, {"oe", {"M", "Greek", "pl"}}, {"a", {"N", "pl"}}, }) stem2 = stem2 or lemma return lemma, stem2, detected_subtypes elseif typ == "3" then if subtypes.pl then if subtypes.Greek then base = lemma:match("^(.*)erēs$") if base then return base .. "ēr", base .. "er", {"er"} end base = lemma:match("^(.*)ontēs$") if base then return base .. "ōn", base .. "ont", {"on"} end base = lemma:match("^(.*)es$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural Greek noun: " .. lemma) end base = lemma:match("^(.*)ia$") if base then return base, stem2 or base, {"N", "I", "pure"} end base = lemma:match("^(.*)a$") if base then return base, stem2 or base, {"N"} end base = lemma:match("^(.*)ēs$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural noun: " .. lemma) end stem2 = stem2 or make_stem2(lemma) local detected_subtypes if subtypes.Greek then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"is", ""}, {"I"}}, {"ēr", {"er"}}, {"ōn", {"on"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} end if not subtypes.N then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"^(%u.*pol)is$", ""}, {"F", "polis", "sg", "loc"}}, {{"tūdō", "tūdin"}, {"F"}}, {{"tās", "tāt"}, {"F"}}, {{"tūs", "tūt"}, {"F"}}, {{"tiō", "tiōn"}, {"F"}}, {{"siō", "siōn"}, {"F"}}, {{"xiō", "xiōn"}, {"F"}}, {{"gō", "gin"}, {"F"}}, {{"or", "ōr"}, {"M"}}, {{"tr[iī]x", "trīc"}, {"F"}}, {{"is", ""}, {"I"}}, {{"^(%l.*)ēs$", ""}, {"I"}}, }) if base then return lemma, stem2, detected_subtypes end end base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"us", "or"}, {"N"}}, {{"us", "er"}, {"N"}}, {{"ma", "mat"}, {"N"}}, {{"men", "min"}, {"N"}}, {{"^(%u.*)e$", ""}, {"N", "sg"}}, {{"e", ""}, {"N", "I", "pure"}}, {{"al", "āl"}, {"N", "I", "pure"}}, {{"ar", "ār"}, {"N", "I", "pure"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} elseif typ == "4" then if subtypes.echo or subtypes.Callisto then base = lemma:match("^(.*)ō$") if not base then error("Declension-4 noun of subtype .echo or .Callisto should end in -ō: " .. lemma) end if subtypes.Callisto then return base, nil, {"F", "sg"} else return base, nil, {"F"} end end return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", {"M"}}, {"ū̆", {"N"}}, {"ūs", {"M", "pl"}}, {"ua", {"N", "pl"}}, }) elseif typ == "5" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"iēs", {"F", "i"}}, {"iēs", {"F", "i", "pl"}}, {"ēs", {"F"}}, {"ēs", {"F", "pl"}}, }) elseif typ == "sgpl" then return lemma, stem2, {} elseif typ == "irreg" and lemma == "domus" then -- [[domus]] auto-sets data.loc = true, but we need to know this -- before declining the noun so we can propagate it to other segments. return lemma, nil, {"loc"} elseif typ == "indecl" or typ == "irreg" and ( lemma == "Deus" or match(lemma, "^[IJ]ēs[uū]s$") or lemma == "Athōs" or lemma == "vēnum" ) then -- Indeclinable nouns, and certain irregular nouns, set data.num = "sg", -- but we need to know this before declining the noun so we can -- propagate it to other segments. return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", {"both"}}, {"", {"sg"}}, {"", {"pl"}}, }) elseif typ == "indecl" or typ == "irreg" then return lemma, nil, {} else return nil, nil, {} end end -- Given ENDINGS_AND_SUBTYPES (a list of four-tuples of ENDING, RETTYPE, -- SUBTYPES, PROCESS_RETVAL), check each ENDING in turn against LEMMA and -- STEM2. If it matches, return a four-tuple BASE, STEM2, RETTYPE, NEW_SUBTYPES -- where BASE is normally the remainder of LEMMA minus the ending, STEM2 is -- as passed in, RETTYPE is as passed in, and NEW_SUBTYPES is the same as -- SUBTYPES minus any subtypes beginning with a hyphen. If no endings match, -- throw an error if DECLTYPPE is non-nil, mentioning the DECLTYPE -- (user-specified declension); but if DECLTYPE is nil, just return the tuple -- nil, nil, nil, nil. -- -- In order for a given entry to match, ENDING must match and also the subtypes -- in SUBTYPES (a list) must not be incompatible with the passed-in -- user-specified subtypes SPECIFIED_SUBTYPES (a set, i.e. a table where the -- keys are strings and the value is always true). "Incompatible" means that -- a given SUBTYPE is specified in either one and -SUBTYPE in the other, or -- that "pl" is found in SPECIFIED_SUBTYPES and not in SUBTYPES. -- -- The ending spec in ENDINGS_AND_SUBTYPES is one of the following: -- -- 1. A simple string, e.g. "tūdō", specifying an ending. -- 2. A regex that should match the entire lemma (it should be anchored at -- the beginning with ^ and at the end with $), and contains a single -- capturing group to match the base. -- 3. A pair {SIMPLE_STRING_OR_REGEX, STEM2_ENDING} where -- SIMPLE_STRING_OR_REGEX is one of the previous two possibilities and -- STEM2_ENDING is a string specifying the corresponding ending that must -- be present in STEM2. If this form is used, the combination of -- base + STEM2_ENDING must exactly match STEM2 in order for this entry -- to be considered a match. An example is {"is", ""}, which will match -- lemma == "follis", stem2 == "foll", but not lemma == "lapis", -- stem2 == "lapid". -- -- If PROCESS_STEM2 is given and the returned STEM2 would be nil, call -- process_stem2(BASE) to get the STEM2 to return. local function get_adj_type_and_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes, process_stem2) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local rettype = ending_and_subtypes[2] local subtypes = ending_and_subtypes[3] local process_retval = ending_and_subtypes[4] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. if specified_subtypes["-" .. subtype] then not_this_subtype = true break end -- A subtype is canceled if the user specified SUBTYPE and -- -SUBTYPE is given in the to-be-returned subtypes. local must_not_be_present = subtype:match("^%-(.*)$") if must_not_be_present and specified_subtypes[must_not_be_present] then not_this_subtype = true break end end end if not not_this_subtype then local base if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending ~= stem2 then base = nil end else base = extract_base(lemma, ending) end if base then -- Remove subtypes of the form -SUBTYPE from the subtypes -- to be returned. local new_subtypes = {} for _, subtype in ipairs(subtypes) do if subtype:sub(1, 1) ~= "-" then insert(new_subtypes, subtype) end end if process_retval then base, stem2 = process_retval(base, stem2) end if process_stem2 then stem2 = stem2 or process_stem2(base) end return base, stem2, rettype, new_subtypes end end end if not decltype then return lemma, stem2, nil, keys_to_list(specified_subtypes) elseif decltype == "" then error("Unrecognized ending for adjective: " .. lemma) else error("Unrecognized ending for declension-" .. decltype .. " adjective: " .. lemma) end end -- Autodetect the type and subtype of an adjective given all the information -- specified by the user: lemma, stem2, declension type and specified subtypes. -- Four values are returned: the lemma base (i.e. the stem of the lemma, as -- required by the declension functions), the value of stem2 to pass to the -- declension function, the declension type and the autodetected subtypes. -- Note that this will not detect a given subtype if -SUBTYPE is specified for -- any subtype that would be returned, or if SUBTYPE is specified and -SUBTYPE -- is among the subtypes that would be returned (such subtypes are filtered out -- of the returned subtypes). local function detect_adj_type_and_subtype(lemma, stem2, typ, subtypes) local function base_as_stem2(base, stem2) return base, base end local function constant_base(baseval) return function(base, stem2) return baseval, nil end end local function decl12_stem2(base) return base end local function decl3_stem2(base) return make_stem2(base) end local decl12_entries = { {"us", "1&2+", {}}, {"a", "1&2+", {}}, {"um", "1&2+", {}}, {"ī", "1&2+", {"pl"}}, {"ae", "1&2+", {"pl"}}, {"a", "1&2+", {"pl"}}, -- Nearly all -os adjectives are greekA {"os", "1&2+", {"greekA", "-greekE"}}, {"os", "1&2+", {"greekE", "-greekA"}}, {"ē", "1&2+", {"greekE", "-greekA"}}, {"on", "1&2+", {"greekA", "-greekE"}}, {"on", "1&2+", {"greekE", "-greekA"}}, {"^(.*er)$", "1&2+", {"er"}}, {"^(.*ur)$", "1&2+", {"er"}}, {"^(h)ic$", "1&2+", {"ic"}}, } local decl3_entries = { {"^(.*er)$", "3-3+", {"I"}}, {"^(.*er)$", "3-3+", {}}, {"is", "3-2+", {"I"}}, {"is", "3-2+", {}}, {"e", "3-2+", {"I"}}, {"e", "3-2+", {}}, {"^(.*[ij])or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(.*[ij])or$", "3-C+", {}}, {"^(min)or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(min)or$", "3-C+", {}}, {"^(.*trīx)$", "3-def+", {"trix", "abl_i_e", "-abl_e_i"}}, {"^(.*trīx)$", "3-def+", {"trix"}}, {"^(.*tor)$", "3-def+", {"tor", "abl_i_e", "-abl_e_i"}}, {"^(.*tor)$", "3-def+", {"tor"}}, -- Detect -ēs as 3-1 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like quadripēs, volucripēs). -- Essentially, for declension-3 adjectives, we require that -- .pl is given if the lemma is plural. -- -- Most 3-1 adjectives are i-stem (e.g. audāx) so we require -I -- to be given with non-i-stem adjectives. The first entry below -- will apply when -I isn't given, the second when it is given. {"^(.*ēs)$", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"I"}}, {"^(.*ēs)$", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"par"}}, {"^(.*[ij])ōrēs$", "3-C+", {"pl"}}, {"^(min)ōrēs$", "3-C+", {"pl"}}, -- If .pl with -ēs, we don't know if the adjective is 3-1, 3-2 -- or 3-3. Since 3-2 is probably the most common, we infer it -- (as well as the fact that these adjectives *are* in a sense -- 3-2 since they have a distinct neuter in -(i)a. Note that -- we have two entries here; the first one will apply unless -- -I is given, and will infer an i-stem adjective; the second -- one will apply otherwise (and infer a non-i-stem 3-1 adjective). {"ēs", "3-2+", {"pl", "I"}, base_as_stem2}, {"ēs", "3-1+", {"pl", "par"}, base_as_stem2}, -- Same for neuters. {"ia", "3-2+", {"pl", "I"}, base_as_stem2}, {"a", "3-1+", {"pl", "par"}, base_as_stem2}, -- As above for -ēs but for miscellaneous singulars. {"", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"I"}}, {"", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"par"}}, } local function get_subtypes_and_endings(typ, f) local subtypes_and_endings = {} for _, v in ipairs(decl3_entries) do if f(v) then v = deep_copy(v) v[2] = typ insert(subtypes_and_endings, v) end end return subtypes_and_endings end local function compare(spec) return spec[2] == typ end if typ == "+" then local base, new_stem2, rettype, new_subtypes = get_adj_type_and_subtype_by_ending(lemma, stem2, nil, subtypes, decl12_entries, decl12_stem2) if rettype then return base, new_stem2, rettype, new_subtypes else return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) end elseif typ == "3+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) elseif typ == "1&2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl12_entries, decl12_stem2) elseif typ == "1-1+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"a", typ, {}}, {"ae", typ, {"pl"}}, }) elseif typ == "2-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", typ, {}}, {"um", typ, {}}, {"ī", typ, {"pl"}}, {"a", typ, {"pl"}}, {"os", typ, {"greek"}}, {"on", typ, {"greek"}}, {"oe", typ, {"greek", "pl"}}, }) elseif typ == "3-1+" then -- Use the specs from `decl3_entries`, but add the two i-stem 3-2+ specs when plural-only, as they're the same when 3-1+. local subtypes_and_endings = get_subtypes_and_endings(typ, function(spec) local spec1, spec2 = spec[1], spec[2] return spec2 == typ or (spec2 == "3-2+" and spec1 == "ēs" or spec1 == "ia") end) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-def+" then -- Like 3-1+ but defective in gender local subtypes_and_endings = get_subtypes_and_endings(typ, compare) insert(subtypes_and_endings, {"", typ, {"I"}}) insert(subtypes_and_endings, {"", typ, {"par"}}) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"is", typ, {}}, {"e", typ, {}}, -- Detect -ēs as 3-2 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like isoscelēs). Essentially, -- for declension-3 adjectives, we require that .pl is given -- if the lemma is plural. {"ēs", typ, {}}, {"ēs", typ, {"pl"}}, {"ia", typ, {"pl"}}, }, decl3_stem2) elseif typ == "3-3+" or typ == "3-P+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ēs", typ, {"pl"}, base_as_stem2}, {"ia", typ, {"pl"}, base_as_stem2}, {"", typ, {}}, }, decl3_stem2) elseif typ == "3-C+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, get_subtypes_and_endings(typ, compare), decl3_stem2) elseif typ == "irreg+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(duo)$", typ, {"pl"}}, {"^(ambō)$", typ, {"pl"}}, {"^(mīll?ia)$", typ, {"N", "pl"}, constant_base("mīlle")}, -- match ea {"^(ea)$", typ, {}, constant_base("is")}, -- match id {"^(id)$", typ, {}, constant_base("is")}, -- match plural eī, iī {"^([ei]ī)$", typ, {"pl"}, constant_base("is")}, -- match plural ea, eae {"^(eae?)$", typ, {"pl"}, constant_base("is")}, -- match eadem {"^(eadem)$", typ, {}, constant_base("īdem")}, -- match īdem, idem {"^([īi]dem)$", typ, {}, constant_base("īdem")}, -- match plural īdem {"^(īdem)$", typ, {"pl"}}, -- match plural eadem, eaedem {"^(eae?dem)$", typ, {"pl"}, constant_base("īdem")}, -- match illa, ipsa, ista; it doesn't matter if we overmatch because -- we'll get an error as we use the stem itself in the returned base {"^(i[lps][lst])a$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match illud, istud; as above, it doesn't matter if we overmatch {"^(i[ls][lt])ud$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match ipsum {"^(ipsum)$", typ, {}, constant_base("ipse")}, -- match plural illī, ipsī, istī; as above, it doesn't matter if we -- overmatch {"^(i[lps][lst])ī$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- match plural illa, illae, ipsa, ipsae, ista, istae; as above, it -- doesn't matter if we overmatch {"^(i[lps][lst])ae?$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- Detect quī as non-plural unless .pl specified. {"^(quī)$", typ, {}}, -- Otherwise detect quī as plural. {"^(quī)$", typ, {"pl"}}, -- Same for quae. {"^(quae)$", typ, {}, constant_base("quī")}, {"^(quae)$", typ, {"pl"}, constant_base("quī")}, {"^(quid)$", typ, {}, constant_base("quis")}, {"^(quod)$", typ, {}, constant_base("quī")}, {"^(qui[cd]quid)$", typ, {}, constant_base("quisquis")}, {"^(quīquī)$", typ, {"pl"}, constant_base("quisquis")}, {"^(quaequae)$", typ, {"pl"}, constant_base("quisquis")}, -- match all remaining lemmas in lemma form {"", typ, {}}, }) elseif typ == "indecl+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", typ, {"both"}}, {"", typ, {"sg"}}, {"", typ, {"pl"}}, }) else -- 0+ return lemma, nil, typ, {} end end local noun_lb = { nom_sg = "sg.", gen_sg = "sg.", dat_sg = "sg.", acc_sg = "sg.", abl_sg = "sg.", voc_sg = "sg.", loc_sg = "sg.", nom_pl = "pl.", gen_pl = "pl.", dat_pl = "pl.", acc_pl = "pl.", abl_pl = "pl.", voc_pl = "pl.", loc_pl = "pl." } function export.sust(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de = "num"}, ["nota"] = {}, } for form,_ in pairs(noun_lb) do params[form] = {lista=true} end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local genero local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, detected_subtypes = detect_noun_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end if not genero then if types.M then genero = "m" end if types.N then genero = "n" end if types.F then genero = "f" end end local es_adj if not r1 and genero then local typ r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) if r1 then c = typ es_adj = true end end assert(r1, "forma no reconocida: "..r[1]) local cb = es_adj and adj_decl[c] or noun_decl[c] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) if es_adj then local forms_ = {} for form,arr in pairs(data.forms) do local f1, f2 = form:match("^(.*)(_"..genero..")$") if f1 then forms_[f1] = arr end end data.forms = forms_ end if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, noun_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if declinfo["loc_sg"] and #declinfo["loc_sg"] == 0 then declinfo["loc_sg"] = nil end if declinfo["loc_pl"] and #declinfo["loc_pl"] == 0 then declinfo["loc_pl"] = nil end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local forms = sobreescribir_formas(declinfo, args, false, {}) comprobar_defectivo(forms, {}) forms = desactivar_formas(forms, function (form) return (form:find("pl$") and nopl) or (form:find("sg$") and nosg) end ) local raiz_nom = f(forms["nom_sg"][1] or forms["nom_pl"][1] or "?") local raiz_gen = f(forms["gen_sg"][1] or forms["gen_pl"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, noun_lb) local t = {} insert(t, {{""}, {"Singular"}, {"Plural"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg"], forms["nom_pl"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg"], forms["gen_pl"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg"], forms["dat_pl"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg"], forms["acc_pl"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg"], forms["abl_pl"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg"], forms["voc_pl"]}) if (forms["loc_sg"] and forms["loc_sg"][1]) or (forms["loc_pl"] and forms["loc_pl"][1]) then insert(t, {{"Locativo", header=true, color=COLOR_H}, forms["loc_sg"], forms["loc_pl"]}) end insert(t, {{args["nota"] or "", colspan=3}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_nom..", "..raiz_gen.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local adj_lb = { nom_sg_m = "m.", nom_sg_n = "n.", nom_sg_f = "f.", nom_pl_m = "m.", nom_pl_n = "n.", nom_pl_f = "f.", gen_sg_m = "m.", gen_sg_n = "n.", gen_sg_f = "f.", gen_pl_m = "m.", gen_pl_n = "n.", gen_pl_f = "f.", dat_sg_m = "m.", dat_sg_n = "n.", dat_sg_f = "f.", dat_pl_m = "m.", dat_pl_n = "n.", dat_pl_f = "f.", acc_sg_m = "m.", acc_sg_n = "n.", acc_sg_f = "f.", acc_pl_m = "m.", acc_pl_n = "n.", acc_pl_f = "f.", abl_sg_m = "m.", abl_sg_n = "n.", abl_sg_f = "f.", abl_pl_m = "m.", abl_pl_n = "n.", abl_pl_f = "f.", voc_sg_m = "m.", voc_sg_n = "n.", voc_sg_f = "f.", voc_pl_m = "m.", voc_pl_n = "n.", voc_pl_f = "f.", } function export.adj(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de="num"}, ["gen"] = {por_defecto="mfn"}, ["nota"] = {}, } for form,_ in pairs(adj_lb) do params[form] = {lista=true} end params["dat_pl"] = {lista=true} params["abl_pl"] = {lista=true} params["loc_pl"] = {lista=true} local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) if args["dat_pl"][1] then args["dat_pl_m"] = deep_copy(args["dat_pl"]) args["dat_pl_n"] = deep_copy(args["dat_pl"]) args["dat_pl_f"] = deep_copy(args["dat_pl"]) end if args["abl_pl"][1] then args["abl_pl_m"] = deep_copy(args["abl_pl"]) args["abl_pl_n"] = deep_copy(args["abl_pl"]) args["abl_pl_f"] = deep_copy(args["abl_pl"]) end if args["loc_pl"][1] then args["loc_pl_m"] = deep_copy(args["loc_pl"]) args["loc_pl_n"] = deep_copy(args["loc_pl"]) args["loc_pl_f"] = deep_copy(args["loc_pl"]) end args["dat_pl"] = nil args["abl_pl"] = nil args["loc_pl"] = nil assert(not find(title, " "), "locuciones no soportadas aún") -- REVISAR local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") a = a or subarg b = b or "+" local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end local cb = adj_decl[typ] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) local formas_ = {} -- necesario crear otro arreglo para no modificar las claves durante la iteración for form,arr in pairs(data.forms) do local pref = match(form, "^(.*)_m$") if pref and not data.forms[pref.."_f"] then formas_[pref.."_f"] = deep_copy(arr) end if pref and not data.forms[pref.."_n"] then formas_[pref.."_n"] = deep_copy(arr) end formas_[form] = arr end data.forms = formas_ if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, adj_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local m = find(args["gen"], "m") local fem = find(args["gen"], "f") local n = find(args["gen"], "n") local forms = sobreescribir_formas(declinfo, args, false, {}, adj_lb) comprobar_defectivo(forms) forms = desactivar_formas(forms, function (form) return (form:find("pl") and nopl) or (form:find("sg") and nosg) or (form:find("m$") and not m) or (form:find("f$") and not fem) or (form:find("n$") and not n) end ) local raiz_m = f(forms["nom_sg_m"][1] or forms["nom_pl_m"][1] or "?") local raiz_f = f(forms["nom_sg_f"][1] or forms["nom_pl_f"][1] or "?") local raiz_n = f(forms["nom_sg_n"][1] or forms["nom_pl_n"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, adj_lb) local t = {} insert(t, {{"Singular", colspan=4}, header=true, color=COLOR_H}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg_m"], forms["nom_sg_f"], forms["nom_sg_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg_m"], forms["gen_sg_f"], forms["gen_sg_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg_m"], forms["dat_sg_f"], forms["dat_sg_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg_m"], forms["acc_sg_f"], forms["acc_sg_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg_m"], forms["abl_sg_f"], forms["abl_sg_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg_m"], forms["voc_sg_f"], forms["voc_sg_n"]}) insert(t, {{"Plural", colspan=4, header=true, color=COLOR_H}}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_pl_m"], forms["nom_pl_f"], forms["nom_pl_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_pl_m"], forms["gen_pl_f"], forms["gen_pl_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_pl_m"], forms["dat_pl_f"], forms["dat_pl_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_pl_m"], forms["acc_pl_f"], forms["acc_pl_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_pl_m"], forms["abl_pl_f"], forms["abl_pl_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_pl_m"], forms["voc_pl_f"], forms["voc_pl_n"]}) insert(t, {{args["nota"] or "", colspan=4}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_m..", "..raiz_f..", "..raiz_n.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local EGO, TU, IS, NOS, VOS, EI = 1, 2, 3, 4, 5, 6 local tostr = {"1", "2", "3", "4", "5", "6"} local PRONOMBRES = {"ego", "tū", "is, ea, id", "nōs", "vōs", "eī, eae, ea"} local PRONOMBRES_SUBJ = {"ut ego", "ut tū", "ut is, ut ea, ut id", "ut nōs", "ut vōs", "ut eī, ut eae, ut ea"} local PRONOMBRES_IMP = {"―", "(tū)", "(is, ea, id)", "―", "(vōs)", "(eī, eae, ea)"} local IMPERSONALES = {"", "", "(id)", "", "", ""} local function obtener_pronombre(forma, impers) local conj, p = match(forma, "^(.*)(%d)$") if not p then return nil end p = tonumber(p) if impers then return IMPERSONALES[p] else if find(conj, "^subj") then return PRONOMBRES_SUBJ[p] end if find(conj, "^imper") then return PRONOMBRES_IMP[p] end return PRONOMBRES[p] end end local sufijos = { ["1"] = { inf_act = {"āre","isse"}, inf_pas = {"ārī"}, part_act = {"āns","ūrus"}, part_pas = {"andus","us"}, ger = {"andī","andō","andum"}, sup = {"um","ū"}, ind_pres = {"ō","ās","at","āmus","ātis","ant"}, ind_imp = {"ābam","ābās","ābat","ābāmus","ābātis","ābant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ābō","ābis","ābit","ābimus","ābitis","ābunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","āris","ātur","āmur","āminī","antur", nil,"āre"}, ind_imp_pas = {"ābar","ābāris","ābātur","ābāmur","ābāminī","ābantur", nil,"ābāre"}, ind_fut_pas = {"ābor","āberis","ābitur","ābimur","ābiminī","ābuntur", nil,"ābere"}, subj_pres = {"em","ēs","et","ēmus","ētis","ent"}, subj_imp = {"ārem","ārēs","āret","ārēmus","ārētis","ārent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"er","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_imp_pas = {"ārer","ārēris","ārētur","ārēmur","ārēminī","ārentur", nil,"ārēre"}, imper_pres = {nil,"ā",nil,nil,"āte",nil}, imper_fut = {nil,"ātō","ātō",nil,"ātōte","antō"}, imper_pres_pas = {nil,"āre",nil,nil,"āminī",nil}, imper_fut_pas = {nil,"ātor","ātor",nil,nil,"antor"}, }, ["2"] = { inf_act = {"ēre","isse"}, inf_pas = {"ērī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"eō","ēs","et","ēmus","ētis","ent"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ēbō","ēbis","ēbit","ēbimus","ēbitis","ēbunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"eor","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ēbor","ēberis","ēbitur","ēbimur","ēbiminī","ēbuntur", nil,"ēbere"}, subj_pres = {"eam","eās","eat","eāmus","eātis","eant"}, subj_imp = {"ērem","ērēs","ēret","ērēmus","ērētis","ērent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ear","eāris","eātur","eāmur","eāminī","eantur", nil,"eāre"}, subj_imp_pas = {"ērer","ērēris","ērētur","ērēmur","ērēminī","ērentur", nil,"ērēre"}, imper_pres = {nil,"ē",nil,nil,"ēte",nil}, imper_fut = {nil,"ētō","ētō",nil,"ētōte","entō"}, imper_pres_pas = {nil,"ēre",nil,nil,"ēminī",nil}, imper_fut_pas = {nil,"ētor","ētor",nil,nil,"entor"}, }, ["3"] = { -- 3 (comparar [[capio]] con [[lego]], las raíces con capi- y leg- pero hay que eliminar la doble ii) inf_act = {"ere","isse"}, inf_pas = {"ī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", nil,"ere"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_pres = {"am","ās","at","āmus","ātis","ant"}, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", nil,"āre"}, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", nil,"erēre"}, imper_pres = {nil,"e",nil,nil,"ite",nil}, imper_fut = {nil,"itō","itō",nil,"itōte","untō"}, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil}, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor"}, }, ["3/4"] = { inf_act = {"ere","isse","īre","isse"}, inf_pas = {"ī","īrī"}, part_act = {"ēns","iēns","ūrus"}, part_pas = {"endus","iendus","us"}, ger = {"endī","endō","endum","iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt", "iō","īs",nil,"īmus","ītis","iunt" }, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant", "iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant" }, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent", "iam","iēs","iet","iēmus","iētis","ient" }, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", "ior","ere","ītur","īmur","īminī","iuntur", nil,"īris",nil,nil,nil,nil, nil,"īre" }, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", "iēbar","ēbāre","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāris",nil,nil,nil,nil, nil,"iēbāre" }, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", "iar","ēre","iētur","iēmur","iēminī","ientur", nil,"iēris",nil,nil,nil,nil, nil,"iēre" }, subj_pres = {"am","ās","at","āmus","ātis","ant", "iam","iās","iat","iāmus","iātis","iant", }, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent", "īrem","īrēs","īret","īrēmus","īrētis","īrent" }, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", "iar","āre","iātur","iāmur","iāminī","iantur", nil,"iāris",nil,nil,nil,nil, nil,"iāre" }, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", "īrer","erēre","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēris",nil,nil,nil,nil, nil,"īrēre" }, imper_pres = {nil,"e",nil,nil,"ite",nil, nil,"ī",nil,nil,"īte",nil }, imper_fut = {nil,"itō","itō",nil,"itōte","untō", nil,"ītō","ītō",nil,"ītōte","iuntō" }, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil, nil,"īre",nil,nil,"īminī",nil }, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor", nil,"ītor","ītor",nil,nil,"iuntor" }, }, ["4"] = { inf_act = {"īre","isse"}, inf_pas = {"īrī"}, part_act = {"iēns","ūrus"}, part_pas = {"iendus","us"}, ger = {"iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"iō","īs","it","īmus","ītis","iunt"}, ind_imp = {"iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"iam","iēs","iet","iēmus","iētis","ient"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"ior","īris","ītur","īmur","īminī","iuntur", nil,"īre"}, ind_imp_pas = {"iēbar","iēbāris","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāre"}, ind_fut_pas = {"iar","iēris","iētur","iēmur","iēminī","ientur", nil,"iēre"}, subj_pres = {"iam","iās","iat","iāmus","iātis","iant"}, subj_imp = {"īrem","īrēs","īret","īrēmus","īrētis","īrent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"iar","iāris","iātur","iāmur","iāminī","iantur", nil,"iāre"}, subj_imp_pas = {"īrer","īrēris","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēre"}, imper_pres = {nil,"ī",nil,nil,"īte",nil}, imper_fut = {nil,"ītō","ītō",nil,"ītōte","iuntō"}, imper_pres_pas = {nil,"īre",nil,nil,"īminī",nil}, imper_fut_pas = {nil,"ītor","ītor",nil,nil,"iuntor"}, } } local formas_no_personales = { inf_act = true, inf_pas = true, part_act = true, part_pas = true, ger = true, sup = true, } local formas_personales = { ind_pres = true, ind_imp = true, ind_perf = true, ind_pluperf = true, ind_fut = true, ind_fut_perf = true, ind_fut_sig = true, ind_pres_pas = true, ind_imp_pas = true, ind_fut_pas = true, subj_pres = true, subj_imp = true, subj_perf = true, subj_pluperf = true, subj_aor_sig = true, subj_pres_pas = true, subj_imp_pas = true, imper_pres = true, imper_fut = true, imper_pres_pas = true, imper_fut_pas = true, } local formas = merge(formas_no_personales, formas_personales) local verbos_irregulares = { {"aiō", {"aiō", "aiiō", "aijō", "ajō"}, { desactivar = {"inf_pas","part_pas","ger","sup","ind_pluperf","ind_fut","ind_fut_perf", "ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_perf","subj_pluperf","subj_pres_pas", "subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {"ai"}, nucleoperf = {"a"}, nucleosup = {}, nucleosigm = {}, inf_act = {"aiere"}, ind_pres = {nil,nil,nil,{}}, ind_perf = {{},nil,nil,{},{}}, subj_pres = {nil,nil,nil,{},{}}, subj_imp = {{},{},nil,{},{},{}}, imper_pres = {{},{"ai"},{},{},{},{}}, }}, {"cedo", {"cedo"}, { desactivar = {"inf_act","inf_pas","part_act","part_pas","ger","sup","ind_pluperf","ind_pres","ind_imp","ind_perf", "ind_fut","ind_fut_perf","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres","subj_imp","subj_perf", "subj_pluperf","subj_pres_pas","subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, imper_pres = {nil,{"cedo"},nil,nil,{"cette","cedile"},nil}, }}, {"dīcō", {"dīcō"}, { conj = "3", nucleopres = {"dīc"}, nucleoperf = {"dīx"}, nucleosup = {"dict"}, nucleosigm = {"dīx"}, desactivar = {}, imper_pres = {nil, {"dīc", "dīce"}}, inf_pas = {"dīcī", "dīcier{L}"}, }}, {"dō", {"dō"}, { conj = "1", nucleopres = {"d"}, nucleoperf = {"ded"}, nucleosup = {"dat"}, nucleosigm = {}, desactivar = {}, inf_act = {"dare","dedisse"}, inf_pas = {"darī"}, ind_pres = {nil,nil,nil,{"damus"},{"datis"},nil}, ind_imp = {{"dabam"},{"dabās"},{"dabat"},{"dabāmus"},{"dabātis"},{"dabant"}}, ind_fut = {{"dabō"},{"dabis"},{"dabit"},{"dabimus"},{"dabitis"},{"dabunt"}}, ind_imp_pas = {{"dabar"},{"dabāris","dabāre"},{"dabātur"},{"dabāmur"},{"dabāminī"},{"dabantur"}}, ind_fut_pas = {{"dabor"},{"daberis","dabere"},{"dabitur"},{"dabimur"},{"dabiminī"},{"dabuntur"}}, subj_imp = {{"darem"},{"darēs"},{"daret"},{"darēmus"},{"darētis"},{"darent"}}, subj_imp_pas = {{"darer"},{"darēris","darēre"},{"darētur"},{"darēmur"},{"darēminī"},{"darentur"}}, imper_pres = {nil,nil,nil,nil,{"date"},nil}, imper_fut = {nil,{"datō"},{"datō"},nil,{"datōte"},{"dantō"}}, imper_pres_pas = {nil,{"dare"},nil,nil,{"daminī"},nil}, imper_fut_pas = {nil,{"dator"},{"dator"},nil,nil,{"dator"}}, }}, {"dūcō", {"dūcō"}, { conj = "3", nucleopres = {"dūc"}, nucleoperf = {"dūx"}, nucleosup = {"duct"}, nucleosigm = {}, desactivar = {}, imper_pres = {nil, {"dūc", "dūce"}}, }}, {"edō", {"edō", "ëdō"}, { conj = "3", nucleopres = {"ed"}, nucleoperf = {"ed"}, nucleosup = {""}, nucleosigm = {}, desactivar = {}, inf_act = {"edere","ēsse"}, part_act = {"edēns","ēsūrus","ēssūrus","ēstūrus"}, part_pas = {"edendus","edundus","ēsus","ēssus","ēstus"}, sup = {"ēsum","ēssum","ēstum","ēsū","ēssū","ēstū"}, ind_pres = {nil,{"edis","ēs"},{"edit","ēst"},nil,{"editis","ēstis"},nil}, ind_pres_pas = {nil,{"ederis","edere","ēssis","ēsse"},{"editur","ēstur"}}, subj_pres = {{"edam","edim"},{"edās","edīs"},{"edat","edit","ēst"},{"edāmus","edīmus"},{"edātis","edītis"},{"edant","edint"}}, subj_imp = {{"ederem","ēssem"},{"ederēs","ēssēs"},{"ederet","ēsset"},{"ederēmus","ēssēmus"},{"ederētis","ēssētis"},{"ederent","ēssent"}}, subj_imp_pas = {{"ederer","ēsser"},{"ederēris","ederēre","ēssēris","ēssēre"},{"ederetur","ēssetur"},{"ederēmur","ēssēmur"},{"ederēminī","ēssēminī"},{"ederentur","ēssentur"}}, imper_pres = {nil,{"ede","ēs"},nil,nil,{"edite","ēste"},nil}, imper_fut = {nil,{"editō","ēstō"},{"editō","ēstō"},nil,{"editōte","ēstōte"},{"eduntō"}}, imper_pres_pas = {nil,{"edere","ēsse"},nil,nil,{"ediminī"},nil}, imper_fut_pas = {nil,{"editor","ēstor"},{"editor","ēstor"},nil,nil,{"eduntor"}}, }}, {"eō", {"eō", "ëō"}, { conj = "4", nucleopres = {""}, nucleoperf = {""}, nucleosup = {""}, nucleosigm = {}, desactivar = {"imper_pres_pas"}, inf_act = {"īre","īsse","iisse","īvisse"}, inf_pas = {"īrī","īrier"}, part_act = {"iēns","itūrus"}, part_pas = {"eundum","itum"}, ger = {"eundī","eundō","eundum"}, sup = {"itum","itū"}, ind_pres = {{"eō"},{"īs"},{"it"},{"īmus"},{"ītis"},{"eunt"}}, ind_imp = {{"ībam"},{"ībās"},{"ībat"},{"ībāmus"},{"ībātis"},{"ībant"}}, ind_perf = {{"iī","īvī"},{"īstī","iistī","īvistī"},{"iit","īvit"},{"iimus","īvimus"},{"īstis","iistis","īvistis"},{"iērunt","iēre","īvērunt","īvēre"}}, ind_pluperf = {{"ieram","īveram"},{"ierās","īverās"},{"ierat","īverat"},{"ierāmus","īverāmus"},{"ierātis","īverātis"},{"ierant","īverant"}}, ind_fut = {{"ībō"},{"ībis"},{"ībit"},{"ībimus"},{"ībitis"},{"ībunt"}}, ind_fut_perf = {{"ierō","īverō"},{"ieris","īveris"},{"ierit","īverit"},{"ierimus","īverimus"},{"ieritis","īveritis"},{"ierint","īverint"}}, ind_fut_sig = {nil,nil,nil,nil,nil,nil}, ind_pres_pas = {{},{},{"ītur"},{},{},{}}, ind_imp_pas = {{},{},{"ībātur"},{},{},{}}, ind_fut_pas = {{},{},{"ībitur"},{},{},{}}, subj_pres = {{"eam"},{"eās"},{"eat"},{"eāmus"},{"eātis"},{"eant"}}, subj_imp = {{"īrem"},{"īrēs"},{"īret"},{"īrēmus"},{"īrētis"},{"īrent"}}, subj_perf = {{"ierim","īverim"},{"ierīs","īverīs"},{"ierit","īverit"},{"ierīmus","īverīmus"},{"ierītis","īverītis"},{"ierint","īverint"}}, subj_pluperf = {{"īssem","iissem","īvissem"},{"īssēs","iissēs","īvissēs"},{"īsset","iisset","īvisset"},{"īssēmus","iissēmus","īvissēmus"},{"īssētis","iissētis","īvissētis"},{"īssent","iissent","īvissent"}}, subj_aor_sig = {nil,nil,nil,nil,nil,nil}, subj_pres_pas = {{},{},{"eātur"},{},{},{}}, subj_imp_pas = {{},{},{"īrētur"},{},{},{}}, imper_pres = {nil,nil,nil,nil,nil,nil}, imper_fut = {nil,nil,nil,nil,nil,{"euntō"}}, imper_fut_pas = {nil,{},nil,nil,nil,{}}, }}, {"faciō", {"faciō"}, { conj = "3", I = true, inf_act = {"facere", "fāre{L}", "fēcisse"}, inf_pas = {"fierī"}, part_pas = {"faciendus", "faciundus", "factus"}, nucleopres = {"fac"}, nucleoperf = {"fēc"}, nucleosup = {"fact"}, nucleosigm = {"fax","faxs","facs"}, desactivar = {}, ind_pres_pas = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, ind_imp_pas = {{"fīēbam"},{"fīēbās"},{"fīēbat"},{"fīēbāmus"},{"fīēbātis"},{"fīēbant"}}, ind_fut_pas = {{"fīam"},{"fīēs"},{"fīet"},{"fīēmus"},{"fīētis"},{"fīent"}}, subj_pres_pas = {{"fīam"},{"fīās"},{"fīat"},{"fīāmus"},{"fīātis"},{"fīant"}}, subj_imp_pas = {{"fierem"},{"fierēs"},{"fieret"},{"fierēmus"},{"fierētis"},{"fierent"}}, imper_pres = {nil,{"fac","face"},nil,nil,nil,nil}, imper_pres_pas = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut_pas = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"ferō", {"ferō"}, { conj = "3", nucleopres = {"fer"}, nucleoperf = {"tul", "tetul{†}"}, nucleosup = {"lāt"}, nucleosigm = {}, desactivar = {}, inf_act = {"ferre", "tulisse", "tetulisse{†}"}, inf_pas = {"ferrī"}, ind_pres = {nil,{"fers"},{"fert"},nil,{"fertis"}}, ind_pres_pas = {nil,{"ferris","ferre"}}, subj_imp = {{"ferrem"},{"ferrēs"},{"ferret"},{"ferrēmus"},{"ferrētis"},{"ferrent"}}, subj_imp_pas = {{"ferrer"},{"ferrēris","ferrēre"},{"ferrētur"},{"ferrēmur"},{"ferrēminī"},{"ferrentur"}}, imper_pres = {nil,{"fer"},nil,nil,{"ferte"},nil}, imper_pres_pas = {nil,{"ferre"},nil,nil,nil,nil}, imper_fut = {nil,{"fertō"},{"fertō"},nil,{"fertōte"},{"feruntō"}}, imper_fut_pas = {nil,{"fertor"},{"fertor"},nil,nil,nil}, }}, {"fīō", {"fīō"}, { conj = "3", nucleopres = {"fī"}, nucleoperf = {}, nucleosup = {"fact"}, nucleosigm = {}, semidep = true, desactivar = {}, inf_act = {"fierī"}, ind_pres = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, imper_pres = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"inquam", {"inquam"}, { conj = "3", nucleopres = {"inqui"}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, nopasivo = true, desactivar = {"inf_act","inf_pas","part_pas","ger"}, ind_pres = {{"inquam"}}, }}, {"possum", {"possum"}, { conj = "3", nucleopres = {"pot"}, nucleoperf = {"pot"}, nucleosup = {}, nucleosigm = {}, pres = "possō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"posse","potesse{†}"}, part_act = {"potēns"}, ind_pres = {{"possum"},{"potes"},{"potest"},{"possumus"},{"potestis"},{"possunt"}}, ind_imp = {{"poteram"},{"poterās"},{"poterat"},{"poterāmus"},{"poterātis"},{"poterant"}}, ind_fut = {{"poterō"},{"poteris","potere"},{"poterit"},{"poterimus"},{"poteritis"},{"poterunt"}}, ind_perf = {{"potuī"},{"potuistī"},{"potuit"},{"potuimus"},{"potuistis"},{"potuērunt","potuēre"}}, ind_pluperf = {{"potueram"},{"potuerās"},{"potuerat"},{"potuerāmus"},{"potuerātis"},{"potuerant"}}, ind_fut_perf = {{"potuerō"},{"potueris"},{"potuerit"},{"potuerimus"},{"potueritis"},{"potuerunt"}}, subj_pres = {{"possem"},{"possēs"},{"possēt"},{"possēmus"},{"possētis"},{"possent"}}, subj_imp = {{"possim"},{"possīs"},{"possit"},{"possīmus"},{"possītis"},{"possint"}}, subj_perf = {{"potuerim"},{"potuerīs"},{"potuerit"},{"potuerīmus"},{"potuerītis"},{"potuerint"}}, subj_pluperf = {{"potuissem"},{"potuissēs"},{"potuisset"},{"potuissēmus"},{"potuissētis"},{"potuissent"}}, }}, {"sum", {"sum"}, { conj = "3", nucleopres = {"s"}, nucleoperf = {"fu"}, nucleosup = {}, nucleosigm = {}, pres = "sō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres_pas","imper_fut_pas"}, inf_act = {"esse"}, part_act = {"futūrus"}, ind_pres = {{"sum"},{"es"},{"est"},{"sumus"},{"estis"},{"sunt"}}, ind_imp = {{"eram"},{"erās"},{"erat"},{"erāmus"},{"erātis"},{"erant"}}, ind_fut = {{"erō"},{"eris","ere"},{"erit"},{"erimus"},{"eritis"},{"erunt"}}, subj_pres = {{"sim","siem","fuam{†}"},{"sīs","siēs","fuās{†}"},{"sit","siet","fuat{†}"},{"sīmus","siēmus","fuāmus{†}"},{"sītis","siētis","fuātis{†}"},{"sint","sient","fuant{†}"}}, subj_imp = {{"essem","forem"},{"essēs","forēs"},{"esset","foret"},{"essēmus","forēmus"},{"essētis","forētis"},{"essent","forent"}}, imper_pres = {nil,{"es"},nil,nil,{"este"},nil}, imper_fut = {nil,{"estō"},{"estō"},nil,{"estōte"},nil}, }}, {"mālō", {"mālō"}, { conj = "3", nucleopres = {"māl"}, nucleoperf = {"mālu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"mālle","māluisse"}, ind_pres = {{"mālō"},{"māvīs"},{"māvult"},{"mālumus"},{"māvultis"},{"mālunt"}}, subj_pres = {{"mālim"},{"mālīs"},{"mālit"},{"mālīmus"},{"mālītis"},{"mālint"}}, subj_imp = {{"māllem"},{"māllēs"},{"māllet"},{"māllēmus"},{"māllētis"},{"māllent"}}, }}, {"nōlō", {"nōlō"}, { conj = "3", nucleopres = {"nōl"}, nucleoperf = {"nōlu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"nōlle","nōluisse"}, ind_pres = {{"nōlō"},{"nōn vīs","nevīs{†}"},{"nōn vult","nōn volt","nevolt{†}"},{"nōlumus"},{"nōn vultis","nōn voltis","nōltis{†}"},{"nōlunt"}}, subj_pres = {{"nōlim"},{"nōlīs"},{"nōlit"},{"nōlīmus"},{"nōlītis"},{"nōlint"}}, subj_imp = {{"nōllem"},{"nōllēs"},{"nōllet"},{"nōllēmus"},{"nōllētis"},{"nōllent"}}, }}, {"volō", {"volō"}, { conj = "3", nucleopres = {"vol"}, nucleoperf = {"volu"}, nucleosup = {"volit"}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"velle","voluisse"}, ind_pres = {{"volō"},{"vīs"},{"vult","volt{†}"},{"volumus"},{"vultis","voltis{†}"},{"volunt"}}, subj_pres = {{"velim","volim{†}"},{"velīs","volīs{†}"},{"velit","volit{†}"},{"velīmus","volīmus{†}"},{"velītis","volītis{†}"},{"velint","volint{†}"}}, subj_imp = {{"vellem"},{"vellēs"},{"vellet"},{"vellēmus"},{"vellētis"},{"vellent"}}, }}, } local function combinar_prefijo_nucleosufijo(prefijo, nucleosufijo) return prefijo..nucleosufijo end local function combinar_nucleo_sufijo(nucleo, sufijo, agregar_i) if agregar_i and (not find(sufijo, "^[iī]")) and (sufijo ~= "e") and (not find(sufijo, "^er")) then return nucleo.."~i~"..sufijo end return nucleo..sufijo end local function agregar_forma(conjugado, conjinfo, forma) conjinfo[forma] = conjinfo[forma] or {} local sufijos_ = sufijos[conjinfo.conj][forma] local nucleos local prefijo if forma == "sup" then nucleos = conjinfo.nucleosup prefijo = conjinfo.prefijosup or conjinfo.prefijo elseif find(forma, "sig") then nucleos = conjinfo.nucleosigm prefijo = conjinfo.prefijosigm or conjinfo.prefijo elseif find(forma, "perf") then nucleos = conjinfo.nucleoperf prefijo = conjinfo.prefijoperf or conjinfo.prefijo else nucleos = conjinfo.nucleopres prefijo = conjinfo.prefijo end if formas_no_personales[forma] then if conjinfo[forma][1] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma]) do insert_if_not(conjugado[forma], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else for _, sufijo in ipairs(sufijos_) do local nucleos_ = nucleos if forma == "inf_act" and sufijo == "isse" then nucleos_ = conjinfo.nucleoperf elseif forma == "part_act" and sufijo == "ūrus" then nucleos_ = conjinfo.nucleosup elseif forma == "part_pas" and sufijo == "us" then nucleos_ = conjinfo.nucleosup end local agregar_i = conjinfo.I and nucleos_ == conjinfo.nucleopres for _,nucleo in ipairs(nucleos_) do insert_if_not(conjugado[forma], combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(nucleo, sufijo, agregar_i))) end end end return end for i = EGO, EI do local p = tostr[i] if conjinfo[forma][i] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma][i]) do insert_if_not(conjugado[forma..p], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else local k = i while sufijos_[k] do local agregar_i = conjinfo.I and nucleos == conjinfo.nucleopres for j, n in ipairs(nucleos) do local x = combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(n, sufijos_[k], agregar_i)) if conjinfo.always_sync_perf and (forma == "ind_perf" or forma == "ind_pluperf" or forma == "ind_fut_perf" or forma == "subj_perf" or forma == "subj_pluperf") then x = x:gsub("īvī", "iī") x = x:gsub("īvi", "ī") x = x:gsub("īve", "ī") x = x:gsub("īvē", "ē") end insert_if_not(conjugado[forma..p], x) end k = k + 6 end end end end local function get_subtype_by_ending(pres, conjinfo, specs) for _, spec in ipairs(specs) do local base = extract_base(pres, spec[1]) if base then for _,s in ipairs(spec[2]) do if conjinfo[s] == nil then conjinfo[s] = true end end return base end end error("Unrecognized ending for conjugation " .. conjinfo["conj"]) end local function detect_v_type_and_subtypes(conjinfo) local pres = conjinfo["v"] local conj_arg = conjinfo["conj"] pres = toNFC(pres) local base_conj_arg, auto_perf_supine = conj_arg:match("^([124]/?4?)(%+%+?)$") if base_conj_arg then if auto_perf_supine == "++" and base_conj_arg ~= "4" then error("Conjugation types 1++ and 2++ not allowed") end conj_arg = base_conj_arg end conjinfo.conj = conj_arg if conj_arg == "1" then local base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"at", {"impers"}}, {"ātur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "āv" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "āt" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "āss" end end elseif conj_arg == "2" then local base = get_subtype_by_ending(pres, conjinfo, { {"eō", {}}, {"eor", {"dep"}}, {"et", {"impers"}}, {"ētur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "u" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "it" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3" then local base if conjinfo.I == false then -- si explícitamente se indicó que no es del tipo -io, hay que excluir sufijos base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) else base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) end if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end assert(conjinfo["nucleoperf"][1], "especifique todos los núcleos para verbos de la tercera conjugación") assert(conjinfo["nucleosup"][1], "especifique todos los núcleos para verbos de la tercera conjugación") if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3/4" then local base base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "4" then local base = get_subtype_by_ending(pres, conjinfo, { {"iō", {}}, {"ior", {"dep"}}, {"it", {"impers"}}, {"ītur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "irreg" then for _,p in ipairs(verbos_irregulares) do for _,rx in ipairs(p[2]) do local pref, verb = match(conjinfo.v, "^(.*)("..rx..")$") if verb then conjinfo.v = verb conjinfo.prefijo = pref if conjinfo.nucleoperf[1] and conjinfo.nucleoperf[1] ~= "-" then -- [[ecfero]] conjinfo.prefijoperf = conjinfo.nucleoperf[1] conjinfo.nucleoperf = {} end if conjinfo.nucleosup[1] and conjinfo.nucleosup[1] ~= "-" then conjinfo.prefijosup = conjinfo.nucleosup[1] conjinfo.nucleosup = {} end if conjinfo.nucleosigm[1] and conjinfo.nucleosigm[1] ~= "-" then conjinfo.prefijosigm = conjinfo.nucleosigm[1] conjinfo.nucleosigm = {} end conjinfo.irreg = true conjinfo.conj = p[3].conj for k,val in pairs(p[3]) do if not conjinfo[k] or (type(conjinfo[k]) == "table" and not conjinfo[k][1]) then conjinfo[k] = deep_copy(val) end end return conjinfo end end end error("Unrecognized conjugation '" .. conj_arg .. "'") else error("Unrecognized conjugation '" .. conj_arg .. "'") end return conjinfo end function export.v(frame) local title_ = mw.title.getCurrentTitle() local tit = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {alias_de = "conj"}, [2] = {alias_de = "pres"}, [3] = {alias_de = "nucleoperf"}, [4] = {alias_de = "nucleosup"}, [5] = {alias_de = "nucleosigm"}, ["impers"] = {}, -- pas para formas pasivas solamente ["impersonal"] = {alias_de = "impers"}, ["dep"] = {tipo="bool"}, ["depon"] = {alias_de="dep"}, ["deponente"] = {alias_de="dep"}, ["semidep"] = {tipo="bool"}, ["semidepon"] = {alias_de="semidep"}, ["semideponente"] = {alias_de="semidep"}, ["sigm"] = {tipo="bool"}, ["nopasivo"] = {tipo="bool"}, ["soloperf"] = {tipo="bool"}, ["I"] = {tipo="bool"}, ["p3inf"] = {tipo="bool"}, -- sin uso ["poet_sync_perf"] = {tipo="bool"}, -- sin uso ["always_sync_perf"] = {tipo="bool"}, -- solo en [[saevio]] ["conj"] = {requerido=true}, ["pres"] = {requerido=true}, ["nucleopres"] = {lista = true}, ["nucleoperf"] = {lista = true}, ["nucleosup"] = {lista = true}, ["nucleosigm"] = {lista = true}, ["núcleopres"] = {alias_de="nucleopres"}, ["núcleoperf"] = {alias_de="nucleoperf"}, ["núcleosup"] = {alias_de="nucleosup"}, ["paradigma"] = {lista = true}, ["desactivarnucleos"] = {tipo="bool", por_defecto=true}, -- para [[-o]] ["nota"] = {}, } local conjugado = {} for forma,_ in pairs(formas_no_personales) do params[forma] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma] = {} end for forma,_ in pairs(formas_personales) do for i,s in ipairs(tostr) do params[forma..s] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma..s] = {} if i == 1 then params[forma] = {alias_de=forma..s} end end end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) assert(not find(tit, " "), "locuciones no soportadas aún") assert(not (args["dep"] and args["semidep"]), "un verbo no puede ser deponente y semideponente a la vez") local conjinfo = { conj = args.conj, prefijo="", v=args.pres, desactivar = {}, dep=args.dep, semidep=args.semidep, sigm=args.sigm, impers=args.impers, nopasivo=args.nopasivo, soloperf=args.soloperf, I=args.I, p3inf=args.p3inf, poet_sync_perf=args.poet_sync_perf, -- sin uso always_sync_perf=args.always_sync_perf, nucleopres = deep_copy(args.nucleopres), nucleoperf = deep_copy(args.nucleoperf), nucleosup = deep_copy(args.nucleosup), nucleosigm = deep_copy(args.nucleosigm) } conjinfo = detect_v_type_and_subtypes(conjinfo) conjinfo.conj = conjinfo.conj if conjinfo.impers == true then conjinfo.impers = "3" end -- no puede ir conjinfo acá abajo porque si es un sufijo va a quedar "-" en la raíz, lo que anularía todas las formas conjugadas, tiene que venir directo de args if args.desactivarnucleos then if args.nucleopres[1] == "-" then conjinfo.nucleopres = {} end if args.nucleoperf[1] == "-" then conjinfo.nucleoperf = {} end if args.nucleosup[1] == "-" then conjinfo.nucleosup = {} end if args.nucleosigm[1] == "-" then conjinfo.nucleosigm = {} end end local es_irregular = conjinfo.irreg for _,d in ipairs(conjinfo.desactivar) do if formas_no_personales[d] then args[d] = {"no"} else args[d.."2"] = {"no"} end end for forma,_ in pairs(formas) do agregar_forma(conjugado, conjinfo, forma) end local resultante = sobreescribir_formas(conjugado, args) local mostrar_fut_sig = #resultante["ind_fut_sig1"] > 0 local mostrar_aor_sig = #resultante["subj_aor_sig1"] > 0 local defectivo = comprobar_defectivo(resultante, {"^imper", "_sig"}, tostr) local defect2 resultante, defect2 = desactivar_formas(resultante, function (form) return (conjinfo.nopasivo and form:find("_pas")) or (conjinfo.soloperf and not form:find("perf")) or (conjinfo.impers == "pas" and form:find("_pas[^3]")) or (conjinfo.impers == "pas3" and form:find("_pas[^3]")) or (conjinfo.impers == "pas36" and form:find("_pas[^36]")) end ) if defect2 then defectivo = true end -- por ahora innecesario -- local part_no_adj = {} -- for _,e in ipairs(resultante.part) do -- if (find(e, 'PART') or not find(e, 'ADJ')) and not find(e, "†") then -- insert(part_no_adj, gsub1(e, '%b{}', '')) -- end -- end local tit_pres = f(resultante["ind_pres1"][1] or "―") local tit_inf = f(resultante["inf_act"][1] or "―") local tit_perf = f(resultante["ind_perf1"][1] or "―") local tit_sup = f(resultante["sup"][1] or "―") resultante = agregar_enlaces(resultante, tit, normalizar_enlace) local es_impersonal = conjinfo.impers resultante = formatear_formas(resultante, function (x) return obtener_pronombre(x, es_impersonal) end) local impers = conjinfo.impers local cs, cs1, cs2, fila_pronombres_ind, fila_pronombres_subj, fila_pronombres_imper, mostrar_imper if impers == "3" then fila_pronombres_ind = {"", "(id)", color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", "(quod id)", color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", "(id)", color=COLOR_IMPER, header=true, class="pc"} cs = 2 elseif impers == "36" then error("no soportado actualmente") cs = 3 else fila_pronombres_ind = {"", PRONOMBRES[1], PRONOMBRES[2], PRONOMBRES[3], PRONOMBRES[4], PRONOMBRES[5], PRONOMBRES[6], color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", PRONOMBRES_SUBJ[1], PRONOMBRES_SUBJ[2], PRONOMBRES_SUBJ[3], PRONOMBRES_SUBJ[4], PRONOMBRES_SUBJ[5], PRONOMBRES_SUBJ[6], color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", PRONOMBRES_IMP[1], PRONOMBRES_IMP[2], PRONOMBRES_IMP[3], PRONOMBRES_IMP[4], PRONOMBRES_IMP[5], PRONOMBRES_IMP[6], color=COLOR_IMPER, header=true, class="pc"} cs = 7 mostrar_imper = true end cs1 = cs -- math.floor(cs / 2) -- cs2 = cs - cs1 local t = {} insert(t, {{"Formas no personales (verboides)", colspan=cs}, color=COLOR_H, header=true}) if impers == "3" then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else resultante.inf_act.colspan = cs1-1 resultante.inf_pas.colspan = cs1-1 resultante.part_act.colspan = cs1-1 resultante.part_pas.colspan = cs1-1 resultante.ger.colspan = cs1-1 resultante.sup.colspan = cs1-1 if conjinfo.dep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) elseif conjinfo.semidep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) end end local function ic(tiempo) if impers == "3" then return resultante[tiempo.."3"] elseif impers == "36" then return resultante[tiempo.."3"], resultante[tiempo.."6"] end return resultante[tiempo.."1"], resultante[tiempo.."2"], resultante[tiempo.."3"], resultante[tiempo.."4"], resultante[tiempo.."5"], resultante[tiempo.."6"] end insert(t, {{"Formas personales", colspan=cs}, color=COLOR_H, header=true}) insert(t, {{"Modo indicativo", colspan=cs}, color=COLOR_IND, header=true}) insert(t, fila_pronombres_ind) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end else insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) insert(t, {{"Pretérito perfecto", color=COLOR_IND, header=true}, ic("ind_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_IND, header=true}, ic("ind_pluperf")}) insert(t, {{"Futuro perfecto", color=COLOR_IND, header=true}, ic("ind_fut_perf")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) end insert(t, {{"Modo subjuntivo", colspan=cs}, color=COLOR_SUBJ, header=true}) insert(t, fila_pronombres_subj) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end else insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) insert(t, {{"Pretérito perfecto", color=COLOR_SUBJ, header=true}, ic("subj_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_SUBJ, header=true}, ic("subj_pluperf")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) end insert(t, {{"Modo imperativo", colspan=cs}, color=COLOR_IMPER, header=true}) insert(t, fila_pronombres_imper) if mostrar_imper then if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) else insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) insert(t, {{"Presente pasivo", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) end else insert(t, {{"Como verbo "..(impers == "3" and "impersonal" or "terciopersonal")..", ''"..tit.."'' CARECE de imperativo", color=COLOR_IMPER, header=true, colspan=cs}}) end insert(t, {{f("Leyenda: † arcaico, x no normativo, ~■~ cambio ortográfico, #■# irregularidad"), colspan=cs}}) args["nota"] = args["nota"] or "" if conjinfo.impers == "utc3" then args["nota"] = args["nota"].." NOTA: se usa también como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "umc3" then args["nota"] = args["nota"].." NOTA: se usa más como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "utc36" then args["nota"] = args["nota"].." NOTA: se usa también como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "umc36" then args["nota"] = args["nota"].." NOTA: se usa más como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "pas" or conjinfo.imeprs == "pas3" then args["nota"] = args["nota"].." NOTA: impersonal para las formas pasivas" end if conjinfo.impers == "pas36" then args["nota"] = args["nota"].." NOTA: formas pasivas terciopersonales (solamente tercera persona singular y plural)" end if conjinfo.soloperf then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas del perfecto y pluscuamperfecto con valor de presente, imperfecto o futuro" end if conjinfo.nopasivo then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas activas" end insert(t, {{args["nota"] and args["nota"] or "", colspan=cs}}) local cats = {} local subtits = {} local conj_str if conjinfo.conj == "1" then conj_str = "primera conjugación" elseif conjinfo.conj == "2" then conj_str = "segunda conjugación" elseif conjinfo.conj == "3" then conj_str = "tercera conjugación" elseif conjinfo.conj == "3/4" then conj_str = "tercera/cuarta conjugación" else conj_str = "cuarta conjugación" end insert(cats, "LA:Verbos de la "..conj_str) insert(subtits, conj_str) impers = impers or "" if impers == "3" or find(impers, "^u[tm]c3$") then insert(subtits, "impersonal") insert(cats, "LA:Verbos impersonales") end if defectivo then insert(subtits, "defectivo") insert(cats, "LA:Verbos defectivos") end if conjinfo.dep then insert(subtits, "deponente") insert(cats, "LA:Verbos deponentes") end if conjinfo.semidep then insert(subtits, "semideponente") insert(cats, "LA:Verbos semideponentes") end if es_irregular then insert(subtits, "irregular") insert(cats, "LA:Verbos irregulares") else insert(subtits, "regular") insert(cats, "LA:Verbos regulares") end return renderizar_tabla( frame, "'''Conjugación de ''"..tit_pres..", "..tit_inf..", "..tit_perf..", "..tit_sup.."'''''&emsp;&emsp;("..concat(subtits, ", ")..")", t, ns == 0 and cats or {}) end function export.adv(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { ["n"] = {}, ["nota"] = {alias_de = "n"}, ["comp"] = {lista = true}, ["comparativo"] = {alias_de = "comp"}, ["compnota"] = {lista = true}, ["sup"] = {lista = true}, ["superlativo"] = {alias_de = "sup"}, ["supnota"] = {lista = true}, } local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local head = args[1] local modo = args[2] local enc local cats = {} local cat_pref = "LA:Adverbios" if modo == "-" then enc = "sin comparativo ni superlativo" insert(cats, cat_pref.." incomparables") return renderizar_encabezado( frame, head, enc, args["n"], {}, ns == 0 and cats or {}, normalizar_enlace ) end local flex = {comp={},sup={}} local stem for _, suff in ipairs{"iter", "nter", "ter", "er", "iē", "ē", "rā", "im", "ō"} do stem = match(head, "^(.*)" .. suff .. "$") if stem ~= nil then local comp_suff, sup_suff = "ius", "issimē" if suff == "nter" then stem = stem .. "nt" end if suff == "rā" then comp_suff = "er" .. comp_suff sup_suff = "imē" end insert(flex.comp, stem .. comp_suff) insert(flex.sup, stem .. sup_suff) break end end if not stem and not args.comp[1] and not args.sup[1] then error("Unrecognized adverb type, recognized types are “-ē”, “-er”, “-ter”, “-iter”, “-im”, or “-ō”, “-ra” or specify irregular forms or “-” if incomparable.") end local formas, irr = sobreescribir_formas(flex, args) if args["comp"][1] == "no" then enc = "sin comparativo" insert(cats, cat_pref.." sin comparativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) elseif args["sup"][1] == "no" then enc = "sin superlativo" insert(cats, cat_pref.." sin superlativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end if irr then enc = f("#irregular#") insert(cats, cat_pref.." irregulares") end return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}, {"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end return export pac1rsjrck7xlbn4kw0ajidp65d4m90 6123508 6123507 2026-07-25T01:57:16Z Tmagc 158167 6123508 Scribunto text/plain -- FLEXIÓN DEL LATÍN -- Adaptado desde en.wikt por Tmagc local export = {} local unpack = unpack or table.unpack local insert = table.insert local concat = table.concat local m_table = require("Módulo:tabla") local keys_to_list = m_table.keysToList local insert_if_not = m_table.insertIfNot local deep_copy = m_table.deepCopy local contains = m_table.contains local merge = m_table.merge local m_str = require("Módulo:string") local u = m_str.char local match = m_str.match local sub = m_str.sub local gsub = m_str.gsub local split = m_str.split local gsplit = m_str.gsplit local find = m_str.find local m_str_avanzado = require("Módulo:string/avanzado") local toNFD = m_str_avanzado.toNFD local toNFC = m_str_avanzado.toNFC local m_flex = require("Módulo:flex") local f = m_flex.f local f_links = m_flex.f_links local parsear_arreglo = m_flex.parsear_arreglo local separar_palabras = m_flex.separar_palabras local combinar_copulativa = m_flex.combinar_copulativa local sobreescribir_formas = m_flex.sobreescribir_formas local desactivar_formas = m_flex.desactivar_formas local agregar_enlaces = m_flex.agregar_enlaces local formatear_formas = m_flex.formatear_formas local comprobar_defectivo = m_flex.comprobar_defectivo local renderizar_tabla = m_flex.renderizar_tabla local renderizar_encabezado = m_flex.renderizar_encabezado local COLOR_H = m_flex.COLOR_H local COLOR_NP = m_flex.COLOR_NP local COLOR_IND = m_flex.COLOR_IND local COLOR_SUBJ = m_flex.COLOR_SUBJ local COLOR_IMPER = m_flex.COLOR_IMPER local MACRON = u(0x304) local BREVE = u(0x306) local DIAER = u(0x308) local DBREVE = u(0x361) local ACCENT = "[" .. MACRON .. BREVE .. DIAER .. DBREVE .. "]" local VOWEL = "[aæeioœuyAÆEIOŒUY]" local cons_to_vowel = { ["j"] = "i", ["J"] = "I", ["v"] = "u", ["V"] = "U", } local function normalizar_enlace(x) x = toNFD(x) x = gsub(x, ACCENT, "") return toNFC(x) end local function join(a, b) a, b = toNFD(a), toNFD(b) -- If the first part ends in "j" or "v", convert it to "i" or "u" unless -- the second part begins with a vowel. if not match(b, "^" .. VOWEL) then a = gsub(a, "[jvJV]$", cons_to_vowel) end return toNFC(a..b) end local function add_form(decl, slot, stem, suf) if type(slot) == "string" then slot = {slot} end for _,slt in ipairs(slot) do if type(decl[slt]) == "nil" or decl[slt] == "" then decl[slt] = {} elseif type(decl[slt]) == "string" then decl[slt] = {decl[slt]} end insert_if_not(decl[slt], join(stem, suf)) end end local function remove_forms(decl, forms) for form,_ in pairs(decl) do for _,rx in ipairs(forms) do if form:find(rx) then forms[form] = {} break end end end end local function merge_forms(forms, forms2, keys) keys = keys or forms2 for key,arr in pairs(keys) do if not forms[key] then forms[key] = {} end if type(forms2[key]) == "string" then insert_if_not(forms[key], forms2[key]) elseif type(forms2[key]) == "table" then for _,a in ipairs(forms2[key]) do insert_if_not(forms[key], a) end end end end local noun_decl = {} noun_decl["0"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = stem forms["dat_sg"] = stem forms["acc_sg"] = stem forms["abl_sg"] = stem forms["voc_sg"] = stem forms["nom_pl"] = stem forms["gen_pl"] = stem forms["dat_pl"] = stem forms["acc_pl"] = stem forms["abl_pl"] = stem forms["voc_pl"] = stem -- with locative if data.loc then forms["loc_sg"] = stem forms["loc_pl"] = stem end end local function alt_gen_pl_in_um(stem, forms, types, subtitles, i_stem) if types.genplum then add_form(forms, "gen_pl", stem, (i_stem and "i" or "") .. "um") elseif types.not_genplum then -- FIXME: not a contraction. -- insert_if_not(subtitles, "uncontracted genitive plural") end end noun_decl["1"] = function(data, args) local forms, types, loc, subtitles = data.forms, data.types, data.loc, data.subtitles local stem = args[1] -- normal 1st local nom_sg = "a" local gen_loc_sg = "ae" local dat_sg = "ae" local acc_sg = "am" local abl_sg = "ā" local voc_sg = "a" local nom_voc_pl = "ae" local gen_pl = "ārum" local dat_abl_loc_pl = "īs" local acc_pl = "ās" insert_if_not(data.title, "primera declinación") insert_if_not(data.categories, "LA:Sustantivos de la primera declinación") -- ām if types.am then nom_sg = "ām" acc_sg = "ām" abl_sg = {"ām", "ā"} voc_sg = "ām" -- all Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") --Greek Ma if types.Ma then nom_sg = "ās" acc_sg = "ān" voc_sg = "ā" -- Greek Me elseif types.Me then nom_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" -- Greek else nom_sg = "ē" gen_loc_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" end end -- ābus if types.abus then dat_abl_loc_pl = "ābus" end add_form(forms, "nom_sg", stem, nom_sg) add_form(forms, "gen_sg", stem, gen_loc_sg) add_form(forms, "dat_sg", stem, dat_sg) add_form(forms, "acc_sg", stem, acc_sg) add_form(forms, "abl_sg", stem, abl_sg) add_form(forms, "voc_sg", stem, voc_sg) add_form(forms, {"nom_pl", "voc_pl"}, stem, nom_voc_pl) add_form(forms, "gen_pl", stem, gen_pl) add_form(forms, {"dat_pl", "abl_pl"}, stem, dat_abl_loc_pl) add_form(forms, "acc_pl", stem, acc_pl) -- with locative if loc then add_form(forms, "loc_sg", stem, gen_loc_sg) add_form(forms, "loc_pl", stem, dat_abl_loc_pl) end end noun_decl["2"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "segunda declinación") insert_if_not(data.categories, "LA:Sustantivos de la segunda declinación") -- normal 2nd forms["nom_sg"] = stem1 .. "us" forms["gen_sg"] = stem1 .. "ī" forms["dat_sg"] = stem1 .. "ō" forms["acc_sg"] = stem1 .. "um" forms["abl_sg"] = stem1 .. "ō" forms["voc_sg"] = stem1 .. "e" forms["nom_pl"] = stem1 .. "ī" forms["gen_pl"] = stem1 .. "ōrum" forms["dat_pl"] = stem1 .. "īs" forms["acc_pl"] = stem1 .. "ōs" forms["abl_pl"] = stem1 .. "īs" forms["voc_pl"] = stem1 .. "ī" -- all neuter if types.N then forms["nom_sg"] = stem1 .. "um" forms["voc_sg"] = stem1 .. "um" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- neuter ium if types.ium then forms["nom_sg"] = stem1 .. "ium" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" forms["voc_sg"] = stem1 .. "ium" forms["nom_pl"] = stem1 .. "ia" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "ia" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "ia" -- neuter us, plural a elseif types.a then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- -vom (aevom, etc.) elseif types.vom then forms["nom_sg"] = stem1 .. "om" forms["acc_sg"] = stem1 .. "om" forms["voc_sg"] = stem1 .. "om" -- neuter Greek in -os (cētos) elseif types.Greek and types.us then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "os" forms["voc_sg"] = stem1 .. "os" forms["nom_pl"] = stem1 .. "ē" forms["gen_pl"] = stem1 .. "ōn" forms["acc_pl"] = stem1 .. "ē" forms["voc_pl"] = stem1 .. "ē" -- neuter Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "on" forms["acc_sg"] = stem1 .. "on" forms["voc_sg"] = stem1 .. "on" -- neuter us elseif types.us then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "ī" forms["acc_pl"] = stem1 .. "ōs" forms["voc_pl"] = stem1 .. "ī" end -- er elseif types.er then forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "ī" forms["dat_sg"] = stem2 .. "ō" forms["acc_sg"] = stem2 .. "um" forms["abl_sg"] = stem2 .. "ō" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ī" forms["gen_pl"] = stem2 .. "ōrum" forms["dat_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "ōs" forms["abl_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "ī" -- ius elseif types.ius then forms["nom_sg"] = stem1 .. "ius" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" if types.voci then -- Only for proper names and fīlius, genius forms["voc_sg"] = stem1 .. "ī" else forms["voc_sg"] = stem1 .. "ie" end forms["nom_pl"] = stem1 .. "iī" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "iōs" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "iī" -- -vos (servos, etc.) elseif types.vos then forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "om" -- Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "on" if data.num == "pl" then forms["nom_pl"] = stem1 .. "oe" forms["voc_pl"] = stem1 .. "oe" else forms["nom_pl"] = {stem1 .. "ī", stem1 .. "oe"} forms["voc_pl"] = {stem1 .. "ī", stem1 .. "oe"} end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- with -um genitive plural alt_gen_pl_in_um(stem2, forms, types, subtitles, types.ius or types.ium) -- with locative if data.loc then if types.ius or types.ium then forms["loc_sg"] = stem2 .. "iī" forms["loc_pl"] = stem2 .. "iīs" else forms["loc_sg"] = stem2 .. "ī" forms["loc_pl"] = stem2 .. "īs" end end end local acc_sg_i_stem_subtypes = { acc_im = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [abl -ī]; -- cannabis, senapis, sinapis [abl -e, -ī] acc_sg = {"im"}, title = {"accusative singular in ''-im''"}, }, acc_im_in = { -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [abl -ī]; -- Baetis, Tigris [acc -e, -ī] acc_sg = {"im", "in"}, title = {"accusative singular in ''-im'' or ''-in''"}, }, acc_im_in_em = { -- e.g. tigris, river Līris acc_sg = {"im", "in", "em"}, title = {"accusative singular in ''-im'', ''-in'' or ''-em''"}, }, acc_im_em = { acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or ''-em''"}, }, acc_im_occ_em = { -- febris, pelvis, puppis, restis, securis, turris [abl -ī, -e] acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or occasionally ''-em''"}, }, acc_em_im = { -- aqualis, clavis, lens, navis [abl -e, -ī]; -- cutis, restis [abl -e] acc_sg = {"em", "im"}, title = {"accusative singular in ''-em'' or ''-im''"}, }, } local abl_sg_i_stem_subtypes = { abl_i = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [acc -im]; -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [acc -im or -in]; -- canalis "water pipe", months in -is or -er, nouns originally i-stem adjectives such as aedilis, affinis, bipennis, familiaris, sodalis, volucris, etc. [acc -em] abl_sg = {"ī"}, title = {"ablative singular in ''-ī''"}, }, abl_i_e = { -- febris, pelvis, puppis, restis, securis, turris [acc -im, -em] abl_sg = {"ī", "e"}, title = {"ablative singular in ''-ī'' or ''-e''"}, }, abl_e_i = { -- cannabis, senapis, sinapis [acc -im]; -- Baetis, Tigris [acc -im, -in]; -- aqualis, clavis, lens, navis [acc -em, -im]; -- finis, mugilis, occiput, pugil, rus, supellex, vectis [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or ''-ī''"}, }, abl_e_occ_i = { -- amnis, anguis, avis, civis, classis, fustis, ignis, imber, orbis, pars, postis, sors, unguis, vesper [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or occasionally ''-ī''"}, }, } local function extract_stem(form, ending) local base = match(form, "^(.*)" .. ending .. "$") if not base then error("Form " .. form .. " should end in -" .. ending) end return base end local function count_vowels(stem) return select(2, toNFD(stem):gsub("[aeiouyAEIOUY]", "")) end noun_decl["3"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] -- local function non_i_stem_type() -- return (count_vowels(stem1) > count_vowels(stem2) and "parisyllabic" or "imparisyllabic") .. " non-i-stem" -- end insert_if_not(data.title, "tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") --normal 3rd forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "is" forms["dat_sg"] = stem2 .. "ī" forms["acc_sg"] = stem2 .. "em" forms["abl_sg"] = stem2 .. "e" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ēs" forms["gen_pl"] = stem2 .. "um" forms["dat_pl"] = stem2 .. "ibus" forms["acc_pl"] = stem2 .. "ēs" forms["abl_pl"] = stem2 .. "ibus" forms["voc_pl"] = stem2 .. "ēs" local acc_sg_i_stem_subtype = false local not_acc_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if acc_sg_i_stem_subtypes[subtype] then acc_sg_i_stem_subtype = true break end end for acc_sg_subtype, _ in pairs(acc_sg_i_stem_subtypes) do if types["not_" .. acc_sg_subtype] then not_acc_sg_i_stem_subtype = true break end end local abl_sg_i_stem_subtype = false local not_abl_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if abl_sg_i_stem_subtypes[subtype] then abl_sg_i_stem_subtype = true break end end for abl_sg_subtype, _ in pairs(abl_sg_i_stem_subtypes) do if types["not_" .. abl_sg_subtype] then not_abl_sg_i_stem_subtype = true break end end -- all Greek if types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") -- Greek er if types.er then stem1 = extract_stem(stem1, "ēr") forms["nom_sg"] = stem1 .. "ēr" forms["gen_sg"] = stem1 .. "eris" forms["dat_sg"] = stem1 .. "erī" forms["acc_sg"] = {stem1 .. "era", stem1 .. "erem"} forms["abl_sg"] = stem1 .. "ere" forms["voc_sg"] = stem1 .. "ēr" forms["nom_pl"] = stem1 .. "erēs" forms["gen_pl"] = stem1 .. "erum" forms["dat_pl"] = stem1 .. "eribus" forms["acc_pl"] = stem1 .. "erēs" forms["abl_pl"] = stem1 .. "eribus" forms["voc_pl"] = stem1 .. "erēs" -- Greek on elseif types.on then stem1 = extract_stem(stem1, "ōn") forms["nom_sg"] = stem1 .. "ōn" forms["gen_sg"] = {stem1 .. "ontis", stem1 .. "ontos"} forms["dat_sg"] = stem1 .. "ontī" forms["acc_sg"] = stem1 .. "onta" forms["abl_sg"] = stem1 .. "onte" forms["voc_sg"] = stem1 .. "ōn" forms["nom_pl"] = stem1 .. "ontēs" forms["gen_pl"] = {stem1 .. "ontum", stem1 .. "ontium"} forms["dat_pl"] = stem1 .. "ontibus" forms["acc_pl"] = {stem1 .. "ontēs", stem1 .. "ontās"} forms["abl_pl"] = stem1 .. "ontibus" forms["voc_pl"] = stem1 .. "ontēs" -- Greek i-stem elseif types.I then forms["gen_sg"] = {stem2 .. "is", stem2 .. "eōs", stem2 .. "ios"} forms["acc_sg"] = {stem2 .. "im", stem2 .. "in", stem2 .. "em{MED}"} forms["abl_sg"] = {stem2 .. "ī", stem2 .. "e{MED}"} forms["voc_sg"] = {stem2 .. "is", stem2 .. "i"} forms["nom_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["gen_pl"] = {stem2 .. "ium", stem2 .. "eōn"} forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["voc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} if types.poetic_esi then forms["dat_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} forms["abl_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} end -- normal Greek else forms["gen_sg"] = stem2 .. "os" if match(toNFD(stem2), "[yY]" .. ACCENT .. "*$") then forms["acc_sg"] = stem2 .. "n" else forms["acc_sg"] = stem2 .. "a" end forms["nom_pl"] = stem2 .. "es" forms["acc_pl"] = stem2 .. "as" forms["voc_pl"] = stem2 .. "es" if match(toNFD(stem1), "[iyIY]" .. ACCENT .. "*s$") then -- Per Hiley, words in -is and -ys have a poetic vocative -- without the -s, but otherwise the vocative is the same -- as the nominative. forms["voc_sg"] = {stem1, (stem1:gsub("s$", "")).."{L}"} end end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- polis if types.polis then stem1 = extract_stem(stem1, "polis") insert_if_not(data.title, "parcialmente griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "polis" forms["gen_sg"] = stem1 .. "polis" forms["dat_sg"] = stem1 .. "polī" forms["acc_sg"] = {stem1 .. "polim", stem1 .. "polin"} forms["abl_sg"] = stem1 .. "polī" forms["voc_sg"] = {stem1 .. "polis", stem1 .. "polī"} end -- all neuter if types.N then forms["acc_sg"] = stem1 -- neuter I stem if types.I then -- pure variety if types.pure then forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "ia" forms["gen_pl"] = stem2 .. "ium" forms["acc_pl"] = stem2 .. "ia" forms["voc_pl"] = stem2 .. "ia" -- non-pure variety (rare) else forms["nom_pl"] = stem2 .. "a" forms["gen_pl"] = {stem2 .. "ium", stem2 .. "um"} forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- normal neuter else forms["nom_pl"] = stem2 .. "a" forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- I stem elseif types.I or acc_sg_i_stem_subtype or abl_sg_i_stem_subtype then forms["gen_pl"] = stem2 .. "ium" -- Per Allen and Greenough, Hiley and others, the acc_pl in -īs -- applied originally to all i-stem nouns, and was current as an -- alternative form up through Caesar. forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "īs"} -- pure variety if types.pure then forms["acc_sg"] = stem2 .. "im" forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "īs" end local num = data.num for subtype, _ in pairs(types) do local acc_sg_i_stem_props = acc_sg_i_stem_subtypes[subtype] if acc_sg_i_stem_props then forms["acc_sg"] = {} for _, ending in ipairs(acc_sg_i_stem_props.acc_sg) do insert_if_not(forms["acc_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(acc_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end -- FIXME: needs to be done for neuter nouns as well. for subtype, _ in pairs(types) do local abl_sg_i_stem_props = abl_sg_i_stem_subtypes[subtype] if abl_sg_i_stem_props then forms["abl_sg"] = {} for _, ending in ipairs(abl_sg_i_stem_props.abl_sg) do insert_if_not(forms["abl_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(abl_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end end -- with locative if data.loc then -- As far as I can tell, in general both dative singular and -- ablative singular could be used for the third-declension locative, -- with different time periods preferring different forms. -- http://dcc.dickinson.edu/grammar/latin/3rd-declension-locative-case -- mentions rūrī along with either Carthāginī or Carthāgine. -- Wikipedia in https://en.wikipedia.org/wiki/Locative_case#Latin -- says this: -- -- In archaic times, the locative singular of third declension nouns -- was still interchangeable between ablative and dative forms, but in -- the Augustan Period the use of the ablative form became fixed. -- Therefore, both forms "rūrī" and "rūre" may be encountered. -- -- Lewis and Short confirm this. local loc_sg = forms["dat_sg"] if type(loc_sg) == "table" then loc_sg = deep_copy(loc_sg) else loc_sg = {loc_sg} end local abl_sg = forms["abl_sg"] if type(abl_sg) == "table" then for _, form in ipairs(abl_sg) do insert_if_not(loc_sg, deep_copy(form)) end else insert_if_not(loc_sg, abl_sg) end forms["loc_sg"] = loc_sg forms["loc_pl"] = deep_copy(forms["abl_pl"]) --The following is what we used to have, but I simply cannot believe it. --if types.Greek and not types.s then -- forms["loc_pl"] = stem2 .. "ēs" --end end end noun_decl["4"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "cuarta declinación") insert_if_not(data.categories, "LA:Sustantivos de la cuarta declinación") -- normal 4th forms["nom_sg"] = stem .. "us" forms["gen_sg"] = stem .. "ūs" forms["dat_sg"] = stem .. "uī" forms["acc_sg"] = stem .. "um" forms["abl_sg"] = stem .. "ū" forms["voc_sg"] = stem .. "us" forms["nom_pl"] = stem .. "ūs" forms["gen_pl"] = stem .. "uum" forms["dat_pl"] = stem .. "ibus" forms["acc_pl"] = stem .. "ūs" forms["abl_pl"] = stem .. "ibus" forms["voc_pl"] = stem .. "ūs" if types.echo then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end add_form(forms, "acc_sg", stem, "ōn") elseif types.Callisto then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end end -- neuter if types.N then forms["nom_sg"] = stem .. "ū̆{?}" forms["gen_sg"] = {stem .. "ūs{C}", stem .. "ū{S}"} forms["dat_sg"] = {stem .. "uī{C}", stem .. "ū{S}"} forms["acc_sg"] = stem .. "ū̆{?}" forms["voc_sg"] = stem .. "ū̆{?}" forms["nom_pl"] = stem .. "ua" forms["acc_pl"] = stem .. "ua" forms["voc_pl"] = stem .. "ua" end -- ubus if types.ubus then forms["dat_pl"] = stem .. "ubus" forms["abl_pl"] = stem .. "ubus" end -- with locative if data.loc then forms["loc_sg"] = forms["abl_sg"] forms["loc_pl"] = forms["abl_pl"] end end noun_decl["5"] = function(data, args) local forms, types = data.forms, data.types local stem = args[1] insert_if_not(data.title, "quinta declinación") insert_if_not(data.categories, "LA:Sustantivos de la quinta declinación") -- ies if types.i then stem = stem .. "i" end forms["nom_sg"] = stem .. "ēs" forms["gen_sg"] = stem .. "eī" forms["dat_sg"] = stem .. "eī" forms["acc_sg"] = stem .. "em" forms["abl_sg"] = stem .. "ē" forms["voc_sg"] = stem .. "ēs" forms["nom_pl"] = stem .. "ēs" forms["gen_pl"] = stem .. "ērum" forms["dat_pl"] = stem .. "ēbus" forms["acc_pl"] = stem .. "ēs" forms["abl_pl"] = stem .. "ēbus" forms["voc_pl"] = stem .. "ēs" -- ies if types.i then forms["gen_sg"] = stem .. "ēī" forms["dat_sg"] = stem .. "ēī" end --with locative if data.loc then forms["loc_sg"] = stem .. "ē" forms["loc_pl"] = stem .. "ēbus" end end noun_decl["sgpl"] = function(data, args) local forms = data.forms local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem1 forms["gen_sg"] = stem1 forms["dat_sg"] = stem1 forms["acc_sg"] = stem1 forms["abl_sg"] = stem1 forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 forms["gen_pl"] = stem2 forms["dat_pl"] = stem2 forms["acc_pl"] = stem2 forms["abl_pl"] = stem2 forms["voc_pl"] = stem2 -- with locative if data.loc then forms["loc_sg"] = stem1 forms["loc_pl"] = stem2 end end noun_decl["indecl"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = stem forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} -- with locative (for multiword terms) if data.loc then forms["loc_sg"] = {} forms["loc_pl"] = {} end data.num = "sg" end noun_decl["irreg"] = function(data, args) local forms, subtitles, notes = data.forms, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "irregular") insert_if_not(data.categories, "LA:Sustantivos irregulares") forms["nom_sg"] = {} forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = {} forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} if stem == "bōs" then data.decl = "3" local stem1, stem2 = "bōs", "bov" noun_decl["3"](data, {stem1, stem2}) add_form(forms, "abl_sg", stem2, "īd{†}") add_form(forms, "gen_pl", "bo", "um") add_form(forms, "gen_pl", stem2, "erum") add_form(forms, "dat_pl", "", "bōbus") add_form(forms, "dat_pl", "", "būbus") add_form(forms, "abl_pl", "", "bōbus") add_form(forms, "abl_pl", "", "būbus") elseif stem:match("^[dD]eus$") then data.decl = "2" local dD = stem:sub(1, 1) forms["nom_sg"] = dD .. "eus" forms["gen_sg"] = dD .. "eī" forms["dat_sg"] = dD .. "eō" forms["acc_sg"] = dD .. "eum" forms["abl_sg"] = dD .. "eō" forms["voc_sg"] = {dD .. "eus", dD .. "ee"} if stem == "deus" then forms["nom_pl"] = {"dī", "diī", "deī"} forms["gen_pl"] = {"deōrum", "deum"} forms["dat_pl"] = {"dīs", "diīs", "deīs"} forms["acc_pl"] = "deōs" forms["abl_pl"] = {"dīs", "diīs", "deīs"} forms["voc_pl"] = {"dī", "diī", "deī"} end elseif stem == "domus" then data.decl = "4,2" insert_if_not(data.title, "cuarta/segunda declinación") forms["nom_sg"] = "domus" forms["gen_sg"] = {"domūs", "domī"} forms["dat_sg"] = {"domuī", "domō", "domū"} forms["acc_sg"] = "domum" forms["abl_sg"] = {"domū", "domō"} forms["voc_sg"] = "domus" forms["loc_sg"] = "domī" forms["nom_pl"] = "domūs" forms["gen_pl"] = {"domuum", "domōrum"} forms["dat_pl"] = "domibus" forms["acc_pl"] = {"domūs", "domōs"} forms["abl_pl"] = "domibus" forms["voc_pl"] = "domūs" forms["loc_pl"] = {} data.loc = true elseif match(stem, "^[IÏJ]ēs[uū]" .. BREVE .. "?s$") then local ij = sub(stem, 1, 1) local uu = match(stem, "[uū]" .. BREVE .. "?") forms["nom_sg"] = stem forms["gen_sg"] = ij .. "ēsū" forms["dat_sg"] = ij .. "ēsū" forms["acc_sg"] = ij .. "ēs" .. uu .. "m" forms["abl_sg"] = ij .. "ēsū" forms["voc_sg"] = ij .. "ēsū" data.num = "sg" elseif stem == "Mōsēs" or stem == "Moesēs" or match(stem, "^M[oō]" .. BREVE .. "?[īȳ]sēs$") then local mos = sub(stem, 1, -3) forms["nom_sg"] = stem forms["gen_sg"] = {mos .. "ī", mos .. "ēī", mos .. "is", mos .. "ēn", mos .. "eōs"} forms["dat_sg"] = mos .. "ī" forms["acc_sg"] = {mos .. "ēn", mos .. "em"} forms["abl_sg"] = {mos .. "e", mos .. "ēn", mos .. "ī"} forms["voc_sg"] = {mos .. "ēs", mos .. "ē"} data.num = "sg" elseif stem:match("^[ij]ūgerum$") then data.decl = "2,3" local ij = stem:sub(1, 1) insert_if_not(data.title, "segunda/tercera declinación híbrido") forms["nom_sg"] = ij .. "ūgerum" forms["gen_sg"] = ij .. "ūgerī" forms["dat_sg"] = ij .. "ūgerō" forms["acc_sg"] = ij .. "ūgerum" forms["abl_sg"] = ij .. "ūgerō" forms["voc_sg"] = ij .. "ūgerum" forms["nom_pl"] = ij .. "ūgera" forms["gen_pl"] = ij .. "ūgerum" forms["dat_pl"] = ij .. "ūgeribus" forms["acc_pl"] = ij .. "ūgera" forms["abl_pl"] = {ij .. "ūgeribus", ij .. "ūgerīs{†}"} forms["voc_pl"] = ij .. "ūgera" elseif stem == "sūs" then data.decl = "3" forms["nom_sg"] = "sūs" forms["gen_sg"] = "suis" forms["dat_sg"] = "suī" forms["acc_sg"] = "suem" forms["abl_sg"] = "sue" forms["voc_sg"] = "sūs" forms["nom_pl"] = "suēs" forms["gen_pl"] = "suum" forms["dat_pl"] = {"suibus", "sūbus", "subus"} forms["acc_pl"] = "suēs" forms["abl_pl"] = {"suibus", "sūbus", "subus"} forms["voc_pl"] = "suēs" elseif stem == "ēthos" then data.decl = "3" insert_if_not(data.title, "tercera declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "ēthos" forms["gen_sg"] = "ētheos" forms["acc_sg"] = "ēthos" forms["voc_sg"] = "ēthos" forms["nom_pl"] = {"ēthea", "ēthē"} forms["dat_pl"] = {"ēthesi", "ēthesin"} forms["acc_pl"] = {"ēthea", "ēthē"} forms["abl_pl"] = {"ēthesi", "ēthesin"} forms["voc_pl"] = {"ēthea", "ēthē"} elseif stem == "Athōs" then data.decl = "2" insert_if_not(data.title, "segunda declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "Athōs" forms["gen_sg"] = "Athō" forms["dat_sg"] = "Athō" forms["acc_sg"] = {"Athō", "Athōn"} forms["abl_sg"] = "Athō" forms["voc_sg"] = "Athōs" data.num = "sg" elseif stem:match("^[uv]ēnum$") then data.decl = "4,2" local uv = stem:sub(1, 1) insert_if_not(data.title, "cuarta/segunda declinación, defectivo") forms["dat_sg"] = {uv .. "ēnuī", uv .. "ēnō"} forms["acc_sg"] = uv .. "ēnum" data.num = "sg" elseif stem:match("^[uv]īs$") then data.decl = "3" local uv = stem:sub(1, 1) insert_if_not(data.title, "defectivo") forms["nom_sg"] = uv .. "īs" forms["gen_sg"] = uv .. "īs" forms["dat_sg"] = uv .. "ī" forms["acc_sg"] = uv .. "im" forms["abl_sg"] = uv .. "ī" forms["voc_sg"] = uv .. "īs" forms["nom_pl"] = uv .. "īrēs" forms["gen_pl"] = uv .. "īrium" forms["dat_pl"] = uv .. "īribus" forms["acc_pl"] = {uv .. "īrēs", uv .. "īrīs"} forms["abl_pl"] = uv .. "īribus" forms["voc_pl"] = uv .. "īrēs" else error("Stem " .. stem .. " not recognized.") end end local adj_decl = {} adj_decl["0+"] = function(data, args) local forms, categories = data.forms, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = stem forms["gen_sg_m"] = stem forms["gen_pl_m"] = stem forms["dat_sg_m"] = stem forms["dat_pl_m"] = stem forms["acc_sg_m"] = stem forms["acc_pl_m"] = stem forms["abl_sg_m"] = stem forms["abl_pl_m"] = stem forms["voc_sg_m"] = stem forms["voc_pl_m"] = stem forms["loc_sg_m"] = stem forms["loc_pl_m"] = stem end adj_decl["1&2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera y segunda declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local original if types.er then local final2 = stem:sub(-2) if final2 == "er" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") elseif final2 == "ur" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") else error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem) end stem, original = args[2], stem end local us = "us" local a_sf = "a" local um = "um" local ae_gsf = "ae" local am = "am" local a_macron = "ā" local i_pl = stem .. "ī" if types.greekA or types.greekE then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") if types.greekA then us = "os" um = "on" am = "ān" else us = "os" a_sf = "ē" um = "on" ae_gsf = "ēs" am = "ēn" a_macron = "ē" end i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = original or (stem .. us) forms["nom_sg_f"] = stem .. a_sf forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_f"] = stem .. ae_gsf forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_f"] = stem .. "ae" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_f"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_f"] = stem .. am forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_f"] = stem .. a_macron forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_f"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = original or (stem .. "e") forms["voc_sg_f"] = stem .. a_sf forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" if types.ius then insert_if_not(data.title, "pronominal") --insert_if_not(subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''") forms["gen_sg_m"] = stem .. "ī̆us" forms["gen_sg_f"] = stem .. "ī̆us" forms["gen_sg_n"] = stem .. "ī̆us" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_f"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" elseif types.not_ius then insert_if_not(data.title, "no pronominal") --insert_if_not(subtitles, "with normal genitive and dative singular") end if stem == "me" then forms["voc_sg_m"] = "mī" end if types.ic then --insert_if_not(subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''") local oc = "oc" local oc_macron = "ōc" if stem == "ill" then oc = "uc" oc_macron = "ūc" end forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = stem .. oc forms["nom_pl_n"] = stem .. "aec" forms["gen_sg_m"] = stem .. "uius" forms["gen_sg_f"] = stem .. "uius" forms["gen_sg_n"] = stem .. "uius" forms["dat_sg_m"] = stem .. "uic" forms["dat_sg_f"] = stem .. "uic" forms["dat_sg_n"] = stem .. "uic" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = stem .. oc forms["acc_pl_n"] = stem .. "aec" forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. oc_macron forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} end if types.distr then if stem:sub(-1) == "n" then forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum{R}"} forms["gen_pl_f"] = {stem .. "um", stem .. "ārum{R}"} forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum{R}"} else error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem) end end forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["1-1+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") forms["nom_sg_m"] = stem .. "a" forms["nom_pl_m"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ae" forms["gen_pl_m"] = stem .. "ārum" forms["dat_sg_m"] = stem .. "ae" forms["dat_pl_m"] = stem .. "īs" forms["acc_sg_m"] = stem .. "am" forms["acc_sg_n"] = stem .. "a" forms["acc_pl_m"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ā" forms["abl_pl_m"] = stem .. "īs" forms["voc_sg_m"] = stem .. "a" forms["voc_pl_m"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["2-2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "segunda declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local us = "us" local um = "um" local i_pl = stem .. "ī" if types.greek then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") us = "os" um = "on" i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = stem .. us forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = stem .. "e" forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end local function abl_i_e(...) local function update_slot(forms, slot, f, do_copy) if not forms[slot] then return do_copy elseif do_copy then f = deep_copy(f) end forms[slot] = f return true end function abl_i_e(stem, forms, types) local f, do_copy if types["abl_e_i"] then f = {stem .. "e", stem .. "ī"} elseif types["abl_i_e"] then f = {stem .. "ī", stem .. "e"} else return end do_copy = update_slot(forms, "abl_sg_m", f, do_copy) do_copy = update_slot(forms, "abl_sg_f", f, do_copy) -- Neuter doesn't take -e with i-stems. if not types.I then update_slot(forms, "abl_sg_n", f, do_copy) end end return abl_i_e(...) end adj_decl["3-1+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) if types.par then forms["nom_pl_n"] = stem2 .. "a" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["abl_sg_m"] = stem2 .. "e" forms["abl_sg_n"] = stem2 .. "e" forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"} -- Really? forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"} -- Why does this happen? forms["acc_pl_n"] = stem2 .. "a" forms["voc_pl_n"] = stem2 .. "a" end local es_base = stem1:match("^(.-)ēs$") if es_base and es_base == stem2 then if types.greek then forms["nom_sg_n"] = {stem2 .. "ē̆s{?}"} forms["acc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_m"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["nom_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["acc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["voc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["abl_sg_m"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["abl_sg_n"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["gen_pl_m"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} forms["gen_pl_n"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Adjetivos griegos") elseif types.not_greek then insert_if_not(data.title, "no griego") end end end adj_decl["3-def+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, defectivo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = stem2 .. "ēs" forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" if types.tor then insert_if_not(data.title, "tercera declinación, solo en masculino") insert_if_not(categories, "LA:Adjetivos solo en masculino") remove_forms(forms, {"_f$", "_n$"}) forms["nom_sg_m"] = stem1 forms["gen_sg_m"] = stem2 .. "is" forms["dat_sg_m"] = stem2 .. "ī" forms["acc_sg_m"] = stem2 .. "em" forms["abl_sg_m"] = stem2 .. "e" forms["voc_sg_m"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["gen_pl_m"] = stem2 .. "um" forms["dat_pl_m"] = stem2 .. "ibus" forms["acc_pl_m"] = stem2 .. "ēs" forms["abl_pl_m"] = stem2 .. "ibus" forms["voc_pl_m"] = stem2 .. "ēs" end if types.trix then insert_if_not(data.title, "tercera declinación, solo en femenino o en neutro plural") insert_if_not(categories, "LA:Adjetivos solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en neutro") remove_forms(forms, {"_m$", "sg_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.trixf then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.idis then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = {stem2 .. "is", stem2 .. "os"} forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = {stem2 .. "em", stem2 .. "a"} forms["abl_sg_f"] = stem2 .. "e" forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} forms["gen_pl_f"] = stem2 .. "um" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = {stem2 .. "ēs", stem2 .. "as"} forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} end forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-C+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1 = args[1] local stem2 = stem1 .. "ōr" insert_if_not(data.title, "tercera declinación, comparativo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos comparativos") forms["nom_sg_m"] = stem1 .. "or" forms["nom_sg_n"] = stem1 .. "us" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "a" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 .. "us" forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} forms["acc_pl_n"] = stem2 .. "a" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 .. "or" forms["voc_sg_n"] = stem1 .. "us" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "a" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-P+"] = function(data, args) local forms, notes = data.forms, data.notes local stem2 = args[2] adj_decl["3-1+"](data, args) insert_if_not(data.title, "tercera declinación, participio") insert_if_not(data.categories, "LA:Adjetivos de la tercera declinación") forms["abl_sg_m"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["abl_sg_n"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} end adj_decl["3-2+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem = args[1] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem .. "is" forms["nom_sg_n"] = stem .. "e" forms["nom_pl_m"] = stem .. "ēs" forms["nom_pl_n"] = stem .. "ia" forms["gen_sg_m"] = stem .. "is" forms["gen_sg_n"] = stem .. "is" forms["gen_pl_m"] = stem .. "ium" forms["gen_pl_n"] = stem .. "ium" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" forms["dat_pl_m"] = stem .. "ibus" forms["dat_pl_n"] = stem .. "ibus" forms["acc_sg_m"] = stem .. "em" forms["acc_sg_n"] = stem .. "e" forms["acc_pl_m"] = {stem .. "īs", stem .. "ēs"} forms["acc_pl_n"] = stem .. "ia" forms["abl_sg_m"] = stem .. "ī" forms["abl_sg_n"] = stem .. "ī" forms["abl_pl_m"] = stem .. "ibus" forms["abl_pl_n"] = stem .. "ibus" -- abl_i_e(stem, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem .. "is" forms["voc_sg_n"] = stem .. "e" forms["voc_pl_m"] = stem .. "ēs" forms["voc_pl_n"] = stem .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-3+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con tres terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_f"] = stem2 .. "is" forms["nom_sg_n"] = stem2 .. "e" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_f"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_f"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_f"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_f"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_f"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_f"] = stem2 .. "em" forms["acc_sg_n"] = stem2 .. "e" forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_f"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_f"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_f"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" -- abl_i_e(stem2, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem1 forms["voc_sg_f"] = stem2 .. "is" forms["voc_sg_n"] = stem2 .. "e" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_f"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["indecl+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = {} forms["gen_sg_m"] = {} forms["gen_pl_m"] = {} forms["dat_sg_m"] = {} forms["dat_pl_m"] = {} forms["acc_sg_m"] = stem forms["acc_pl_m"] = {} forms["abl_sg_m"] = {} forms["abl_pl_m"] = {} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["irreg+"] = function(data,args) local forms, types, pos, notes, categories = data.forms, data.types, data.pos, data.notes, data.categories local arg1 = args[1] insert_if_not(data.title, "irregular") insert_if_not(categories, "LA:Adjetivos irregulares") if arg1 == "duo" or arg1 == "ambō" then local stem = sub(arg1, 1, -2) -- data.title = stem == "amb" and "irregular adjective" or "numeral" data.num = "pl" local stem_with_o = stem .. (stem == "amb" and "ō" or "o") forms["nom_pl_m"] = stem_with_o forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem_with_o forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_pl_m"] = stem .. "ōbus" forms["dat_pl_f"] = stem .. "ābus" forms["dat_pl_n"] = stem .. "ōbus" forms["acc_pl_m"] = {stem .. "ōs", stem_with_o} forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem_with_o forms["abl_pl_m"] = stem .. "ōbus" forms["abl_pl_f"] = stem .. "ābus" forms["abl_pl_n"] = stem .. "ōbus" forms["voc_pl_m"] = stem_with_o forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem_with_o if stem == "du" then forms["gen_pl_m"] = {forms["gen_pl_m"], "duum", "duom{†}"} forms["gen_pl_n"] = {forms["gen_pl_n"], "duum", "duom{†}"} end elseif arg1:sub(-6) == "mīlle" then insert_if_not(data.title, "numeral semiindeclinable") local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "le" forms["nom_pl_m"] = {stem .. "ia", stem .. "lia"} forms["gen_sg_m"] = stem .. "le" forms["gen_pl_m"] = {stem .. "ium", stem .. "lium"} forms["dat_sg_m"] = stem .. "le" forms["dat_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["acc_sg_m"] = stem .. "le" forms["acc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["abl_sg_m"] = stem .. "le" forms["abl_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["voc_sg_m"] = stem .. "le" forms["voc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) elseif arg1 == "ille" or arg1 == "iste" or arg1 == "ipse" or arg1 == "olle" then local stem = arg1:sub(1, -2) types.ius = true adj_decl["1&2+"](data, {stem}) insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) forms["nom_sg_m"] = arg1 if arg1 == "ipse" then add_form(forms, "nom_sg_n", stem, "ud{MED}") add_form(forms, "acc_sg_n", stem, "ud{MED}") else forms["nom_sg_n"] = stem .. "ud" forms["acc_sg_n"] = stem .. "ud" end forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} elseif arg1 == "illic" or arg1 == "istic" or arg1 == "isthic" then insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["gen_sg_m"] = stem .. "ī̆usce" forms["gen_sg_f"] = stem .. "ī̆usce" forms["gen_sg_n"] = stem .. "ī̆usce" forms["dat_sg_m"] = stem .. "īc" forms["dat_sg_f"] = stem .. "īc" forms["dat_sg_n"] = stem .. "īc" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. "ōc" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["nom_pl_m"] = stem .. "īsce" forms["nom_pl_f"] = stem .. "aec" forms["nom_pl_n"] = stem .. "aec" forms["gen_pl_m"] = stem .. "ōrunc{?}" forms["gen_pl_f"] = stem .. "ārunc{?}" forms["gen_ok_n"] = stem .. "ōrunc{?}" forms["dat_pl_m"] = stem .. "īsce" forms["dat_pl_f"] = stem .. "īsce" forms["dat_pl_n"] = stem .. "īsce" forms["acc_pl_m"] = stem .. "ōsce" forms["acc_pl_f"] = stem .. "āsce" forms["acc_pl_n"] = stem .. "aec" forms["abl_pl_m"] = stem .. "īsce" forms["abl_pl_f"] = stem .. "īsce" forms["abl_pl_n"] = stem .. "īsce" forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "hice" then insert_if_not(data.title, "demostrativo") -- .. " pronoun" forms["nom_sg_m"] = "hice" forms["nom_sg_f"] = "haece" forms["nom_sg_n"] = "hoce" forms["nom_pl_m"] = "hīce" forms["nom_pl_f"] = "haece" forms["nom_pl_n"] = "haece" forms["gen_sg_m"] = "huiusce" forms["gen_sg_f"] = "huiusce" forms["gen_sg_n"] = "huiusce" forms["gen_pl_m"] = {"hōrunce", "hōrumce"} forms["gen_pl_f"] = {"hārunce", "hārumce"} forms["gen_pl_n"] = {"hōrunce", "hōrumce"} forms["dat_sg_m"] = "huīce" forms["dat_sg_f"] = "huīce" forms["dat_sg_n"] = "huīce" forms["dat_pl_m"] = "hīsce" forms["dat_pl_f"] = "hīsce" forms["dat_pl_n"] = "hīsce" forms["acc_sg_m"] = "hunce" forms["acc_sg_f"] = "hance" forms["acc_sg_n"] = "hoce" forms["acc_pl_m"] = "hōsce" forms["acc_pl_f"] = "hāsce" forms["acc_pl_n"] = "haece" forms["abl_sg_m"] = "hōce" forms["abl_sg_f"] = "hāce" forms["abl_sg_n"] = "hōce" forms["abl_pl_m"] = "hīsce" forms["abl_pl_f"] = "hīsce" forms["abl_pl_n"] = "hīsce" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "plūs" then insert_if_not(data.title, "comparativo") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación con una terminación") data.note = "Ninguna de las formas en singular se usaron en latín clásico" forms["nom_sg_n"] = "plūs" forms["nom_pl_m"] = "plūrēs" forms["nom_pl_n"] = "plūra" forms["gen_sg_m"] = "plūris" forms["gen_sg_n"] = "plūris" forms["gen_pl_m"] = "plūrium" forms["gen_pl_n"] = "plūrium" forms["dat_sg_m"] = "plūrī" forms["dat_sg_n"] = "plūrī" forms["dat_pl_m"] = "plūribus" forms["dat_pl_n"] = "plūribus" forms["acc_sg_m"] = "plūrem" forms["acc_sg_f"] = "plūrem" forms["acc_sg_n"] = "plūs" forms["acc_pl_m"] = {"plūrēs", "plūrīs"} forms["acc_pl_n"] = "plūra" forms["abl_sg_m"] = {"plūrī", "plūre"} forms["abl_sg_f"] = {"plūrī", "plūre"} forms["abl_sg_n"] = {"plūrī", "plūre"} forms["abl_pl_m"] = "plūribus" forms["abl_pl_n"] = "plūribus" forms["voc_sg_n"] = "plūs" forms["voc_pl_m"] = "plūrēs" forms["voc_pl_n"] = "plūra" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif match(arg1, "^egō̆?$") or arg1 == "nōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "nōs" forms["gen_sg_m"] = "meī" forms["gen_pl_m"] = {"nostrī", "nostrum"} forms["dat_sg_m"] = "mihī̆" forms["dat_pl_m"] = "nōbīs" forms["acc_sg_m"] = {"mē", "mēmē"} forms["acc_pl_m"] = "nōs" forms["abl_sg_m"] = {"mē", "mēmē"} forms["abl_pl_m"] = "nōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "nōs" elseif arg1 == "tū" or arg1 == "vōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "vōs" forms["gen_sg_m"] = "tuī" forms["gen_pl_m"] = {"vestrī", "vestrum"} forms["dat_sg_m"] = "tibī̆" forms["dat_pl_m"] = "vōbīs" forms["acc_sg_m"] = {"tē", "tētē"} forms["acc_pl_m"] = "vōs" forms["abl_sg_m"] = {"tē", "tētē"} forms["abl_pl_m"] = "vōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "vōs" elseif arg1 == "suī" then insert_if_not(data.title, "pronombre reflexivo") forms["nom_sg_m"] = {} forms["nom_pl_m"] = {} forms["gen_sg_m"] = arg1 forms["gen_pl_m"] = forms["gen_sg_m"] forms["dat_sg_m"] = "sibī̆" forms["dat_pl_m"] = forms["dat_sg_m"] forms["acc_sg_m"] = {"sē", "sēsē"} forms["acc_pl_m"] = {"sē", "sēsē"} forms["abl_sg_m"] = {"sē", "sēsē"} forms["abl_pl_m"] = {"sē", "sēsē"} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} elseif arg1 == "is" or arg1 == "īdem" then insert_if_not(data.title, "pronombre demostrativo") forms["nom_sg_m"] = "is" forms["nom_sg_f"] = "ea" forms["nom_sg_n"] = "id" forms["nom_pl_m"] = {"iī", "eī", "ī"} forms["nom_pl_f"] = "eae" forms["nom_pl_n"] = "ea" forms["gen_sg_m"] = {"eius", "ejus"} forms["gen_sg_f"] = {"eius", "ejus"} forms["gen_sg_n"] = {"eius", "ejus"} forms["gen_pl_m"] = {"eōrum", "eum"} forms["gen_pl_f"] = "eārum" forms["gen_pl_n"] = {"eōrum", "eum"} forms["dat_sg_m"] = {"eī", "e͡i", "ēī"} forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"} forms["dat_sg_n"] = {"eī", "e͡i", "ēī"} forms["dat_pl_m"] = {"iīs", "eīs", "īs"} forms["dat_pl_f"] = {"iīs", "eīs", "īs", "eābus"} forms["dat_pl_n"] = {"iīs", "eīs", "īs"} forms["acc_sg_m"] = "eum" forms["acc_sg_f"] = "eam" forms["acc_sg_n"] = "id" forms["acc_pl_m"] = "eōs" forms["acc_pl_f"] = "eās" forms["acc_pl_n"] = "ea" forms["abl_sg_m"] = "eō" forms["abl_sg_f"] = "eā" forms["abl_sg_n"] = "eō" forms["abl_pl_m"] = {"iīs", "eīs", "īs"} forms["abl_pl_f"] = {"iīs", "eīs", "īs"} forms["abl_pl_n"] = {"iīs", "eīs", "īs"} if arg1 == "īdem" then forms["nom_sg_m"] = "ī" forms["nom_sg_n"] = "i" forms["acc_sg_n"] = "i" end elseif arg1 == "quis" or arg1 == "quī" then data.note = "La forma ''qua'' es preferida frente a ''quae'' cuando se usa como indefinido" local id = "id" if arg1 == "quī" then insert_if_not(data.title, "determinante relativo/interrogativo") id = "od" forms["nom_sg_m"] = {"quī", "quis", "quei{†}"} forms["nom_sg_f"] = {"quae", "qua"} forms["acc_sg_f"] = "quam" forms["abl_sg_m"] = "quō" forms["abl_sg_f"] = "quā" forms["abl_sg_n"] = "quō" else insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = {"quis", "quī"} forms["nom_sg_f"] = {"quae", "qua", "quis{†}"} forms["acc_sg_f"] = {"quam", "quem{†}"} forms["abl_sg_m"] = {"quō", "quī"} forms["abl_sg_f"] = {"quā", "quī"} forms["abl_sg_n"] = {"quō", "quī"} end forms["nom_sg_n"] = "qu"..id forms["nom_pl_m"] = {"quī", "quei{†}"} forms["nom_pl_f"] = "quae" forms["nom_pl_n"] = {"quae", "qua"} forms["gen_sg_m"] = {"cuius", "quoius{†}"} forms["gen_sg_f"] = {"cuius", "quoius{†}"} forms["gen_sg_n"] = {"cuius", "quoius{†}"} forms["gen_pl_m"] = "quōrum" forms["gen_pl_f"] = "quārum" forms["gen_pl_n"] = "quōrum" forms["dat_sg_m"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_f"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_n"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_n"] = {"quibus", "quīs", "queis{†}"} forms["acc_sg_m"] = "quem" forms["acc_sg_n"] = "qu"..id forms["acc_pl_m"] = "quōs" forms["acc_pl_f"] = "quās" forms["acc_pl_n"] = {"quae", "qua"} forms["abl_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_n"] = {"quibus", "quīs", "queis{†}"} elseif arg1 == "aliquī" then insert_if_not(data.title, "determinante indefinido") forms["nom_sg_m"] = {"aliquī{DET/ADJ}", "aliquis{PRON/SUST}"} forms["nom_sg_f"] = {"aliqua", "aliquae{R}"} forms["nom_sg_n"] = "aliquod" forms["nom_pl_m"] = "aliquī" forms["nom_pl_f"] = "aliquae" forms["nom_pl_n"] = "aliqua" forms["gen_sg_m"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_f"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_n"] = {"alicuius", "aliquoius{†}"} forms["gen_pl_m"] = "aliquōrum" forms["gen_pl_f"] = "aliquārum" forms["gen_pl_n"] = "aliquōrum" forms["dat_sg_m"] = {"alicui", "aliquoi{†}"} forms["dat_sg_f"] = {"alicui", "aliquoi{†}"} forms["dat_sg_n"] = {"alicui", "aliquoi{†}"} forms["dat_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["acc_sg_m"] = "aliquem" forms["acc_sg_f"] = "aliquam" forms["acc_sg_n"] = "aliquod" forms["acc_pl_m"] = "aliquōs" forms["acc_pl_f"] = "aliquās" forms["acc_pl_n"] = "aliqua" forms["abl_sg_m"] = "aliquō" forms["abl_sg_f"] = "aliquā" forms["abl_sg_n"] = "aliquō" forms["abl_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} elseif arg1 == "quisquam" then insert_if_not(data.title, "determinante indefinido, concordancia en negativo") data.note = "En latín clásico, era preferidas las formas de ''ūllus'' en lugar de las esta voz para el femenino y el neutro." forms["nom_sg_m"] = "quisquam" forms["nom_sg_f"] = {"quaequam", "quisquam{†}"} forms["nom_sg_n"] = "quodquam" forms["nom_pl_m"] = "quīquam" forms["nom_pl_f"] = "quaequam" forms["nom_pl_n"] = "quaequam" forms["gen_sg_m"] = "cuiusquam" forms["gen_sg_f"] = "cuiusquam" forms["gen_sg_n"] = "cuiusquam" forms["gen_pl_m"] = "quōrumquam" forms["gen_pl_f"] = "quārumquam" forms["gen_pl_n"] = "quōrumquam" forms["dat_sg_m"] = "cuiquam" forms["dat_sg_f"] = "cuiquam" forms["dat_sg_n"] = "cuiquam" forms["dat_pl_m"] = "quibusquam" forms["dat_pl_f"] = "quibusquam" forms["dat_pl_n"] = "quibusquam" forms["acc_sg_m"] = "quemquam" forms["acc_sg_f"] = {"quamquam", "quemquam{†}"} forms["acc_sg_n"] = "quodquam" forms["acc_pl_m"] = "quōsquam" forms["acc_pl_f"] = "quāsquam" forms["acc_pl_n"] = "quaequam" forms["abl_sg_m"] = {"quōquam", "quīquam{†}"} forms["abl_sg_f"] = "quāquam" forms["abl_sg_n"] = "quōquam" forms["abl_pl_m"] = "quibusquam" forms["abl_pl_f"] = "quibusquam" forms["abl_pl_n"] = "quibusquam" forms["voc_sg_m"] = "quisquam" forms["voc_sg_f"] = "quaequam" forms["voc_sg_n"] = "quodquam" forms["voc_pl_m"] = "quīquam" forms["voc_pl_f"] = "quaequam" forms["voc_pl_n"] = "quaequam" elseif arg1 == "quisquis" then insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = "quisquis" forms["nom_sg_f"] = "quisquis" forms["nom_sg_n"] = {"quidquid", "quicquid"} forms["nom_pl_m"] = "quīquī" forms["nom_pl_f"] = "quaequae" forms["nom_pl_n"] = "quaequae" forms["gen_sg_m"] = "cuiuscuius" forms["gen_sg_f"] = "cuiuscuius" forms["gen_sg_n"] = "cuiuscuius" forms["gen_pl_m"] = "quōrumquōrum" forms["gen_pl_f"] = "quārumquārum" forms["gen_pl_n"] = "quōrumquōrum" forms["dat_sg_m"] = "cuicui" forms["dat_sg_f"] = "cuicui" forms["dat_sg_n"] = "cuicui" forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"} forms["acc_sg_m"] = "quemquem" forms["acc_sg_f"] = "quamquam" forms["acc_sg_n"] = {"quidquid", "quicquid"} forms["acc_pl_m"] = "quōsquōs" forms["acc_pl_f"] = "quāsquās" forms["acc_pl_n"] = "quaequae" forms["abl_sg_m"] = "quōquō" forms["abl_sg_f"] = "quāquā" forms["abl_sg_n"] = "quōquō" forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"} forms["voc_sg_m"] = "quisquis" forms["voc_sg_f"] = "quisquis" forms["voc_sg_n"] = {"quidquid", "quicquid"} forms["voc_pl_m"] = "quīquī" forms["voc_pl_f"] = "quaequae" forms["voc_pl_n"] = "quaequae" elseif arg1 == "ecquis" then insert_if_not(data.title, "pronombre interrogativo") forms["nom_sg_m"] = {"ecquis", "ecquī"} forms["nom_sg_f"] = {"ecqua", "ecquae"} forms["nom_sg_n"] = "ecquid" forms["nom_pl_m"] = "ecquī" forms["nom_pl_f"] = "ecquae" forms["nom_pl_n"] = {"ecqua", "ecquae"} forms["gen_sg_m"] = "eccuius" forms["gen_sg_f"] = "eccuius" forms["gen_sg_n"] = "eccuius" forms["dat_sg_m"] = "eccui" forms["dat_sg_f"] = "eccui" forms["dat_sg_n"] = "eccui" forms["acc_sg_m"] = "ecquem" forms["acc_sg_f"] = "ecquam" forms["acc_sg_n"] = "ecquod" forms["acc_pl_m"] = "ecquōs" forms["acc_pl_f"] = "ecquās" forms["acc_pl_n"] = {"ecqua", "ecquae"} forms["abl_sg_m"] = {"ecquō", "ecquī"} forms["abl_sg_f"] = {"ecquā", "ecquī"} forms["abl_sg_n"] = {"ecquō", "ecquī"} elseif arg1 == "quīdam" then insert_if_not(data.title, "pronombre indefinido") forms["nom_sg_m"] = "quīdam" forms["nom_sg_f"] = "quaedam" forms["nom_sg_n"] = "quiddam" forms["nom_pl_m"] = {"quīdam", "quēsdam{†}"} forms["nom_pl_f"] = "quaedam" forms["nom_pl_n"] = "quaedam" forms["gen_sg_m"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_f"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_n"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_pl_m"] = {"quōrundam", "quōrumdam"} forms["gen_pl_f"] = {"quārundam", "quārumdam"} forms["gen_pl_n"] = {"quōrundam", "quōrumdam"} forms["dat_sg_m"] = {"cuidam", "quoidam{†}"} forms["dat_sg_f"] = {"cuidam", "quoidam{†}"} forms["dat_sg_n"] = {"cuidam", "quoidam{†}"} forms["dat_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_n"] = {"quibusdam", "quīsdam{†}"} forms["acc_sg_m"] = {"quendam", "quemdam"} forms["acc_sg_f"] = {"quandam", "quamdam"} forms["acc_sg_n"] = "quiddam" forms["acc_pl_m"] = {"quōsdam", "quēsdam{†}"} forms["acc_pl_f"] = "quāsdam" forms["acc_pl_n"] = "quaedam" forms["abl_sg_m"] = "quōdam" forms["abl_sg_f"] = "quādam" forms["abl_sg_n"] = "quōdam" forms["abl_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_n"] = {"quibusdam", "quīsdam{†}"} elseif arg1 == "nēmō" then insert_if_not(data.title, "Determinante y pronombre, concordancia en negativo") forms["nom_sg_m"] = "nēmō" forms["nom_sg_f"] = "nēmō" forms["gen_sg_m"] = {"nūllī̆us", "nēminis{R}"} forms["gen_sg_f"] = {"nūllī̆us", "nēminis{R}"} forms["dat_sg_m"] = "nēminī" forms["dat_sg_f"] = "nēminī" forms["acc_sg_m"] = "nēminem" forms["acc_sg_f"] = "nēminem" forms["abl_sg_m"] = {"nūllō", "nēmine{R}"} forms["abl_sg_f"] = {"nūllā", "nēmine{R}"} else error('adjective ' .. arg1 .. ' not recognized') end end local function extract_base(lemma, ending) if ending:find("(", nil, true) then return match(lemma, ending) end return match(lemma, "^(.*)" .. ending .. "$") end local function get_noun_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local subtypes = ending_and_subtypes[2] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. -- In addition, M or F as a subtype is canceled by N, and -- vice-versa, but M doesn't cancel F or vice-versa; instead, -- we simply ignore the conflicting gender specification when -- constructing the combination of specified and inferred subtypes. -- The reason for this is that neuters have distinct declensions -- from masculines and feminines, but masculines and feminines have -- the same declension, and various nouns in Latin that are -- normally masculine are exceptionally feminine and vice-versa -- (nauta, agricola, fraxinus, malus "apple tree", manus, rēs, -- etc.). -- -- In addition, sg as a subtype is canceled by pl and vice-versa. -- It's also possible to specify both, which will override sg but -- not cancel it (in the sense that it won't prevent the relevant -- rule from matching). For example, there's a rule specifying that -- lemmas beginning with a capital letter and ending in -ius take -- the ius.voci.sg subtypes. Specifying such a lemma with the -- subtype both will result in the ius.voci.both subtypes, whereas -- specifying such a lemma with the subtype pl will cause this rule -- not to match, and it will fall through to a less specific rule -- that returns just the ius subtype, which will be combined with -- the explicitly specified pl subtype to produce ius.pl. if specified_subtypes["-" .. subtype] or subtype == "N" and (specified_subtypes.M or specified_subtypes.F) or (subtype == "M" or subtype == "F") and specified_subtypes.N or subtype == "sg" and specified_subtypes.pl or subtype == "pl" and specified_subtypes.sg then not_this_subtype = true break end end end if not not_this_subtype then if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] local base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending == stem2 then return base, stem2, subtypes end else local base = extract_base(lemma, ending) if base then return base, stem2, subtypes end end end end if decltype then error("Unrecognized ending for declension-" .. decltype .. " noun: " .. lemma) end return lemma, stem2, keys_to_list(specified_subtypes) end local patterns = { {"[mM]a", "%0t"}, {"e", ""}, {"([aoAO])([lr])", "%1" .. MACRON .. "%2"}, {"[eE]l", "%0l"}, {"([mM])en", "%1in"}, {"([tT]ūd)ō", "%1in"}, {"([gG])ō", "%1in"}, {"[ōŌ]", "%1n"}, {"er", "r"}, {"[ēi]s", ""}, {"([āēīōūȳĀĒĪŌŪȲ]n)s", function(v) return (gsub(toNFD(v), MACRON, "") .. "t") end}, {"([cC])eps", "%1ipit"}, {"([bp])s", "%1"}, {"us", "or"}, {"s", "t"}, {"ex", "ic"}, {"x", "c"}, } local function make_stem2(stem) local n for _, pattern in ipairs(patterns) do local key = pattern[1] stem, n = gsub(stem, key .. "$", pattern[2]) if n > 0 then -- debug_track("la-utilities/" .. key) REVISAR return toNFC(stem) end end -- debug_track("la-utilities") REVISAR return stem end local function detect_noun_subtype(lemma, stem2, typ, subtypes) local base, _ if typ == "1" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ām", {"F", "am"}}, {"ās", {"M", "Greek", "Ma"}}, {"ēs", {"M", "Greek", "Me"}}, {"ē", {"F", "Greek"}}, {"ae", {"F", "pl"}}, {"a", {"F"}}, }) elseif typ == "2" then local detected_subtypes lemma, stem2, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(.*r)$", {"M", "er"}}, {"^(.*v)os$", {"M", "vos"}}, {"^(.*v)om$", {"N", "vom"}}, -- If the lemma ends in -os and the user said N or -M, then the -- following won't apply, and the second (neuter) -os will applly. {"os", {"M", "Greek"}}, {"os", {"N", "Greek", "us"}}, {"on", {"N", "Greek"}}, -- -ius beginning with a capital letter is assumed a proper name, -- and takes the voci subtype (vocative in -ī) along with the ius -- subtype and sg-only. Other nouns in -ius just take the ius -- subtype. Explicitly specify "sg" so that if .pl is given, -- this rule won't apply. {"^(%u.*)ius$", {"M", "ius", "voci", "sg"}}, {"ius", {"M", "ius"}}, {"ium", {"N", "ium"}}, -- If the lemma ends in -us and the user said N or -M, then the -- following won't apply, and the second (neuter) -us will applly. {"us", {"M"}}, {"us", {"N", "us"}}, {"um", {"N"}}, {"iī", {"M", "ius", "pl"}}, {"ia", {"N", "ium", "pl"}}, -- If the lemma ends in -ī and the user said N or -M, then the -- following won't apply, and the second (neuter) -ī will applly. {"ī", {"M", "pl"}}, {"ī", {"N", "us", "pl"}}, {"oe", {"M", "Greek", "pl"}}, {"a", {"N", "pl"}}, }) stem2 = stem2 or lemma return lemma, stem2, detected_subtypes elseif typ == "3" then if subtypes.pl then if subtypes.Greek then base = lemma:match("^(.*)erēs$") if base then return base .. "ēr", base .. "er", {"er"} end base = lemma:match("^(.*)ontēs$") if base then return base .. "ōn", base .. "ont", {"on"} end base = lemma:match("^(.*)es$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural Greek noun: " .. lemma) end base = lemma:match("^(.*)ia$") if base then return base, stem2 or base, {"N", "I", "pure"} end base = lemma:match("^(.*)a$") if base then return base, stem2 or base, {"N"} end base = lemma:match("^(.*)ēs$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural noun: " .. lemma) end stem2 = stem2 or make_stem2(lemma) local detected_subtypes if subtypes.Greek then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"is", ""}, {"I"}}, {"ēr", {"er"}}, {"ōn", {"on"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} end if not subtypes.N then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"^(%u.*pol)is$", ""}, {"F", "polis", "sg", "loc"}}, {{"tūdō", "tūdin"}, {"F"}}, {{"tās", "tāt"}, {"F"}}, {{"tūs", "tūt"}, {"F"}}, {{"tiō", "tiōn"}, {"F"}}, {{"siō", "siōn"}, {"F"}}, {{"xiō", "xiōn"}, {"F"}}, {{"gō", "gin"}, {"F"}}, {{"or", "ōr"}, {"M"}}, {{"tr[iī]x", "trīc"}, {"F"}}, {{"is", ""}, {"I"}}, {{"^(%l.*)ēs$", ""}, {"I"}}, }) if base then return lemma, stem2, detected_subtypes end end base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"us", "or"}, {"N"}}, {{"us", "er"}, {"N"}}, {{"ma", "mat"}, {"N"}}, {{"men", "min"}, {"N"}}, {{"^(%u.*)e$", ""}, {"N", "sg"}}, {{"e", ""}, {"N", "I", "pure"}}, {{"al", "āl"}, {"N", "I", "pure"}}, {{"ar", "ār"}, {"N", "I", "pure"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} elseif typ == "4" then if subtypes.echo or subtypes.Callisto then base = lemma:match("^(.*)ō$") if not base then error("Declension-4 noun of subtype .echo or .Callisto should end in -ō: " .. lemma) end if subtypes.Callisto then return base, nil, {"F", "sg"} else return base, nil, {"F"} end end return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", {"M"}}, {"ū̆", {"N"}}, {"ūs", {"M", "pl"}}, {"ua", {"N", "pl"}}, }) elseif typ == "5" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"iēs", {"F", "i"}}, {"iēs", {"F", "i", "pl"}}, {"ēs", {"F"}}, {"ēs", {"F", "pl"}}, }) elseif typ == "sgpl" then return lemma, stem2, {} elseif typ == "irreg" and lemma == "domus" then -- [[domus]] auto-sets data.loc = true, but we need to know this -- before declining the noun so we can propagate it to other segments. return lemma, nil, {"loc"} elseif typ == "indecl" or typ == "irreg" and ( lemma == "Deus" or match(lemma, "^[IJ]ēs[uū]s$") or lemma == "Athōs" or lemma == "vēnum" ) then -- Indeclinable nouns, and certain irregular nouns, set data.num = "sg", -- but we need to know this before declining the noun so we can -- propagate it to other segments. return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", {"both"}}, {"", {"sg"}}, {"", {"pl"}}, }) elseif typ == "indecl" or typ == "irreg" then return lemma, nil, {} else return nil, nil, {} end end -- Given ENDINGS_AND_SUBTYPES (a list of four-tuples of ENDING, RETTYPE, -- SUBTYPES, PROCESS_RETVAL), check each ENDING in turn against LEMMA and -- STEM2. If it matches, return a four-tuple BASE, STEM2, RETTYPE, NEW_SUBTYPES -- where BASE is normally the remainder of LEMMA minus the ending, STEM2 is -- as passed in, RETTYPE is as passed in, and NEW_SUBTYPES is the same as -- SUBTYPES minus any subtypes beginning with a hyphen. If no endings match, -- throw an error if DECLTYPPE is non-nil, mentioning the DECLTYPE -- (user-specified declension); but if DECLTYPE is nil, just return the tuple -- nil, nil, nil, nil. -- -- In order for a given entry to match, ENDING must match and also the subtypes -- in SUBTYPES (a list) must not be incompatible with the passed-in -- user-specified subtypes SPECIFIED_SUBTYPES (a set, i.e. a table where the -- keys are strings and the value is always true). "Incompatible" means that -- a given SUBTYPE is specified in either one and -SUBTYPE in the other, or -- that "pl" is found in SPECIFIED_SUBTYPES and not in SUBTYPES. -- -- The ending spec in ENDINGS_AND_SUBTYPES is one of the following: -- -- 1. A simple string, e.g. "tūdō", specifying an ending. -- 2. A regex that should match the entire lemma (it should be anchored at -- the beginning with ^ and at the end with $), and contains a single -- capturing group to match the base. -- 3. A pair {SIMPLE_STRING_OR_REGEX, STEM2_ENDING} where -- SIMPLE_STRING_OR_REGEX is one of the previous two possibilities and -- STEM2_ENDING is a string specifying the corresponding ending that must -- be present in STEM2. If this form is used, the combination of -- base + STEM2_ENDING must exactly match STEM2 in order for this entry -- to be considered a match. An example is {"is", ""}, which will match -- lemma == "follis", stem2 == "foll", but not lemma == "lapis", -- stem2 == "lapid". -- -- If PROCESS_STEM2 is given and the returned STEM2 would be nil, call -- process_stem2(BASE) to get the STEM2 to return. local function get_adj_type_and_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes, process_stem2) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local rettype = ending_and_subtypes[2] local subtypes = ending_and_subtypes[3] local process_retval = ending_and_subtypes[4] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. if specified_subtypes["-" .. subtype] then not_this_subtype = true break end -- A subtype is canceled if the user specified SUBTYPE and -- -SUBTYPE is given in the to-be-returned subtypes. local must_not_be_present = subtype:match("^%-(.*)$") if must_not_be_present and specified_subtypes[must_not_be_present] then not_this_subtype = true break end end end if not not_this_subtype then local base if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending ~= stem2 then base = nil end else base = extract_base(lemma, ending) end if base then -- Remove subtypes of the form -SUBTYPE from the subtypes -- to be returned. local new_subtypes = {} for _, subtype in ipairs(subtypes) do if subtype:sub(1, 1) ~= "-" then insert(new_subtypes, subtype) end end if process_retval then base, stem2 = process_retval(base, stem2) end if process_stem2 then stem2 = stem2 or process_stem2(base) end return base, stem2, rettype, new_subtypes end end end if not decltype then return lemma, stem2, nil, keys_to_list(specified_subtypes) elseif decltype == "" then error("Unrecognized ending for adjective: " .. lemma) else error("Unrecognized ending for declension-" .. decltype .. " adjective: " .. lemma) end end -- Autodetect the type and subtype of an adjective given all the information -- specified by the user: lemma, stem2, declension type and specified subtypes. -- Four values are returned: the lemma base (i.e. the stem of the lemma, as -- required by the declension functions), the value of stem2 to pass to the -- declension function, the declension type and the autodetected subtypes. -- Note that this will not detect a given subtype if -SUBTYPE is specified for -- any subtype that would be returned, or if SUBTYPE is specified and -SUBTYPE -- is among the subtypes that would be returned (such subtypes are filtered out -- of the returned subtypes). local function detect_adj_type_and_subtype(lemma, stem2, typ, subtypes) local function base_as_stem2(base, stem2) return base, base end local function constant_base(baseval) return function(base, stem2) return baseval, nil end end local function decl12_stem2(base) return base end local function decl3_stem2(base) return make_stem2(base) end local decl12_entries = { {"us", "1&2+", {}}, {"a", "1&2+", {}}, {"um", "1&2+", {}}, {"ī", "1&2+", {"pl"}}, {"ae", "1&2+", {"pl"}}, {"a", "1&2+", {"pl"}}, -- Nearly all -os adjectives are greekA {"os", "1&2+", {"greekA", "-greekE"}}, {"os", "1&2+", {"greekE", "-greekA"}}, {"ē", "1&2+", {"greekE", "-greekA"}}, {"on", "1&2+", {"greekA", "-greekE"}}, {"on", "1&2+", {"greekE", "-greekA"}}, {"^(.*er)$", "1&2+", {"er"}}, {"^(.*ur)$", "1&2+", {"er"}}, {"^(h)ic$", "1&2+", {"ic"}}, } local decl3_entries = { {"^(.*er)$", "3-3+", {"I"}}, {"^(.*er)$", "3-3+", {}}, {"is", "3-2+", {"I"}}, {"is", "3-2+", {}}, {"e", "3-2+", {"I"}}, {"e", "3-2+", {}}, {"^(.*[ij])or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(.*[ij])or$", "3-C+", {}}, {"^(min)or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(min)or$", "3-C+", {}}, {"^(.*trīx)$", "3-def+", {"trix", "abl_i_e", "-abl_e_i"}}, {"^(.*trīx)$", "3-def+", {"trix"}}, {"^(.*tor)$", "3-def+", {"tor", "abl_i_e", "-abl_e_i"}}, {"^(.*tor)$", "3-def+", {"tor"}}, -- Detect -ēs as 3-1 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like quadripēs, volucripēs). -- Essentially, for declension-3 adjectives, we require that -- .pl is given if the lemma is plural. -- -- Most 3-1 adjectives are i-stem (e.g. audāx) so we require -I -- to be given with non-i-stem adjectives. The first entry below -- will apply when -I isn't given, the second when it is given. {"^(.*ēs)$", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"I"}}, {"^(.*ēs)$", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"par"}}, {"^(.*[ij])ōrēs$", "3-C+", {"pl"}}, {"^(min)ōrēs$", "3-C+", {"pl"}}, -- If .pl with -ēs, we don't know if the adjective is 3-1, 3-2 -- or 3-3. Since 3-2 is probably the most common, we infer it -- (as well as the fact that these adjectives *are* in a sense -- 3-2 since they have a distinct neuter in -(i)a. Note that -- we have two entries here; the first one will apply unless -- -I is given, and will infer an i-stem adjective; the second -- one will apply otherwise (and infer a non-i-stem 3-1 adjective). {"ēs", "3-2+", {"pl", "I"}, base_as_stem2}, {"ēs", "3-1+", {"pl", "par"}, base_as_stem2}, -- Same for neuters. {"ia", "3-2+", {"pl", "I"}, base_as_stem2}, {"a", "3-1+", {"pl", "par"}, base_as_stem2}, -- As above for -ēs but for miscellaneous singulars. {"", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"I"}}, {"", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"par"}}, } local function get_subtypes_and_endings(typ, f) local subtypes_and_endings = {} for _, v in ipairs(decl3_entries) do if f(v) then v = deep_copy(v) v[2] = typ insert(subtypes_and_endings, v) end end return subtypes_and_endings end local function compare(spec) return spec[2] == typ end if typ == "+" then local base, new_stem2, rettype, new_subtypes = get_adj_type_and_subtype_by_ending(lemma, stem2, nil, subtypes, decl12_entries, decl12_stem2) if rettype then return base, new_stem2, rettype, new_subtypes else return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) end elseif typ == "3+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) elseif typ == "1&2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl12_entries, decl12_stem2) elseif typ == "1-1+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"a", typ, {}}, {"ae", typ, {"pl"}}, }) elseif typ == "2-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", typ, {}}, {"um", typ, {}}, {"ī", typ, {"pl"}}, {"a", typ, {"pl"}}, {"os", typ, {"greek"}}, {"on", typ, {"greek"}}, {"oe", typ, {"greek", "pl"}}, }) elseif typ == "3-1+" then -- Use the specs from `decl3_entries`, but add the two i-stem 3-2+ specs when plural-only, as they're the same when 3-1+. local subtypes_and_endings = get_subtypes_and_endings(typ, function(spec) local spec1, spec2 = spec[1], spec[2] return spec2 == typ or (spec2 == "3-2+" and spec1 == "ēs" or spec1 == "ia") end) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-def+" then -- Like 3-1+ but defective in gender local subtypes_and_endings = get_subtypes_and_endings(typ, compare) insert(subtypes_and_endings, {"", typ, {"I"}}) insert(subtypes_and_endings, {"", typ, {"par"}}) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"is", typ, {}}, {"e", typ, {}}, -- Detect -ēs as 3-2 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like isoscelēs). Essentially, -- for declension-3 adjectives, we require that .pl is given -- if the lemma is plural. {"ēs", typ, {}}, {"ēs", typ, {"pl"}}, {"ia", typ, {"pl"}}, }, decl3_stem2) elseif typ == "3-3+" or typ == "3-P+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ēs", typ, {"pl"}, base_as_stem2}, {"ia", typ, {"pl"}, base_as_stem2}, {"", typ, {}}, }, decl3_stem2) elseif typ == "3-C+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, get_subtypes_and_endings(typ, compare), decl3_stem2) elseif typ == "irreg+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(duo)$", typ, {"pl"}}, {"^(ambō)$", typ, {"pl"}}, {"^(mīll?ia)$", typ, {"N", "pl"}, constant_base("mīlle")}, -- match ea {"^(ea)$", typ, {}, constant_base("is")}, -- match id {"^(id)$", typ, {}, constant_base("is")}, -- match plural eī, iī {"^([ei]ī)$", typ, {"pl"}, constant_base("is")}, -- match plural ea, eae {"^(eae?)$", typ, {"pl"}, constant_base("is")}, -- match eadem {"^(eadem)$", typ, {}, constant_base("īdem")}, -- match īdem, idem {"^([īi]dem)$", typ, {}, constant_base("īdem")}, -- match plural īdem {"^(īdem)$", typ, {"pl"}}, -- match plural eadem, eaedem {"^(eae?dem)$", typ, {"pl"}, constant_base("īdem")}, -- match illa, ipsa, ista; it doesn't matter if we overmatch because -- we'll get an error as we use the stem itself in the returned base {"^(i[lps][lst])a$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match illud, istud; as above, it doesn't matter if we overmatch {"^(i[ls][lt])ud$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match ipsum {"^(ipsum)$", typ, {}, constant_base("ipse")}, -- match plural illī, ipsī, istī; as above, it doesn't matter if we -- overmatch {"^(i[lps][lst])ī$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- match plural illa, illae, ipsa, ipsae, ista, istae; as above, it -- doesn't matter if we overmatch {"^(i[lps][lst])ae?$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- Detect quī as non-plural unless .pl specified. {"^(quī)$", typ, {}}, -- Otherwise detect quī as plural. {"^(quī)$", typ, {"pl"}}, -- Same for quae. {"^(quae)$", typ, {}, constant_base("quī")}, {"^(quae)$", typ, {"pl"}, constant_base("quī")}, {"^(quid)$", typ, {}, constant_base("quis")}, {"^(quod)$", typ, {}, constant_base("quī")}, {"^(qui[cd]quid)$", typ, {}, constant_base("quisquis")}, {"^(quīquī)$", typ, {"pl"}, constant_base("quisquis")}, {"^(quaequae)$", typ, {"pl"}, constant_base("quisquis")}, -- match all remaining lemmas in lemma form {"", typ, {}}, }) elseif typ == "indecl+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", typ, {"both"}}, {"", typ, {"sg"}}, {"", typ, {"pl"}}, }) else -- 0+ return lemma, nil, typ, {} end end local noun_lb = { nom_sg = "sg.", gen_sg = "sg.", dat_sg = "sg.", acc_sg = "sg.", abl_sg = "sg.", voc_sg = "sg.", loc_sg = "sg.", nom_pl = "pl.", gen_pl = "pl.", dat_pl = "pl.", acc_pl = "pl.", abl_pl = "pl.", voc_pl = "pl.", loc_pl = "pl." } function export.sust(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de = "num"}, ["nota"] = {}, } for form,_ in pairs(noun_lb) do params[form] = {lista=true} end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local genero local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, detected_subtypes = detect_noun_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end if not genero then if types.M then genero = "m" end if types.N then genero = "n" end if types.F then genero = "f" end end local es_adj if not r1 and genero then local typ r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) if r1 then c = typ es_adj = true end end assert(r1, "forma no reconocida: "..r[1]) local cb = es_adj and adj_decl[c] or noun_decl[c] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) if es_adj then local forms_ = {} for form,arr in pairs(data.forms) do local f1, f2 = form:match("^(.*)(_"..genero..")$") if f1 then forms_[f1] = arr end end data.forms = forms_ end if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, noun_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if declinfo["loc_sg"] and #declinfo["loc_sg"] == 0 then declinfo["loc_sg"] = nil end if declinfo["loc_pl"] and #declinfo["loc_pl"] == 0 then declinfo["loc_pl"] = nil end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local forms = sobreescribir_formas(declinfo, args, false, {}) comprobar_defectivo(forms, {}) forms = desactivar_formas(forms, function (form) return (form:find("pl$") and nopl) or (form:find("sg$") and nosg) end ) local raiz_nom = f(forms["nom_sg"][1] or forms["nom_pl"][1] or "?") local raiz_gen = f(forms["gen_sg"][1] or forms["gen_pl"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, noun_lb) local t = {} insert(t, {{""}, {"Singular"}, {"Plural"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg"], forms["nom_pl"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg"], forms["gen_pl"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg"], forms["dat_pl"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg"], forms["acc_pl"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg"], forms["abl_pl"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg"], forms["voc_pl"]}) if (forms["loc_sg"] and forms["loc_sg"][1]) or (forms["loc_pl"] and forms["loc_pl"][1]) then insert(t, {{"Locativo", header=true, color=COLOR_H}, forms["loc_sg"], forms["loc_pl"]}) end insert(t, {{args["nota"] or "", colspan=3}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_nom..", "..raiz_gen.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local adj_lb = { nom_sg_m = "m.", nom_sg_n = "n.", nom_sg_f = "f.", nom_pl_m = "m.", nom_pl_n = "n.", nom_pl_f = "f.", gen_sg_m = "m.", gen_sg_n = "n.", gen_sg_f = "f.", gen_pl_m = "m.", gen_pl_n = "n.", gen_pl_f = "f.", dat_sg_m = "m.", dat_sg_n = "n.", dat_sg_f = "f.", dat_pl_m = "m.", dat_pl_n = "n.", dat_pl_f = "f.", acc_sg_m = "m.", acc_sg_n = "n.", acc_sg_f = "f.", acc_pl_m = "m.", acc_pl_n = "n.", acc_pl_f = "f.", abl_sg_m = "m.", abl_sg_n = "n.", abl_sg_f = "f.", abl_pl_m = "m.", abl_pl_n = "n.", abl_pl_f = "f.", voc_sg_m = "m.", voc_sg_n = "n.", voc_sg_f = "f.", voc_pl_m = "m.", voc_pl_n = "n.", voc_pl_f = "f.", } function export.adj(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de="num"}, ["gen"] = {por_defecto="mfn"}, ["nota"] = {}, } for form,_ in pairs(adj_lb) do params[form] = {lista=true} end params["dat_pl"] = {lista=true} params["abl_pl"] = {lista=true} params["loc_pl"] = {lista=true} local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) if args["dat_pl"][1] then args["dat_pl_m"] = deep_copy(args["dat_pl"]) args["dat_pl_n"] = deep_copy(args["dat_pl"]) args["dat_pl_f"] = deep_copy(args["dat_pl"]) end if args["abl_pl"][1] then args["abl_pl_m"] = deep_copy(args["abl_pl"]) args["abl_pl_n"] = deep_copy(args["abl_pl"]) args["abl_pl_f"] = deep_copy(args["abl_pl"]) end if args["loc_pl"][1] then args["loc_pl_m"] = deep_copy(args["loc_pl"]) args["loc_pl_n"] = deep_copy(args["loc_pl"]) args["loc_pl_f"] = deep_copy(args["loc_pl"]) end args["dat_pl"] = nil args["abl_pl"] = nil args["loc_pl"] = nil assert(not find(title, " "), "locuciones no soportadas aún") -- REVISAR local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") a = a or subarg b = b or "+" local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end local cb = adj_decl[typ] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) local formas_ = {} -- necesario crear otro arreglo para no modificar las claves durante la iteración for form,arr in pairs(data.forms) do local pref = match(form, "^(.*)_m$") if pref and not data.forms[pref.."_f"] then formas_[pref.."_f"] = deep_copy(arr) end if pref and not data.forms[pref.."_n"] then formas_[pref.."_n"] = deep_copy(arr) end formas_[form] = arr end data.forms = formas_ if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, adj_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local m = find(args["gen"], "m") local fem = find(args["gen"], "f") local n = find(args["gen"], "n") local forms = sobreescribir_formas(declinfo, args, false, {}, adj_lb) comprobar_defectivo(forms) forms = desactivar_formas(forms, function (form) return (form:find("pl") and nopl) or (form:find("sg") and nosg) or (form:find("m$") and not m) or (form:find("f$") and not fem) or (form:find("n$") and not n) end ) local raiz_m = f(forms["nom_sg_m"][1] or forms["nom_pl_m"][1] or "?") local raiz_f = f(forms["nom_sg_f"][1] or forms["nom_pl_f"][1] or "?") local raiz_n = f(forms["nom_sg_n"][1] or forms["nom_pl_n"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, adj_lb) local t = {} insert(t, {{"Singular", colspan=4}, header=true, color=COLOR_H}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg_m"], forms["nom_sg_f"], forms["nom_sg_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg_m"], forms["gen_sg_f"], forms["gen_sg_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg_m"], forms["dat_sg_f"], forms["dat_sg_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg_m"], forms["acc_sg_f"], forms["acc_sg_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg_m"], forms["abl_sg_f"], forms["abl_sg_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg_m"], forms["voc_sg_f"], forms["voc_sg_n"]}) insert(t, {{"Plural", colspan=4, header=true, color=COLOR_H}}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_pl_m"], forms["nom_pl_f"], forms["nom_pl_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_pl_m"], forms["gen_pl_f"], forms["gen_pl_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_pl_m"], forms["dat_pl_f"], forms["dat_pl_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_pl_m"], forms["acc_pl_f"], forms["acc_pl_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_pl_m"], forms["abl_pl_f"], forms["abl_pl_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_pl_m"], forms["voc_pl_f"], forms["voc_pl_n"]}) insert(t, {{args["nota"] or "", colspan=4}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_m..", "..raiz_f..", "..raiz_n.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local EGO, TU, IS, NOS, VOS, EI = 1, 2, 3, 4, 5, 6 local tostr = {"1", "2", "3", "4", "5", "6"} local PRONOMBRES = {"ego", "tū", "is, ea, id", "nōs", "vōs", "eī, eae, ea"} local PRONOMBRES_SUBJ = {"ut ego", "ut tū", "ut is, ut ea, ut id", "ut nōs", "ut vōs", "ut eī, ut eae, ut ea"} local PRONOMBRES_IMP = {"―", "(tū)", "(is, ea, id)", "―", "(vōs)", "(eī, eae, ea)"} local IMPERSONALES = {"", "", "(id)", "", "", ""} local function obtener_pronombre(forma, impers) local conj, p = match(forma, "^(.*)(%d)$") if not p then return nil end p = tonumber(p) if impers then return IMPERSONALES[p] else if find(conj, "^subj") then return PRONOMBRES_SUBJ[p] end if find(conj, "^imper") then return PRONOMBRES_IMP[p] end return PRONOMBRES[p] end end local sufijos = { ["1"] = { inf_act = {"āre","isse"}, inf_pas = {"ārī"}, part_act = {"āns","ūrus"}, part_pas = {"andus","us"}, ger = {"andī","andō","andum"}, sup = {"um","ū"}, ind_pres = {"ō","ās","at","āmus","ātis","ant"}, ind_imp = {"ābam","ābās","ābat","ābāmus","ābātis","ābant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ābō","ābis","ābit","ābimus","ābitis","ābunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","āris","ātur","āmur","āminī","antur", nil,"āre"}, ind_imp_pas = {"ābar","ābāris","ābātur","ābāmur","ābāminī","ābantur", nil,"ābāre"}, ind_fut_pas = {"ābor","āberis","ābitur","ābimur","ābiminī","ābuntur", nil,"ābere"}, subj_pres = {"em","ēs","et","ēmus","ētis","ent"}, subj_imp = {"ārem","ārēs","āret","ārēmus","ārētis","ārent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"er","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_imp_pas = {"ārer","ārēris","ārētur","ārēmur","ārēminī","ārentur", nil,"ārēre"}, imper_pres = {nil,"ā",nil,nil,"āte",nil}, imper_fut = {nil,"ātō","ātō",nil,"ātōte","antō"}, imper_pres_pas = {nil,"āre",nil,nil,"āminī",nil}, imper_fut_pas = {nil,"ātor","ātor",nil,nil,"antor"}, }, ["2"] = { inf_act = {"ēre","isse"}, inf_pas = {"ērī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"eō","ēs","et","ēmus","ētis","ent"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ēbō","ēbis","ēbit","ēbimus","ēbitis","ēbunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"eor","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ēbor","ēberis","ēbitur","ēbimur","ēbiminī","ēbuntur", nil,"ēbere"}, subj_pres = {"eam","eās","eat","eāmus","eātis","eant"}, subj_imp = {"ērem","ērēs","ēret","ērēmus","ērētis","ērent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ear","eāris","eātur","eāmur","eāminī","eantur", nil,"eāre"}, subj_imp_pas = {"ērer","ērēris","ērētur","ērēmur","ērēminī","ērentur", nil,"ērēre"}, imper_pres = {nil,"ē",nil,nil,"ēte",nil}, imper_fut = {nil,"ētō","ētō",nil,"ētōte","entō"}, imper_pres_pas = {nil,"ēre",nil,nil,"ēminī",nil}, imper_fut_pas = {nil,"ētor","ētor",nil,nil,"entor"}, }, ["3"] = { -- 3 (comparar [[capio]] con [[lego]], las raíces con capi- y leg- pero hay que eliminar la doble ii) inf_act = {"ere","isse"}, inf_pas = {"ī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", nil,"ere"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_pres = {"am","ās","at","āmus","ātis","ant"}, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", nil,"āre"}, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", nil,"erēre"}, imper_pres = {nil,"e",nil,nil,"ite",nil}, imper_fut = {nil,"itō","itō",nil,"itōte","untō"}, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil}, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor"}, }, ["3/4"] = { inf_act = {"ere","isse","īre","isse"}, inf_pas = {"ī","īrī"}, part_act = {"ēns","iēns","ūrus"}, part_pas = {"endus","iendus","us"}, ger = {"endī","endō","endum","iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt", "iō","īs",nil,"īmus","ītis","iunt" }, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant", "iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant" }, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent", "iam","iēs","iet","iēmus","iētis","ient" }, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", "ior","ere","ītur","īmur","īminī","iuntur", nil,"īris",nil,nil,nil,nil, nil,"īre" }, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", "iēbar","ēbāre","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāris",nil,nil,nil,nil, nil,"iēbāre" }, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", "iar","ēre","iētur","iēmur","iēminī","ientur", nil,"iēris",nil,nil,nil,nil, nil,"iēre" }, subj_pres = {"am","ās","at","āmus","ātis","ant", "iam","iās","iat","iāmus","iātis","iant", }, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent", "īrem","īrēs","īret","īrēmus","īrētis","īrent" }, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", "iar","āre","iātur","iāmur","iāminī","iantur", nil,"iāris",nil,nil,nil,nil, nil,"iāre" }, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", "īrer","erēre","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēris",nil,nil,nil,nil, nil,"īrēre" }, imper_pres = {nil,"e",nil,nil,"ite",nil, nil,"ī",nil,nil,"īte",nil }, imper_fut = {nil,"itō","itō",nil,"itōte","untō", nil,"ītō","ītō",nil,"ītōte","iuntō" }, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil, nil,"īre",nil,nil,"īminī",nil }, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor", nil,"ītor","ītor",nil,nil,"iuntor" }, }, ["4"] = { inf_act = {"īre","isse"}, inf_pas = {"īrī"}, part_act = {"iēns","ūrus"}, part_pas = {"iendus","us"}, ger = {"iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"iō","īs","it","īmus","ītis","iunt"}, ind_imp = {"iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"iam","iēs","iet","iēmus","iētis","ient"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"ior","īris","ītur","īmur","īminī","iuntur", nil,"īre"}, ind_imp_pas = {"iēbar","iēbāris","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāre"}, ind_fut_pas = {"iar","iēris","iētur","iēmur","iēminī","ientur", nil,"iēre"}, subj_pres = {"iam","iās","iat","iāmus","iātis","iant"}, subj_imp = {"īrem","īrēs","īret","īrēmus","īrētis","īrent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"iar","iāris","iātur","iāmur","iāminī","iantur", nil,"iāre"}, subj_imp_pas = {"īrer","īrēris","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēre"}, imper_pres = {nil,"ī",nil,nil,"īte",nil}, imper_fut = {nil,"ītō","ītō",nil,"ītōte","iuntō"}, imper_pres_pas = {nil,"īre",nil,nil,"īminī",nil}, imper_fut_pas = {nil,"ītor","ītor",nil,nil,"iuntor"}, } } local formas_no_personales = { inf_act = true, inf_pas = true, part_act = true, part_pas = true, ger = true, sup = true, } local formas_personales = { ind_pres = true, ind_imp = true, ind_perf = true, ind_pluperf = true, ind_fut = true, ind_fut_perf = true, ind_fut_sig = true, ind_pres_pas = true, ind_imp_pas = true, ind_fut_pas = true, subj_pres = true, subj_imp = true, subj_perf = true, subj_pluperf = true, subj_aor_sig = true, subj_pres_pas = true, subj_imp_pas = true, imper_pres = true, imper_fut = true, imper_pres_pas = true, imper_fut_pas = true, } local formas = merge(formas_no_personales, formas_personales) local verbos_irregulares = { {"aiō", {"aiō", "aiiō", "aijō", "ajō"}, { desactivar = {"inf_pas","part_pas","ger","sup","ind_pluperf","ind_fut","ind_fut_perf", "ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_perf","subj_pluperf","subj_pres_pas", "subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {"ai"}, nucleoperf = {"a"}, nucleosup = {}, nucleosigm = {}, inf_act = {"aiere"}, ind_pres = {nil,nil,nil,{}}, ind_perf = {{},nil,nil,{},{}}, subj_pres = {nil,nil,nil,{},{}}, subj_imp = {{},{},nil,{},{},{}}, imper_pres = {{},{"ai"},{},{},{},{}}, }}, {"cedo", {"cedo"}, { desactivar = {"inf_act","inf_pas","part_act","part_pas","ger","sup","ind_pluperf","ind_pres","ind_imp","ind_perf", "ind_fut","ind_fut_perf","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres","subj_imp","subj_perf", "subj_pluperf","subj_pres_pas","subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, imper_pres = {nil,{"cedo"},nil,nil,{"cette","cedile"},nil}, }}, {"dīcō", {"dīcō"}, { conj = "3", nucleopres = {"dīc"}, nucleoperf = {"dīx"}, nucleosup = {"dict"}, nucleosigm = {"dīx"}, desactivar = {}, part_pas = {"dīcendus", "dīcundus", "dictus"}, imper_pres = {nil, {"dīc", "dīce"}}, inf_pas = {"dīcī", "dīcier{L}"}, }}, {"dō", {"dō"}, { conj = "1", nucleopres = {"d"}, nucleoperf = {"ded"}, nucleosup = {"dat"}, nucleosigm = {}, desactivar = {}, inf_act = {"dare","dedisse"}, inf_pas = {"darī"}, ind_pres = {nil,nil,nil,{"damus"},{"datis"},nil}, ind_imp = {{"dabam"},{"dabās"},{"dabat"},{"dabāmus"},{"dabātis"},{"dabant"}}, ind_fut = {{"dabō"},{"dabis"},{"dabit"},{"dabimus"},{"dabitis"},{"dabunt"}}, ind_imp_pas = {{"dabar"},{"dabāris","dabāre"},{"dabātur"},{"dabāmur"},{"dabāminī"},{"dabantur"}}, ind_fut_pas = {{"dabor"},{"daberis","dabere"},{"dabitur"},{"dabimur"},{"dabiminī"},{"dabuntur"}}, subj_imp = {{"darem"},{"darēs"},{"daret"},{"darēmus"},{"darētis"},{"darent"}}, subj_imp_pas = {{"darer"},{"darēris","darēre"},{"darētur"},{"darēmur"},{"darēminī"},{"darentur"}}, imper_pres = {nil,nil,nil,nil,{"date"},nil}, imper_fut = {nil,{"datō"},{"datō"},nil,{"datōte"},{"dantō"}}, imper_pres_pas = {nil,{"dare"},nil,nil,{"daminī"},nil}, imper_fut_pas = {nil,{"dator"},{"dator"},nil,nil,{"dator"}}, }}, {"dūcō", {"dūcō"}, { conj = "3", nucleopres = {"dūc"}, nucleoperf = {"dūx"}, nucleosup = {"duct"}, nucleosigm = {}, desactivar = {}, imper_pres = {nil, {"dūc", "dūce"}}, }}, {"edō", {"edō", "ëdō"}, { conj = "3", nucleopres = {"ed"}, nucleoperf = {"ed"}, nucleosup = {""}, nucleosigm = {}, desactivar = {}, inf_act = {"edere","ēsse"}, part_act = {"edēns","ēsūrus","ēssūrus","ēstūrus"}, part_pas = {"edendus","edundus","ēsus","ēssus","ēstus"}, sup = {"ēsum","ēssum","ēstum","ēsū","ēssū","ēstū"}, ind_pres = {nil,{"edis","ēs"},{"edit","ēst"},nil,{"editis","ēstis"},nil}, ind_pres_pas = {nil,{"ederis","edere","ēssis","ēsse"},{"editur","ēstur"}}, subj_pres = {{"edam","edim"},{"edās","edīs"},{"edat","edit","ēst"},{"edāmus","edīmus"},{"edātis","edītis"},{"edant","edint"}}, subj_imp = {{"ederem","ēssem"},{"ederēs","ēssēs"},{"ederet","ēsset"},{"ederēmus","ēssēmus"},{"ederētis","ēssētis"},{"ederent","ēssent"}}, subj_imp_pas = {{"ederer","ēsser"},{"ederēris","ederēre","ēssēris","ēssēre"},{"ederetur","ēssetur"},{"ederēmur","ēssēmur"},{"ederēminī","ēssēminī"},{"ederentur","ēssentur"}}, imper_pres = {nil,{"ede","ēs"},nil,nil,{"edite","ēste"},nil}, imper_fut = {nil,{"editō","ēstō"},{"editō","ēstō"},nil,{"editōte","ēstōte"},{"eduntō"}}, imper_pres_pas = {nil,{"edere","ēsse"},nil,nil,{"ediminī"},nil}, imper_fut_pas = {nil,{"editor","ēstor"},{"editor","ēstor"},nil,nil,{"eduntor"}}, }}, {"eō", {"eō", "ëō"}, { conj = "4", nucleopres = {""}, nucleoperf = {""}, nucleosup = {""}, nucleosigm = {}, desactivar = {"imper_pres_pas"}, inf_act = {"īre","īsse","iisse","īvisse"}, inf_pas = {"īrī","īrier"}, part_act = {"iēns","itūrus"}, part_pas = {"eundum","itum"}, ger = {"eundī","eundō","eundum"}, sup = {"itum","itū"}, ind_pres = {{"eō"},{"īs"},{"it"},{"īmus"},{"ītis"},{"eunt"}}, ind_imp = {{"ībam"},{"ībās"},{"ībat"},{"ībāmus"},{"ībātis"},{"ībant"}}, ind_perf = {{"iī","īvī"},{"īstī","iistī","īvistī"},{"iit","īvit"},{"iimus","īvimus"},{"īstis","iistis","īvistis"},{"iērunt","iēre","īvērunt","īvēre"}}, ind_pluperf = {{"ieram","īveram"},{"ierās","īverās"},{"ierat","īverat"},{"ierāmus","īverāmus"},{"ierātis","īverātis"},{"ierant","īverant"}}, ind_fut = {{"ībō"},{"ībis"},{"ībit"},{"ībimus"},{"ībitis"},{"ībunt"}}, ind_fut_perf = {{"ierō","īverō"},{"ieris","īveris"},{"ierit","īverit"},{"ierimus","īverimus"},{"ieritis","īveritis"},{"ierint","īverint"}}, ind_fut_sig = {nil,nil,nil,nil,nil,nil}, ind_pres_pas = {{},{},{"ītur"},{},{},{}}, ind_imp_pas = {{},{},{"ībātur"},{},{},{}}, ind_fut_pas = {{},{},{"ībitur"},{},{},{}}, subj_pres = {{"eam"},{"eās"},{"eat"},{"eāmus"},{"eātis"},{"eant"}}, subj_imp = {{"īrem"},{"īrēs"},{"īret"},{"īrēmus"},{"īrētis"},{"īrent"}}, subj_perf = {{"ierim","īverim"},{"ierīs","īverīs"},{"ierit","īverit"},{"ierīmus","īverīmus"},{"ierītis","īverītis"},{"ierint","īverint"}}, subj_pluperf = {{"īssem","iissem","īvissem"},{"īssēs","iissēs","īvissēs"},{"īsset","iisset","īvisset"},{"īssēmus","iissēmus","īvissēmus"},{"īssētis","iissētis","īvissētis"},{"īssent","iissent","īvissent"}}, subj_aor_sig = {nil,nil,nil,nil,nil,nil}, subj_pres_pas = {{},{},{"eātur"},{},{},{}}, subj_imp_pas = {{},{},{"īrētur"},{},{},{}}, imper_pres = {nil,nil,nil,nil,nil,nil}, imper_fut = {nil,nil,nil,nil,nil,{"euntō"}}, imper_fut_pas = {nil,{},nil,nil,nil,{}}, }}, {"faciō", {"faciō"}, { conj = "3", I = true, inf_act = {"facere", "fāre{L}", "fēcisse"}, inf_pas = {"fierī"}, part_pas = {"faciendus", "faciundus", "factus"}, nucleopres = {"fac"}, nucleoperf = {"fēc"}, nucleosup = {"fact"}, nucleosigm = {"fax","faxs","facs"}, desactivar = {}, ind_pres_pas = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, ind_imp_pas = {{"fīēbam"},{"fīēbās"},{"fīēbat"},{"fīēbāmus"},{"fīēbātis"},{"fīēbant"}}, ind_fut_pas = {{"fīam"},{"fīēs"},{"fīet"},{"fīēmus"},{"fīētis"},{"fīent"}}, subj_pres_pas = {{"fīam"},{"fīās"},{"fīat"},{"fīāmus"},{"fīātis"},{"fīant"}}, subj_imp_pas = {{"fierem"},{"fierēs"},{"fieret"},{"fierēmus"},{"fierētis"},{"fierent"}}, imper_pres = {nil,{"fac","face"},nil,nil,nil,nil}, imper_pres_pas = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut_pas = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"ferō", {"ferō"}, { conj = "3", nucleopres = {"fer"}, nucleoperf = {"tul", "tetul{†}"}, nucleosup = {"lāt"}, nucleosigm = {}, desactivar = {}, inf_act = {"ferre", "tulisse", "tetulisse{†}"}, inf_pas = {"ferrī"}, ind_pres = {nil,{"fers"},{"fert"},nil,{"fertis"}}, ind_pres_pas = {nil,{"ferris","ferre"}}, subj_imp = {{"ferrem"},{"ferrēs"},{"ferret"},{"ferrēmus"},{"ferrētis"},{"ferrent"}}, subj_imp_pas = {{"ferrer"},{"ferrēris","ferrēre"},{"ferrētur"},{"ferrēmur"},{"ferrēminī"},{"ferrentur"}}, imper_pres = {nil,{"fer"},nil,nil,{"ferte"},nil}, imper_pres_pas = {nil,{"ferre"},nil,nil,nil,nil}, imper_fut = {nil,{"fertō"},{"fertō"},nil,{"fertōte"},{"feruntō"}}, imper_fut_pas = {nil,{"fertor"},{"fertor"},nil,nil,nil}, }}, {"fīō", {"fīō"}, { conj = "3", nucleopres = {"fī"}, nucleoperf = {}, nucleosup = {"fact"}, nucleosigm = {}, semidep = true, desactivar = {}, inf_act = {"fierī"}, ind_pres = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, imper_pres = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"inquam", {"inquam"}, { conj = "3", nucleopres = {"inqui"}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, nopasivo = true, desactivar = {"inf_act","inf_pas","part_pas","ger"}, ind_pres = {{"inquam"}}, }}, {"possum", {"possum"}, { conj = "3", nucleopres = {"pot"}, nucleoperf = {"pot"}, nucleosup = {}, nucleosigm = {}, pres = "possō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"posse","potesse{†}"}, part_act = {"potēns"}, ind_pres = {{"possum"},{"potes"},{"potest"},{"possumus"},{"potestis"},{"possunt"}}, ind_imp = {{"poteram"},{"poterās"},{"poterat"},{"poterāmus"},{"poterātis"},{"poterant"}}, ind_fut = {{"poterō"},{"poteris","potere"},{"poterit"},{"poterimus"},{"poteritis"},{"poterunt"}}, ind_perf = {{"potuī"},{"potuistī"},{"potuit"},{"potuimus"},{"potuistis"},{"potuērunt","potuēre"}}, ind_pluperf = {{"potueram"},{"potuerās"},{"potuerat"},{"potuerāmus"},{"potuerātis"},{"potuerant"}}, ind_fut_perf = {{"potuerō"},{"potueris"},{"potuerit"},{"potuerimus"},{"potueritis"},{"potuerunt"}}, subj_pres = {{"possem"},{"possēs"},{"possēt"},{"possēmus"},{"possētis"},{"possent"}}, subj_imp = {{"possim"},{"possīs"},{"possit"},{"possīmus"},{"possītis"},{"possint"}}, subj_perf = {{"potuerim"},{"potuerīs"},{"potuerit"},{"potuerīmus"},{"potuerītis"},{"potuerint"}}, subj_pluperf = {{"potuissem"},{"potuissēs"},{"potuisset"},{"potuissēmus"},{"potuissētis"},{"potuissent"}}, }}, {"sum", {"sum"}, { conj = "3", nucleopres = {"s"}, nucleoperf = {"fu"}, nucleosup = {}, nucleosigm = {}, pres = "sō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres_pas","imper_fut_pas"}, inf_act = {"esse"}, part_act = {"futūrus"}, ind_pres = {{"sum"},{"es"},{"est"},{"sumus"},{"estis"},{"sunt"}}, ind_imp = {{"eram"},{"erās"},{"erat"},{"erāmus"},{"erātis"},{"erant"}}, ind_fut = {{"erō"},{"eris","ere"},{"erit"},{"erimus"},{"eritis"},{"erunt"}}, subj_pres = {{"sim","siem","fuam{†}"},{"sīs","siēs","fuās{†}"},{"sit","siet","fuat{†}"},{"sīmus","siēmus","fuāmus{†}"},{"sītis","siētis","fuātis{†}"},{"sint","sient","fuant{†}"}}, subj_imp = {{"essem","forem"},{"essēs","forēs"},{"esset","foret"},{"essēmus","forēmus"},{"essētis","forētis"},{"essent","forent"}}, imper_pres = {nil,{"es"},nil,nil,{"este"},nil}, imper_fut = {nil,{"estō"},{"estō"},nil,{"estōte"},nil}, }}, {"mālō", {"mālō"}, { conj = "3", nucleopres = {"māl"}, nucleoperf = {"mālu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"mālle","māluisse"}, ind_pres = {{"mālō"},{"māvīs"},{"māvult"},{"mālumus"},{"māvultis"},{"mālunt"}}, subj_pres = {{"mālim"},{"mālīs"},{"mālit"},{"mālīmus"},{"mālītis"},{"mālint"}}, subj_imp = {{"māllem"},{"māllēs"},{"māllet"},{"māllēmus"},{"māllētis"},{"māllent"}}, }}, {"nōlō", {"nōlō"}, { conj = "3", nucleopres = {"nōl"}, nucleoperf = {"nōlu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"nōlle","nōluisse"}, ind_pres = {{"nōlō"},{"nōn vīs","nevīs{†}"},{"nōn vult","nōn volt","nevolt{†}"},{"nōlumus"},{"nōn vultis","nōn voltis","nōltis{†}"},{"nōlunt"}}, subj_pres = {{"nōlim"},{"nōlīs"},{"nōlit"},{"nōlīmus"},{"nōlītis"},{"nōlint"}}, subj_imp = {{"nōllem"},{"nōllēs"},{"nōllet"},{"nōllēmus"},{"nōllētis"},{"nōllent"}}, }}, {"volō", {"volō"}, { conj = "3", nucleopres = {"vol"}, nucleoperf = {"volu"}, nucleosup = {"volit"}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"velle","voluisse"}, ind_pres = {{"volō"},{"vīs"},{"vult","volt{†}"},{"volumus"},{"vultis","voltis{†}"},{"volunt"}}, subj_pres = {{"velim","volim{†}"},{"velīs","volīs{†}"},{"velit","volit{†}"},{"velīmus","volīmus{†}"},{"velītis","volītis{†}"},{"velint","volint{†}"}}, subj_imp = {{"vellem"},{"vellēs"},{"vellet"},{"vellēmus"},{"vellētis"},{"vellent"}}, }}, } local function combinar_prefijo_nucleosufijo(prefijo, nucleosufijo) return prefijo..nucleosufijo end local function combinar_nucleo_sufijo(nucleo, sufijo, agregar_i) if agregar_i and (not find(sufijo, "^[iī]")) and (sufijo ~= "e") and (not find(sufijo, "^er")) then return nucleo.."~i~"..sufijo end return nucleo..sufijo end local function agregar_forma(conjugado, conjinfo, forma) conjinfo[forma] = conjinfo[forma] or {} local sufijos_ = sufijos[conjinfo.conj][forma] local nucleos local prefijo if forma == "sup" then nucleos = conjinfo.nucleosup prefijo = conjinfo.prefijosup or conjinfo.prefijo elseif find(forma, "sig") then nucleos = conjinfo.nucleosigm prefijo = conjinfo.prefijosigm or conjinfo.prefijo elseif find(forma, "perf") then nucleos = conjinfo.nucleoperf prefijo = conjinfo.prefijoperf or conjinfo.prefijo else nucleos = conjinfo.nucleopres prefijo = conjinfo.prefijo end if formas_no_personales[forma] then if conjinfo[forma][1] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma]) do insert_if_not(conjugado[forma], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else for _, sufijo in ipairs(sufijos_) do local nucleos_ = nucleos if forma == "inf_act" and sufijo == "isse" then nucleos_ = conjinfo.nucleoperf elseif forma == "part_act" and sufijo == "ūrus" then nucleos_ = conjinfo.nucleosup elseif forma == "part_pas" and sufijo == "us" then nucleos_ = conjinfo.nucleosup end local agregar_i = conjinfo.I and nucleos_ == conjinfo.nucleopres for _,nucleo in ipairs(nucleos_) do insert_if_not(conjugado[forma], combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(nucleo, sufijo, agregar_i))) end end end return end for i = EGO, EI do local p = tostr[i] if conjinfo[forma][i] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma][i]) do insert_if_not(conjugado[forma..p], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else local k = i while sufijos_[k] do local agregar_i = conjinfo.I and nucleos == conjinfo.nucleopres for j, n in ipairs(nucleos) do local x = combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(n, sufijos_[k], agregar_i)) if conjinfo.always_sync_perf and (forma == "ind_perf" or forma == "ind_pluperf" or forma == "ind_fut_perf" or forma == "subj_perf" or forma == "subj_pluperf") then x = x:gsub("īvī", "iī") x = x:gsub("īvi", "ī") x = x:gsub("īve", "ī") x = x:gsub("īvē", "ē") end insert_if_not(conjugado[forma..p], x) end k = k + 6 end end end end local function get_subtype_by_ending(pres, conjinfo, specs) for _, spec in ipairs(specs) do local base = extract_base(pres, spec[1]) if base then for _,s in ipairs(spec[2]) do if conjinfo[s] == nil then conjinfo[s] = true end end return base end end error("Unrecognized ending for conjugation " .. conjinfo["conj"]) end local function detect_v_type_and_subtypes(conjinfo) local pres = conjinfo["v"] local conj_arg = conjinfo["conj"] pres = toNFC(pres) local base_conj_arg, auto_perf_supine = conj_arg:match("^([124]/?4?)(%+%+?)$") if base_conj_arg then if auto_perf_supine == "++" and base_conj_arg ~= "4" then error("Conjugation types 1++ and 2++ not allowed") end conj_arg = base_conj_arg end conjinfo.conj = conj_arg if conj_arg == "1" then local base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"at", {"impers"}}, {"ātur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "āv" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "āt" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "āss" end end elseif conj_arg == "2" then local base = get_subtype_by_ending(pres, conjinfo, { {"eō", {}}, {"eor", {"dep"}}, {"et", {"impers"}}, {"ētur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "u" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "it" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3" then local base if conjinfo.I == false then -- si explícitamente se indicó que no es del tipo -io, hay que excluir sufijos base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) else base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) end if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end assert(conjinfo["nucleoperf"][1], "especifique todos los núcleos para verbos de la tercera conjugación") assert(conjinfo["nucleosup"][1], "especifique todos los núcleos para verbos de la tercera conjugación") if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3/4" then local base base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "4" then local base = get_subtype_by_ending(pres, conjinfo, { {"iō", {}}, {"ior", {"dep"}}, {"it", {"impers"}}, {"ītur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "irreg" then for _,p in ipairs(verbos_irregulares) do for _,rx in ipairs(p[2]) do local pref, verb = match(conjinfo.v, "^(.*)("..rx..")$") if verb then conjinfo.v = verb conjinfo.prefijo = pref if conjinfo.nucleoperf[1] and conjinfo.nucleoperf[1] ~= "-" then -- [[ecfero]] conjinfo.prefijoperf = conjinfo.nucleoperf[1] conjinfo.nucleoperf = {} end if conjinfo.nucleosup[1] and conjinfo.nucleosup[1] ~= "-" then conjinfo.prefijosup = conjinfo.nucleosup[1] conjinfo.nucleosup = {} end if conjinfo.nucleosigm[1] and conjinfo.nucleosigm[1] ~= "-" then conjinfo.prefijosigm = conjinfo.nucleosigm[1] conjinfo.nucleosigm = {} end conjinfo.irreg = true conjinfo.conj = p[3].conj for k,val in pairs(p[3]) do if not conjinfo[k] or (type(conjinfo[k]) == "table" and not conjinfo[k][1]) then conjinfo[k] = deep_copy(val) end end return conjinfo end end end error("Unrecognized conjugation '" .. conj_arg .. "'") else error("Unrecognized conjugation '" .. conj_arg .. "'") end return conjinfo end function export.v(frame) local title_ = mw.title.getCurrentTitle() local tit = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {alias_de = "conj"}, [2] = {alias_de = "pres"}, [3] = {alias_de = "nucleoperf"}, [4] = {alias_de = "nucleosup"}, [5] = {alias_de = "nucleosigm"}, ["impers"] = {}, -- pas para formas pasivas solamente ["impersonal"] = {alias_de = "impers"}, ["dep"] = {tipo="bool"}, ["depon"] = {alias_de="dep"}, ["deponente"] = {alias_de="dep"}, ["semidep"] = {tipo="bool"}, ["semidepon"] = {alias_de="semidep"}, ["semideponente"] = {alias_de="semidep"}, ["sigm"] = {tipo="bool"}, ["nopasivo"] = {tipo="bool"}, ["soloperf"] = {tipo="bool"}, ["I"] = {tipo="bool"}, ["p3inf"] = {tipo="bool"}, -- sin uso ["poet_sync_perf"] = {tipo="bool"}, -- sin uso ["always_sync_perf"] = {tipo="bool"}, -- solo en [[saevio]] ["conj"] = {requerido=true}, ["pres"] = {requerido=true}, ["nucleopres"] = {lista = true}, ["nucleoperf"] = {lista = true}, ["nucleosup"] = {lista = true}, ["nucleosigm"] = {lista = true}, ["núcleopres"] = {alias_de="nucleopres"}, ["núcleoperf"] = {alias_de="nucleoperf"}, ["núcleosup"] = {alias_de="nucleosup"}, ["paradigma"] = {lista = true}, ["desactivarnucleos"] = {tipo="bool", por_defecto=true}, -- para [[-o]] ["nota"] = {}, } local conjugado = {} for forma,_ in pairs(formas_no_personales) do params[forma] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma] = {} end for forma,_ in pairs(formas_personales) do for i,s in ipairs(tostr) do params[forma..s] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma..s] = {} if i == 1 then params[forma] = {alias_de=forma..s} end end end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) assert(not find(tit, " "), "locuciones no soportadas aún") assert(not (args["dep"] and args["semidep"]), "un verbo no puede ser deponente y semideponente a la vez") local conjinfo = { conj = args.conj, prefijo="", v=args.pres, desactivar = {}, dep=args.dep, semidep=args.semidep, sigm=args.sigm, impers=args.impers, nopasivo=args.nopasivo, soloperf=args.soloperf, I=args.I, p3inf=args.p3inf, poet_sync_perf=args.poet_sync_perf, -- sin uso always_sync_perf=args.always_sync_perf, nucleopres = deep_copy(args.nucleopres), nucleoperf = deep_copy(args.nucleoperf), nucleosup = deep_copy(args.nucleosup), nucleosigm = deep_copy(args.nucleosigm) } conjinfo = detect_v_type_and_subtypes(conjinfo) conjinfo.conj = conjinfo.conj if conjinfo.impers == true then conjinfo.impers = "3" end -- no puede ir conjinfo acá abajo porque si es un sufijo va a quedar "-" en la raíz, lo que anularía todas las formas conjugadas, tiene que venir directo de args if args.desactivarnucleos then if args.nucleopres[1] == "-" then conjinfo.nucleopres = {} end if args.nucleoperf[1] == "-" then conjinfo.nucleoperf = {} end if args.nucleosup[1] == "-" then conjinfo.nucleosup = {} end if args.nucleosigm[1] == "-" then conjinfo.nucleosigm = {} end end local es_irregular = conjinfo.irreg for _,d in ipairs(conjinfo.desactivar) do if formas_no_personales[d] then args[d] = {"no"} else args[d.."2"] = {"no"} end end for forma,_ in pairs(formas) do agregar_forma(conjugado, conjinfo, forma) end local resultante = sobreescribir_formas(conjugado, args) local mostrar_fut_sig = #resultante["ind_fut_sig1"] > 0 local mostrar_aor_sig = #resultante["subj_aor_sig1"] > 0 local defectivo = comprobar_defectivo(resultante, {"^imper", "_sig"}, tostr) local defect2 resultante, defect2 = desactivar_formas(resultante, function (form) return (conjinfo.nopasivo and form:find("_pas")) or (conjinfo.soloperf and not form:find("perf")) or (conjinfo.impers == "pas" and form:find("_pas[^3]")) or (conjinfo.impers == "pas3" and form:find("_pas[^3]")) or (conjinfo.impers == "pas36" and form:find("_pas[^36]")) end ) if defect2 then defectivo = true end -- por ahora innecesario -- local part_no_adj = {} -- for _,e in ipairs(resultante.part) do -- if (find(e, 'PART') or not find(e, 'ADJ')) and not find(e, "†") then -- insert(part_no_adj, gsub1(e, '%b{}', '')) -- end -- end local tit_pres = f(resultante["ind_pres1"][1] or "―") local tit_inf = f(resultante["inf_act"][1] or "―") local tit_perf = f(resultante["ind_perf1"][1] or "―") local tit_sup = f(resultante["sup"][1] or "―") resultante = agregar_enlaces(resultante, tit, normalizar_enlace) local es_impersonal = conjinfo.impers resultante = formatear_formas(resultante, function (x) return obtener_pronombre(x, es_impersonal) end) local impers = conjinfo.impers local cs, cs1, cs2, fila_pronombres_ind, fila_pronombres_subj, fila_pronombres_imper, mostrar_imper if impers == "3" then fila_pronombres_ind = {"", "(id)", color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", "(quod id)", color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", "(id)", color=COLOR_IMPER, header=true, class="pc"} cs = 2 elseif impers == "36" then error("no soportado actualmente") cs = 3 else fila_pronombres_ind = {"", PRONOMBRES[1], PRONOMBRES[2], PRONOMBRES[3], PRONOMBRES[4], PRONOMBRES[5], PRONOMBRES[6], color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", PRONOMBRES_SUBJ[1], PRONOMBRES_SUBJ[2], PRONOMBRES_SUBJ[3], PRONOMBRES_SUBJ[4], PRONOMBRES_SUBJ[5], PRONOMBRES_SUBJ[6], color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", PRONOMBRES_IMP[1], PRONOMBRES_IMP[2], PRONOMBRES_IMP[3], PRONOMBRES_IMP[4], PRONOMBRES_IMP[5], PRONOMBRES_IMP[6], color=COLOR_IMPER, header=true, class="pc"} cs = 7 mostrar_imper = true end cs1 = cs -- math.floor(cs / 2) -- cs2 = cs - cs1 local t = {} insert(t, {{"Formas no personales (verboides)", colspan=cs}, color=COLOR_H, header=true}) if impers == "3" then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else resultante.inf_act.colspan = cs1-1 resultante.inf_pas.colspan = cs1-1 resultante.part_act.colspan = cs1-1 resultante.part_pas.colspan = cs1-1 resultante.ger.colspan = cs1-1 resultante.sup.colspan = cs1-1 if conjinfo.dep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) elseif conjinfo.semidep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) end end local function ic(tiempo) if impers == "3" then return resultante[tiempo.."3"] elseif impers == "36" then return resultante[tiempo.."3"], resultante[tiempo.."6"] end return resultante[tiempo.."1"], resultante[tiempo.."2"], resultante[tiempo.."3"], resultante[tiempo.."4"], resultante[tiempo.."5"], resultante[tiempo.."6"] end insert(t, {{"Formas personales", colspan=cs}, color=COLOR_H, header=true}) insert(t, {{"Modo indicativo", colspan=cs}, color=COLOR_IND, header=true}) insert(t, fila_pronombres_ind) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end else insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) insert(t, {{"Pretérito perfecto", color=COLOR_IND, header=true}, ic("ind_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_IND, header=true}, ic("ind_pluperf")}) insert(t, {{"Futuro perfecto", color=COLOR_IND, header=true}, ic("ind_fut_perf")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) end insert(t, {{"Modo subjuntivo", colspan=cs}, color=COLOR_SUBJ, header=true}) insert(t, fila_pronombres_subj) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end else insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) insert(t, {{"Pretérito perfecto", color=COLOR_SUBJ, header=true}, ic("subj_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_SUBJ, header=true}, ic("subj_pluperf")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) end insert(t, {{"Modo imperativo", colspan=cs}, color=COLOR_IMPER, header=true}) insert(t, fila_pronombres_imper) if mostrar_imper then if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) else insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) insert(t, {{"Presente pasivo", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) end else insert(t, {{"Como verbo "..(impers == "3" and "impersonal" or "terciopersonal")..", ''"..tit.."'' CARECE de imperativo", color=COLOR_IMPER, header=true, colspan=cs}}) end insert(t, {{f("Leyenda: † arcaico, x no normativo, ~■~ cambio ortográfico, #■# irregularidad"), colspan=cs}}) args["nota"] = args["nota"] or "" if conjinfo.impers == "utc3" then args["nota"] = args["nota"].." NOTA: se usa también como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "umc3" then args["nota"] = args["nota"].." NOTA: se usa más como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "utc36" then args["nota"] = args["nota"].." NOTA: se usa también como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "umc36" then args["nota"] = args["nota"].." NOTA: se usa más como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "pas" or conjinfo.imeprs == "pas3" then args["nota"] = args["nota"].." NOTA: impersonal para las formas pasivas" end if conjinfo.impers == "pas36" then args["nota"] = args["nota"].." NOTA: formas pasivas terciopersonales (solamente tercera persona singular y plural)" end if conjinfo.soloperf then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas del perfecto y pluscuamperfecto con valor de presente, imperfecto o futuro" end if conjinfo.nopasivo then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas activas" end insert(t, {{args["nota"] and args["nota"] or "", colspan=cs}}) local cats = {} local subtits = {} local conj_str if conjinfo.conj == "1" then conj_str = "primera conjugación" elseif conjinfo.conj == "2" then conj_str = "segunda conjugación" elseif conjinfo.conj == "3" then conj_str = "tercera conjugación" elseif conjinfo.conj == "3/4" then conj_str = "tercera/cuarta conjugación" else conj_str = "cuarta conjugación" end insert(cats, "LA:Verbos de la "..conj_str) insert(subtits, conj_str) impers = impers or "" if impers == "3" or find(impers, "^u[tm]c3$") then insert(subtits, "impersonal") insert(cats, "LA:Verbos impersonales") end if defectivo then insert(subtits, "defectivo") insert(cats, "LA:Verbos defectivos") end if conjinfo.dep then insert(subtits, "deponente") insert(cats, "LA:Verbos deponentes") end if conjinfo.semidep then insert(subtits, "semideponente") insert(cats, "LA:Verbos semideponentes") end if es_irregular then insert(subtits, "irregular") insert(cats, "LA:Verbos irregulares") else insert(subtits, "regular") insert(cats, "LA:Verbos regulares") end return renderizar_tabla( frame, "'''Conjugación de ''"..tit_pres..", "..tit_inf..", "..tit_perf..", "..tit_sup.."'''''&emsp;&emsp;("..concat(subtits, ", ")..")", t, ns == 0 and cats or {}) end function export.adv(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { ["n"] = {}, ["nota"] = {alias_de = "n"}, ["comp"] = {lista = true}, ["comparativo"] = {alias_de = "comp"}, ["compnota"] = {lista = true}, ["sup"] = {lista = true}, ["superlativo"] = {alias_de = "sup"}, ["supnota"] = {lista = true}, } local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local head = args[1] local modo = args[2] local enc local cats = {} local cat_pref = "LA:Adverbios" if modo == "-" then enc = "sin comparativo ni superlativo" insert(cats, cat_pref.." incomparables") return renderizar_encabezado( frame, head, enc, args["n"], {}, ns == 0 and cats or {}, normalizar_enlace ) end local flex = {comp={},sup={}} local stem for _, suff in ipairs{"iter", "nter", "ter", "er", "iē", "ē", "rā", "im", "ō"} do stem = match(head, "^(.*)" .. suff .. "$") if stem ~= nil then local comp_suff, sup_suff = "ius", "issimē" if suff == "nter" then stem = stem .. "nt" end if suff == "rā" then comp_suff = "er" .. comp_suff sup_suff = "imē" end insert(flex.comp, stem .. comp_suff) insert(flex.sup, stem .. sup_suff) break end end if not stem and not args.comp[1] and not args.sup[1] then error("Unrecognized adverb type, recognized types are “-ē”, “-er”, “-ter”, “-iter”, “-im”, or “-ō”, “-ra” or specify irregular forms or “-” if incomparable.") end local formas, irr = sobreescribir_formas(flex, args) if args["comp"][1] == "no" then enc = "sin comparativo" insert(cats, cat_pref.." sin comparativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) elseif args["sup"][1] == "no" then enc = "sin superlativo" insert(cats, cat_pref.." sin superlativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end if irr then enc = f("#irregular#") insert(cats, cat_pref.." irregulares") end return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}, {"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end return export cb37xy6h7w6t0cd2pxjgjprl5i74gbh 6123511 6123508 2026-07-25T02:06:32Z Tmagc 158167 6123511 Scribunto text/plain -- FLEXIÓN DEL LATÍN -- Adaptado desde en.wikt por Tmagc local export = {} local unpack = unpack or table.unpack local insert = table.insert local concat = table.concat local m_table = require("Módulo:tabla") local keys_to_list = m_table.keysToList local insert_if_not = m_table.insertIfNot local deep_copy = m_table.deepCopy local contains = m_table.contains local merge = m_table.merge local m_str = require("Módulo:string") local u = m_str.char local match = m_str.match local sub = m_str.sub local gsub = m_str.gsub local split = m_str.split local gsplit = m_str.gsplit local find = m_str.find local m_str_avanzado = require("Módulo:string/avanzado") local toNFD = m_str_avanzado.toNFD local toNFC = m_str_avanzado.toNFC local m_flex = require("Módulo:flex") local f = m_flex.f local f_links = m_flex.f_links local parsear_arreglo = m_flex.parsear_arreglo local separar_palabras = m_flex.separar_palabras local combinar_copulativa = m_flex.combinar_copulativa local sobreescribir_formas = m_flex.sobreescribir_formas local desactivar_formas = m_flex.desactivar_formas local agregar_enlaces = m_flex.agregar_enlaces local formatear_formas = m_flex.formatear_formas local comprobar_defectivo = m_flex.comprobar_defectivo local renderizar_tabla = m_flex.renderizar_tabla local renderizar_encabezado = m_flex.renderizar_encabezado local COLOR_H = m_flex.COLOR_H local COLOR_NP = m_flex.COLOR_NP local COLOR_IND = m_flex.COLOR_IND local COLOR_SUBJ = m_flex.COLOR_SUBJ local COLOR_IMPER = m_flex.COLOR_IMPER local MACRON = u(0x304) local BREVE = u(0x306) local DIAER = u(0x308) local DBREVE = u(0x361) local ACCENT = "[" .. MACRON .. BREVE .. DIAER .. DBREVE .. "]" local VOWEL = "[aæeioœuyAÆEIOŒUY]" local cons_to_vowel = { ["j"] = "i", ["J"] = "I", ["v"] = "u", ["V"] = "U", } local function normalizar_enlace(x) x = toNFD(x) x = gsub(x, ACCENT, "") return toNFC(x) end local function join(a, b) a, b = toNFD(a), toNFD(b) -- If the first part ends in "j" or "v", convert it to "i" or "u" unless -- the second part begins with a vowel. if not match(b, "^" .. VOWEL) then a = gsub(a, "[jvJV]$", cons_to_vowel) end return toNFC(a..b) end local function add_form(decl, slot, stem, suf) if type(slot) == "string" then slot = {slot} end for _,slt in ipairs(slot) do if type(decl[slt]) == "nil" or decl[slt] == "" then decl[slt] = {} elseif type(decl[slt]) == "string" then decl[slt] = {decl[slt]} end insert_if_not(decl[slt], join(stem, suf)) end end local function remove_forms(decl, forms) for form,_ in pairs(decl) do for _,rx in ipairs(forms) do if form:find(rx) then forms[form] = {} break end end end end local function merge_forms(forms, forms2, keys) keys = keys or forms2 for key,arr in pairs(keys) do if not forms[key] then forms[key] = {} end if type(forms2[key]) == "string" then insert_if_not(forms[key], forms2[key]) elseif type(forms2[key]) == "table" then for _,a in ipairs(forms2[key]) do insert_if_not(forms[key], a) end end end end local noun_decl = {} noun_decl["0"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = stem forms["dat_sg"] = stem forms["acc_sg"] = stem forms["abl_sg"] = stem forms["voc_sg"] = stem forms["nom_pl"] = stem forms["gen_pl"] = stem forms["dat_pl"] = stem forms["acc_pl"] = stem forms["abl_pl"] = stem forms["voc_pl"] = stem -- with locative if data.loc then forms["loc_sg"] = stem forms["loc_pl"] = stem end end local function alt_gen_pl_in_um(stem, forms, types, subtitles, i_stem) if types.genplum then add_form(forms, "gen_pl", stem, (i_stem and "i" or "") .. "um") elseif types.not_genplum then -- FIXME: not a contraction. -- insert_if_not(subtitles, "uncontracted genitive plural") end end noun_decl["1"] = function(data, args) local forms, types, loc, subtitles = data.forms, data.types, data.loc, data.subtitles local stem = args[1] -- normal 1st local nom_sg = "a" local gen_loc_sg = "ae" local dat_sg = "ae" local acc_sg = "am" local abl_sg = "ā" local voc_sg = "a" local nom_voc_pl = "ae" local gen_pl = "ārum" local dat_abl_loc_pl = "īs" local acc_pl = "ās" insert_if_not(data.title, "primera declinación") insert_if_not(data.categories, "LA:Sustantivos de la primera declinación") -- ām if types.am then nom_sg = "ām" acc_sg = "ām" abl_sg = {"ām", "ā"} voc_sg = "ām" -- all Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") --Greek Ma if types.Ma then nom_sg = "ās" acc_sg = "ān" voc_sg = "ā" -- Greek Me elseif types.Me then nom_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" -- Greek else nom_sg = "ē" gen_loc_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" end end -- ābus if types.abus then dat_abl_loc_pl = "ābus" end add_form(forms, "nom_sg", stem, nom_sg) add_form(forms, "gen_sg", stem, gen_loc_sg) add_form(forms, "dat_sg", stem, dat_sg) add_form(forms, "acc_sg", stem, acc_sg) add_form(forms, "abl_sg", stem, abl_sg) add_form(forms, "voc_sg", stem, voc_sg) add_form(forms, {"nom_pl", "voc_pl"}, stem, nom_voc_pl) add_form(forms, "gen_pl", stem, gen_pl) add_form(forms, {"dat_pl", "abl_pl"}, stem, dat_abl_loc_pl) add_form(forms, "acc_pl", stem, acc_pl) -- with locative if loc then add_form(forms, "loc_sg", stem, gen_loc_sg) add_form(forms, "loc_pl", stem, dat_abl_loc_pl) end end noun_decl["2"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "segunda declinación") insert_if_not(data.categories, "LA:Sustantivos de la segunda declinación") -- normal 2nd forms["nom_sg"] = stem1 .. "us" forms["gen_sg"] = stem1 .. "ī" forms["dat_sg"] = stem1 .. "ō" forms["acc_sg"] = stem1 .. "um" forms["abl_sg"] = stem1 .. "ō" forms["voc_sg"] = stem1 .. "e" forms["nom_pl"] = stem1 .. "ī" forms["gen_pl"] = stem1 .. "ōrum" forms["dat_pl"] = stem1 .. "īs" forms["acc_pl"] = stem1 .. "ōs" forms["abl_pl"] = stem1 .. "īs" forms["voc_pl"] = stem1 .. "ī" -- all neuter if types.N then forms["nom_sg"] = stem1 .. "um" forms["voc_sg"] = stem1 .. "um" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- neuter ium if types.ium then forms["nom_sg"] = stem1 .. "ium" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" forms["voc_sg"] = stem1 .. "ium" forms["nom_pl"] = stem1 .. "ia" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "ia" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "ia" -- neuter us, plural a elseif types.a then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- -vom (aevom, etc.) elseif types.vom then forms["nom_sg"] = stem1 .. "om" forms["acc_sg"] = stem1 .. "om" forms["voc_sg"] = stem1 .. "om" -- neuter Greek in -os (cētos) elseif types.Greek and types.us then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "os" forms["voc_sg"] = stem1 .. "os" forms["nom_pl"] = stem1 .. "ē" forms["gen_pl"] = stem1 .. "ōn" forms["acc_pl"] = stem1 .. "ē" forms["voc_pl"] = stem1 .. "ē" -- neuter Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "on" forms["acc_sg"] = stem1 .. "on" forms["voc_sg"] = stem1 .. "on" -- neuter us elseif types.us then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "ī" forms["acc_pl"] = stem1 .. "ōs" forms["voc_pl"] = stem1 .. "ī" end -- er elseif types.er then forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "ī" forms["dat_sg"] = stem2 .. "ō" forms["acc_sg"] = stem2 .. "um" forms["abl_sg"] = stem2 .. "ō" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ī" forms["gen_pl"] = stem2 .. "ōrum" forms["dat_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "ōs" forms["abl_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "ī" -- ius elseif types.ius then forms["nom_sg"] = stem1 .. "ius" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" if types.voci then -- Only for proper names and fīlius, genius forms["voc_sg"] = stem1 .. "ī" else forms["voc_sg"] = stem1 .. "ie" end forms["nom_pl"] = stem1 .. "iī" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "iōs" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "iī" -- -vos (servos, etc.) elseif types.vos then forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "om" -- Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "on" if data.num == "pl" then forms["nom_pl"] = stem1 .. "oe" forms["voc_pl"] = stem1 .. "oe" else forms["nom_pl"] = {stem1 .. "ī", stem1 .. "oe"} forms["voc_pl"] = {stem1 .. "ī", stem1 .. "oe"} end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- with -um genitive plural alt_gen_pl_in_um(stem2, forms, types, subtitles, types.ius or types.ium) -- with locative if data.loc then if types.ius or types.ium then forms["loc_sg"] = stem2 .. "iī" forms["loc_pl"] = stem2 .. "iīs" else forms["loc_sg"] = stem2 .. "ī" forms["loc_pl"] = stem2 .. "īs" end end end local acc_sg_i_stem_subtypes = { acc_im = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [abl -ī]; -- cannabis, senapis, sinapis [abl -e, -ī] acc_sg = {"im"}, title = {"accusative singular in ''-im''"}, }, acc_im_in = { -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [abl -ī]; -- Baetis, Tigris [acc -e, -ī] acc_sg = {"im", "in"}, title = {"accusative singular in ''-im'' or ''-in''"}, }, acc_im_in_em = { -- e.g. tigris, river Līris acc_sg = {"im", "in", "em"}, title = {"accusative singular in ''-im'', ''-in'' or ''-em''"}, }, acc_im_em = { acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or ''-em''"}, }, acc_im_occ_em = { -- febris, pelvis, puppis, restis, securis, turris [abl -ī, -e] acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or occasionally ''-em''"}, }, acc_em_im = { -- aqualis, clavis, lens, navis [abl -e, -ī]; -- cutis, restis [abl -e] acc_sg = {"em", "im"}, title = {"accusative singular in ''-em'' or ''-im''"}, }, } local abl_sg_i_stem_subtypes = { abl_i = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [acc -im]; -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [acc -im or -in]; -- canalis "water pipe", months in -is or -er, nouns originally i-stem adjectives such as aedilis, affinis, bipennis, familiaris, sodalis, volucris, etc. [acc -em] abl_sg = {"ī"}, title = {"ablative singular in ''-ī''"}, }, abl_i_e = { -- febris, pelvis, puppis, restis, securis, turris [acc -im, -em] abl_sg = {"ī", "e"}, title = {"ablative singular in ''-ī'' or ''-e''"}, }, abl_e_i = { -- cannabis, senapis, sinapis [acc -im]; -- Baetis, Tigris [acc -im, -in]; -- aqualis, clavis, lens, navis [acc -em, -im]; -- finis, mugilis, occiput, pugil, rus, supellex, vectis [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or ''-ī''"}, }, abl_e_occ_i = { -- amnis, anguis, avis, civis, classis, fustis, ignis, imber, orbis, pars, postis, sors, unguis, vesper [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or occasionally ''-ī''"}, }, } local function extract_stem(form, ending) local base = match(form, "^(.*)" .. ending .. "$") if not base then error("Form " .. form .. " should end in -" .. ending) end return base end local function count_vowels(stem) return select(2, toNFD(stem):gsub("[aeiouyAEIOUY]", "")) end noun_decl["3"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] -- local function non_i_stem_type() -- return (count_vowels(stem1) > count_vowels(stem2) and "parisyllabic" or "imparisyllabic") .. " non-i-stem" -- end insert_if_not(data.title, "tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") --normal 3rd forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "is" forms["dat_sg"] = stem2 .. "ī" forms["acc_sg"] = stem2 .. "em" forms["abl_sg"] = stem2 .. "e" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ēs" forms["gen_pl"] = stem2 .. "um" forms["dat_pl"] = stem2 .. "ibus" forms["acc_pl"] = stem2 .. "ēs" forms["abl_pl"] = stem2 .. "ibus" forms["voc_pl"] = stem2 .. "ēs" local acc_sg_i_stem_subtype = false local not_acc_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if acc_sg_i_stem_subtypes[subtype] then acc_sg_i_stem_subtype = true break end end for acc_sg_subtype, _ in pairs(acc_sg_i_stem_subtypes) do if types["not_" .. acc_sg_subtype] then not_acc_sg_i_stem_subtype = true break end end local abl_sg_i_stem_subtype = false local not_abl_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if abl_sg_i_stem_subtypes[subtype] then abl_sg_i_stem_subtype = true break end end for abl_sg_subtype, _ in pairs(abl_sg_i_stem_subtypes) do if types["not_" .. abl_sg_subtype] then not_abl_sg_i_stem_subtype = true break end end -- all Greek if types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") -- Greek er if types.er then stem1 = extract_stem(stem1, "ēr") forms["nom_sg"] = stem1 .. "ēr" forms["gen_sg"] = stem1 .. "eris" forms["dat_sg"] = stem1 .. "erī" forms["acc_sg"] = {stem1 .. "era", stem1 .. "erem"} forms["abl_sg"] = stem1 .. "ere" forms["voc_sg"] = stem1 .. "ēr" forms["nom_pl"] = stem1 .. "erēs" forms["gen_pl"] = stem1 .. "erum" forms["dat_pl"] = stem1 .. "eribus" forms["acc_pl"] = stem1 .. "erēs" forms["abl_pl"] = stem1 .. "eribus" forms["voc_pl"] = stem1 .. "erēs" -- Greek on elseif types.on then stem1 = extract_stem(stem1, "ōn") forms["nom_sg"] = stem1 .. "ōn" forms["gen_sg"] = {stem1 .. "ontis", stem1 .. "ontos"} forms["dat_sg"] = stem1 .. "ontī" forms["acc_sg"] = stem1 .. "onta" forms["abl_sg"] = stem1 .. "onte" forms["voc_sg"] = stem1 .. "ōn" forms["nom_pl"] = stem1 .. "ontēs" forms["gen_pl"] = {stem1 .. "ontum", stem1 .. "ontium"} forms["dat_pl"] = stem1 .. "ontibus" forms["acc_pl"] = {stem1 .. "ontēs", stem1 .. "ontās"} forms["abl_pl"] = stem1 .. "ontibus" forms["voc_pl"] = stem1 .. "ontēs" -- Greek i-stem elseif types.I then forms["gen_sg"] = {stem2 .. "is", stem2 .. "eōs", stem2 .. "ios"} forms["acc_sg"] = {stem2 .. "im", stem2 .. "in", stem2 .. "em{MED}"} forms["abl_sg"] = {stem2 .. "ī", stem2 .. "e{MED}"} forms["voc_sg"] = {stem2 .. "is", stem2 .. "i"} forms["nom_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["gen_pl"] = {stem2 .. "ium", stem2 .. "eōn"} forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["voc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} if types.poetic_esi then forms["dat_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} forms["abl_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} end -- normal Greek else forms["gen_sg"] = stem2 .. "os" if match(toNFD(stem2), "[yY]" .. ACCENT .. "*$") then forms["acc_sg"] = stem2 .. "n" else forms["acc_sg"] = stem2 .. "a" end forms["nom_pl"] = stem2 .. "es" forms["acc_pl"] = stem2 .. "as" forms["voc_pl"] = stem2 .. "es" if match(toNFD(stem1), "[iyIY]" .. ACCENT .. "*s$") then -- Per Hiley, words in -is and -ys have a poetic vocative -- without the -s, but otherwise the vocative is the same -- as the nominative. forms["voc_sg"] = {stem1, (stem1:gsub("s$", "")).."{L}"} end end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- polis if types.polis then stem1 = extract_stem(stem1, "polis") insert_if_not(data.title, "parcialmente griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "polis" forms["gen_sg"] = stem1 .. "polis" forms["dat_sg"] = stem1 .. "polī" forms["acc_sg"] = {stem1 .. "polim", stem1 .. "polin"} forms["abl_sg"] = stem1 .. "polī" forms["voc_sg"] = {stem1 .. "polis", stem1 .. "polī"} end -- all neuter if types.N then forms["acc_sg"] = stem1 -- neuter I stem if types.I then -- pure variety if types.pure then forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "ia" forms["gen_pl"] = stem2 .. "ium" forms["acc_pl"] = stem2 .. "ia" forms["voc_pl"] = stem2 .. "ia" -- non-pure variety (rare) else forms["nom_pl"] = stem2 .. "a" forms["gen_pl"] = {stem2 .. "ium", stem2 .. "um"} forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- normal neuter else forms["nom_pl"] = stem2 .. "a" forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- I stem elseif types.I or acc_sg_i_stem_subtype or abl_sg_i_stem_subtype then forms["gen_pl"] = stem2 .. "ium" -- Per Allen and Greenough, Hiley and others, the acc_pl in -īs -- applied originally to all i-stem nouns, and was current as an -- alternative form up through Caesar. forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "īs"} -- pure variety if types.pure then forms["acc_sg"] = stem2 .. "im" forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "īs" end local num = data.num for subtype, _ in pairs(types) do local acc_sg_i_stem_props = acc_sg_i_stem_subtypes[subtype] if acc_sg_i_stem_props then forms["acc_sg"] = {} for _, ending in ipairs(acc_sg_i_stem_props.acc_sg) do insert_if_not(forms["acc_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(acc_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end -- FIXME: needs to be done for neuter nouns as well. for subtype, _ in pairs(types) do local abl_sg_i_stem_props = abl_sg_i_stem_subtypes[subtype] if abl_sg_i_stem_props then forms["abl_sg"] = {} for _, ending in ipairs(abl_sg_i_stem_props.abl_sg) do insert_if_not(forms["abl_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(abl_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end end -- with locative if data.loc then -- As far as I can tell, in general both dative singular and -- ablative singular could be used for the third-declension locative, -- with different time periods preferring different forms. -- http://dcc.dickinson.edu/grammar/latin/3rd-declension-locative-case -- mentions rūrī along with either Carthāginī or Carthāgine. -- Wikipedia in https://en.wikipedia.org/wiki/Locative_case#Latin -- says this: -- -- In archaic times, the locative singular of third declension nouns -- was still interchangeable between ablative and dative forms, but in -- the Augustan Period the use of the ablative form became fixed. -- Therefore, both forms "rūrī" and "rūre" may be encountered. -- -- Lewis and Short confirm this. local loc_sg = forms["dat_sg"] if type(loc_sg) == "table" then loc_sg = deep_copy(loc_sg) else loc_sg = {loc_sg} end local abl_sg = forms["abl_sg"] if type(abl_sg) == "table" then for _, form in ipairs(abl_sg) do insert_if_not(loc_sg, deep_copy(form)) end else insert_if_not(loc_sg, abl_sg) end forms["loc_sg"] = loc_sg forms["loc_pl"] = deep_copy(forms["abl_pl"]) --The following is what we used to have, but I simply cannot believe it. --if types.Greek and not types.s then -- forms["loc_pl"] = stem2 .. "ēs" --end end end noun_decl["4"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "cuarta declinación") insert_if_not(data.categories, "LA:Sustantivos de la cuarta declinación") -- normal 4th forms["nom_sg"] = stem .. "us" forms["gen_sg"] = stem .. "ūs" forms["dat_sg"] = stem .. "uī" forms["acc_sg"] = stem .. "um" forms["abl_sg"] = stem .. "ū" forms["voc_sg"] = stem .. "us" forms["nom_pl"] = stem .. "ūs" forms["gen_pl"] = stem .. "uum" forms["dat_pl"] = stem .. "ibus" forms["acc_pl"] = stem .. "ūs" forms["abl_pl"] = stem .. "ibus" forms["voc_pl"] = stem .. "ūs" if types.echo then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end add_form(forms, "acc_sg", stem, "ōn") elseif types.Callisto then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end end -- neuter if types.N then forms["nom_sg"] = stem .. "ū̆{?}" forms["gen_sg"] = {stem .. "ūs{C}", stem .. "ū{S}"} forms["dat_sg"] = {stem .. "uī{C}", stem .. "ū{S}"} forms["acc_sg"] = stem .. "ū̆{?}" forms["voc_sg"] = stem .. "ū̆{?}" forms["nom_pl"] = stem .. "ua" forms["acc_pl"] = stem .. "ua" forms["voc_pl"] = stem .. "ua" end -- ubus if types.ubus then forms["dat_pl"] = stem .. "ubus" forms["abl_pl"] = stem .. "ubus" end -- with locative if data.loc then forms["loc_sg"] = forms["abl_sg"] forms["loc_pl"] = forms["abl_pl"] end end noun_decl["5"] = function(data, args) local forms, types = data.forms, data.types local stem = args[1] insert_if_not(data.title, "quinta declinación") insert_if_not(data.categories, "LA:Sustantivos de la quinta declinación") -- ies if types.i then stem = stem .. "i" end forms["nom_sg"] = stem .. "ēs" forms["gen_sg"] = stem .. "eī" forms["dat_sg"] = stem .. "eī" forms["acc_sg"] = stem .. "em" forms["abl_sg"] = stem .. "ē" forms["voc_sg"] = stem .. "ēs" forms["nom_pl"] = stem .. "ēs" forms["gen_pl"] = stem .. "ērum" forms["dat_pl"] = stem .. "ēbus" forms["acc_pl"] = stem .. "ēs" forms["abl_pl"] = stem .. "ēbus" forms["voc_pl"] = stem .. "ēs" -- ies if types.i then forms["gen_sg"] = stem .. "ēī" forms["dat_sg"] = stem .. "ēī" end --with locative if data.loc then forms["loc_sg"] = stem .. "ē" forms["loc_pl"] = stem .. "ēbus" end end noun_decl["sgpl"] = function(data, args) local forms = data.forms local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem1 forms["gen_sg"] = stem1 forms["dat_sg"] = stem1 forms["acc_sg"] = stem1 forms["abl_sg"] = stem1 forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 forms["gen_pl"] = stem2 forms["dat_pl"] = stem2 forms["acc_pl"] = stem2 forms["abl_pl"] = stem2 forms["voc_pl"] = stem2 -- with locative if data.loc then forms["loc_sg"] = stem1 forms["loc_pl"] = stem2 end end noun_decl["indecl"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = stem forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} -- with locative (for multiword terms) if data.loc then forms["loc_sg"] = {} forms["loc_pl"] = {} end data.num = "sg" end noun_decl["irreg"] = function(data, args) local forms, subtitles, notes = data.forms, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "irregular") insert_if_not(data.categories, "LA:Sustantivos irregulares") forms["nom_sg"] = {} forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = {} forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} if stem == "bōs" then data.decl = "3" local stem1, stem2 = "bōs", "bov" noun_decl["3"](data, {stem1, stem2}) add_form(forms, "abl_sg", stem2, "īd{†}") add_form(forms, "gen_pl", "bo", "um") add_form(forms, "gen_pl", stem2, "erum") add_form(forms, "dat_pl", "", "bōbus") add_form(forms, "dat_pl", "", "būbus") add_form(forms, "abl_pl", "", "bōbus") add_form(forms, "abl_pl", "", "būbus") elseif stem:match("^[dD]eus$") then data.decl = "2" local dD = stem:sub(1, 1) forms["nom_sg"] = dD .. "eus" forms["gen_sg"] = dD .. "eī" forms["dat_sg"] = dD .. "eō" forms["acc_sg"] = dD .. "eum" forms["abl_sg"] = dD .. "eō" forms["voc_sg"] = {dD .. "eus", dD .. "ee"} if stem == "deus" then forms["nom_pl"] = {"dī", "diī", "deī"} forms["gen_pl"] = {"deōrum", "deum"} forms["dat_pl"] = {"dīs", "diīs", "deīs"} forms["acc_pl"] = "deōs" forms["abl_pl"] = {"dīs", "diīs", "deīs"} forms["voc_pl"] = {"dī", "diī", "deī"} end elseif stem == "domus" then data.decl = "4,2" insert_if_not(data.title, "cuarta/segunda declinación") forms["nom_sg"] = "domus" forms["gen_sg"] = {"domūs", "domī"} forms["dat_sg"] = {"domuī", "domō", "domū"} forms["acc_sg"] = "domum" forms["abl_sg"] = {"domū", "domō"} forms["voc_sg"] = "domus" forms["loc_sg"] = "domī" forms["nom_pl"] = "domūs" forms["gen_pl"] = {"domuum", "domōrum"} forms["dat_pl"] = "domibus" forms["acc_pl"] = {"domūs", "domōs"} forms["abl_pl"] = "domibus" forms["voc_pl"] = "domūs" forms["loc_pl"] = {} data.loc = true elseif match(stem, "^[IÏJ]ēs[uū]" .. BREVE .. "?s$") then local ij = sub(stem, 1, 1) local uu = match(stem, "[uū]" .. BREVE .. "?") forms["nom_sg"] = stem forms["gen_sg"] = ij .. "ēsū" forms["dat_sg"] = ij .. "ēsū" forms["acc_sg"] = ij .. "ēs" .. uu .. "m" forms["abl_sg"] = ij .. "ēsū" forms["voc_sg"] = ij .. "ēsū" data.num = "sg" elseif stem == "Mōsēs" or stem == "Moesēs" or match(stem, "^M[oō]" .. BREVE .. "?[īȳ]sēs$") then local mos = sub(stem, 1, -3) forms["nom_sg"] = stem forms["gen_sg"] = {mos .. "ī", mos .. "ēī", mos .. "is", mos .. "ēn", mos .. "eōs"} forms["dat_sg"] = mos .. "ī" forms["acc_sg"] = {mos .. "ēn", mos .. "em"} forms["abl_sg"] = {mos .. "e", mos .. "ēn", mos .. "ī"} forms["voc_sg"] = {mos .. "ēs", mos .. "ē"} data.num = "sg" elseif stem:match("^[ij]ūgerum$") then data.decl = "2,3" local ij = stem:sub(1, 1) insert_if_not(data.title, "segunda/tercera declinación híbrido") forms["nom_sg"] = ij .. "ūgerum" forms["gen_sg"] = ij .. "ūgerī" forms["dat_sg"] = ij .. "ūgerō" forms["acc_sg"] = ij .. "ūgerum" forms["abl_sg"] = ij .. "ūgerō" forms["voc_sg"] = ij .. "ūgerum" forms["nom_pl"] = ij .. "ūgera" forms["gen_pl"] = ij .. "ūgerum" forms["dat_pl"] = ij .. "ūgeribus" forms["acc_pl"] = ij .. "ūgera" forms["abl_pl"] = {ij .. "ūgeribus", ij .. "ūgerīs{†}"} forms["voc_pl"] = ij .. "ūgera" elseif stem == "sūs" then data.decl = "3" forms["nom_sg"] = "sūs" forms["gen_sg"] = "suis" forms["dat_sg"] = "suī" forms["acc_sg"] = "suem" forms["abl_sg"] = "sue" forms["voc_sg"] = "sūs" forms["nom_pl"] = "suēs" forms["gen_pl"] = "suum" forms["dat_pl"] = {"suibus", "sūbus", "subus"} forms["acc_pl"] = "suēs" forms["abl_pl"] = {"suibus", "sūbus", "subus"} forms["voc_pl"] = "suēs" elseif stem == "ēthos" then data.decl = "3" insert_if_not(data.title, "tercera declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "ēthos" forms["gen_sg"] = "ētheos" forms["acc_sg"] = "ēthos" forms["voc_sg"] = "ēthos" forms["nom_pl"] = {"ēthea", "ēthē"} forms["dat_pl"] = {"ēthesi", "ēthesin"} forms["acc_pl"] = {"ēthea", "ēthē"} forms["abl_pl"] = {"ēthesi", "ēthesin"} forms["voc_pl"] = {"ēthea", "ēthē"} elseif stem == "Athōs" then data.decl = "2" insert_if_not(data.title, "segunda declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "Athōs" forms["gen_sg"] = "Athō" forms["dat_sg"] = "Athō" forms["acc_sg"] = {"Athō", "Athōn"} forms["abl_sg"] = "Athō" forms["voc_sg"] = "Athōs" data.num = "sg" elseif stem:match("^[uv]ēnum$") then data.decl = "4,2" local uv = stem:sub(1, 1) insert_if_not(data.title, "cuarta/segunda declinación, defectivo") forms["dat_sg"] = {uv .. "ēnuī", uv .. "ēnō"} forms["acc_sg"] = uv .. "ēnum" data.num = "sg" elseif stem:match("^[uv]īs$") then data.decl = "3" local uv = stem:sub(1, 1) insert_if_not(data.title, "defectivo") forms["nom_sg"] = uv .. "īs" forms["gen_sg"] = uv .. "īs" forms["dat_sg"] = uv .. "ī" forms["acc_sg"] = uv .. "im" forms["abl_sg"] = uv .. "ī" forms["voc_sg"] = uv .. "īs" forms["nom_pl"] = uv .. "īrēs" forms["gen_pl"] = uv .. "īrium" forms["dat_pl"] = uv .. "īribus" forms["acc_pl"] = {uv .. "īrēs", uv .. "īrīs"} forms["abl_pl"] = uv .. "īribus" forms["voc_pl"] = uv .. "īrēs" else error("Stem " .. stem .. " not recognized.") end end local adj_decl = {} adj_decl["0+"] = function(data, args) local forms, categories = data.forms, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = stem forms["gen_sg_m"] = stem forms["gen_pl_m"] = stem forms["dat_sg_m"] = stem forms["dat_pl_m"] = stem forms["acc_sg_m"] = stem forms["acc_pl_m"] = stem forms["abl_sg_m"] = stem forms["abl_pl_m"] = stem forms["voc_sg_m"] = stem forms["voc_pl_m"] = stem forms["loc_sg_m"] = stem forms["loc_pl_m"] = stem end adj_decl["1&2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera y segunda declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local original if types.er then local final2 = stem:sub(-2) if final2 == "er" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") elseif final2 == "ur" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") else error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem) end stem, original = args[2], stem end local us = "us" local a_sf = "a" local um = "um" local ae_gsf = "ae" local am = "am" local a_macron = "ā" local i_pl = stem .. "ī" if types.greekA or types.greekE then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") if types.greekA then us = "os" um = "on" am = "ān" else us = "os" a_sf = "ē" um = "on" ae_gsf = "ēs" am = "ēn" a_macron = "ē" end i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = original or (stem .. us) forms["nom_sg_f"] = stem .. a_sf forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_f"] = stem .. ae_gsf forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_f"] = stem .. "ae" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_f"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_f"] = stem .. am forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_f"] = stem .. a_macron forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_f"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = original or (stem .. "e") forms["voc_sg_f"] = stem .. a_sf forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" if types.ius then insert_if_not(data.title, "pronominal") --insert_if_not(subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''") forms["gen_sg_m"] = stem .. "ī̆us" forms["gen_sg_f"] = stem .. "ī̆us" forms["gen_sg_n"] = stem .. "ī̆us" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_f"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" elseif types.not_ius then insert_if_not(data.title, "no pronominal") --insert_if_not(subtitles, "with normal genitive and dative singular") end if stem == "me" then forms["voc_sg_m"] = "mī" end if types.ic then --insert_if_not(subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''") local oc = "oc" local oc_macron = "ōc" if stem == "ill" then oc = "uc" oc_macron = "ūc" end forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = stem .. oc forms["nom_pl_n"] = stem .. "aec" forms["gen_sg_m"] = stem .. "uius" forms["gen_sg_f"] = stem .. "uius" forms["gen_sg_n"] = stem .. "uius" forms["dat_sg_m"] = stem .. "uic" forms["dat_sg_f"] = stem .. "uic" forms["dat_sg_n"] = stem .. "uic" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = stem .. oc forms["acc_pl_n"] = stem .. "aec" forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. oc_macron forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} end if types.distr then if stem:sub(-1) == "n" then forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum{R}"} forms["gen_pl_f"] = {stem .. "um", stem .. "ārum{R}"} forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum{R}"} else error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem) end end forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["1-1+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") forms["nom_sg_m"] = stem .. "a" forms["nom_pl_m"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ae" forms["gen_pl_m"] = stem .. "ārum" forms["dat_sg_m"] = stem .. "ae" forms["dat_pl_m"] = stem .. "īs" forms["acc_sg_m"] = stem .. "am" forms["acc_sg_n"] = stem .. "a" forms["acc_pl_m"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ā" forms["abl_pl_m"] = stem .. "īs" forms["voc_sg_m"] = stem .. "a" forms["voc_pl_m"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["2-2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "segunda declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local us = "us" local um = "um" local i_pl = stem .. "ī" if types.greek then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") us = "os" um = "on" i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = stem .. us forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = stem .. "e" forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end local function abl_i_e(...) local function update_slot(forms, slot, f, do_copy) if not forms[slot] then return do_copy elseif do_copy then f = deep_copy(f) end forms[slot] = f return true end function abl_i_e(stem, forms, types) local f, do_copy if types["abl_e_i"] then f = {stem .. "e", stem .. "ī"} elseif types["abl_i_e"] then f = {stem .. "ī", stem .. "e"} else return end do_copy = update_slot(forms, "abl_sg_m", f, do_copy) do_copy = update_slot(forms, "abl_sg_f", f, do_copy) -- Neuter doesn't take -e with i-stems. if not types.I then update_slot(forms, "abl_sg_n", f, do_copy) end end return abl_i_e(...) end adj_decl["3-1+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) if types.par then forms["nom_pl_n"] = stem2 .. "a" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["abl_sg_m"] = stem2 .. "e" forms["abl_sg_n"] = stem2 .. "e" forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"} -- Really? forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"} -- Why does this happen? forms["acc_pl_n"] = stem2 .. "a" forms["voc_pl_n"] = stem2 .. "a" end local es_base = stem1:match("^(.-)ēs$") if es_base and es_base == stem2 then if types.greek then forms["nom_sg_n"] = {stem2 .. "ē̆s{?}"} forms["acc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_m"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["nom_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["acc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["voc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["abl_sg_m"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["abl_sg_n"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["gen_pl_m"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} forms["gen_pl_n"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Adjetivos griegos") elseif types.not_greek then insert_if_not(data.title, "no griego") end end end adj_decl["3-def+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, defectivo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = stem2 .. "ēs" forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" if types.tor then insert_if_not(data.title, "tercera declinación, solo en masculino") insert_if_not(categories, "LA:Adjetivos solo en masculino") remove_forms(forms, {"_f$", "_n$"}) forms["nom_sg_m"] = stem1 forms["gen_sg_m"] = stem2 .. "is" forms["dat_sg_m"] = stem2 .. "ī" forms["acc_sg_m"] = stem2 .. "em" forms["abl_sg_m"] = stem2 .. "e" forms["voc_sg_m"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["gen_pl_m"] = stem2 .. "um" forms["dat_pl_m"] = stem2 .. "ibus" forms["acc_pl_m"] = stem2 .. "ēs" forms["abl_pl_m"] = stem2 .. "ibus" forms["voc_pl_m"] = stem2 .. "ēs" end if types.trix then insert_if_not(data.title, "tercera declinación, solo en femenino o en neutro plural") insert_if_not(categories, "LA:Adjetivos solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en neutro") remove_forms(forms, {"_m$", "sg_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.trixf then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.idis then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = {stem2 .. "is", stem2 .. "os"} forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = {stem2 .. "em", stem2 .. "a"} forms["abl_sg_f"] = stem2 .. "e" forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} forms["gen_pl_f"] = stem2 .. "um" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = {stem2 .. "ēs", stem2 .. "as"} forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} end forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-C+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1 = args[1] local stem2 = stem1 .. "ōr" insert_if_not(data.title, "tercera declinación, comparativo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos comparativos") forms["nom_sg_m"] = stem1 .. "or" forms["nom_sg_n"] = stem1 .. "us" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "a" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 .. "us" forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} forms["acc_pl_n"] = stem2 .. "a" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 .. "or" forms["voc_sg_n"] = stem1 .. "us" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "a" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-P+"] = function(data, args) local forms, notes = data.forms, data.notes local stem2 = args[2] adj_decl["3-1+"](data, args) insert_if_not(data.title, "tercera declinación, participio") insert_if_not(data.categories, "LA:Adjetivos de la tercera declinación") forms["abl_sg_m"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["abl_sg_n"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} end adj_decl["3-2+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem = args[1] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem .. "is" forms["nom_sg_n"] = stem .. "e" forms["nom_pl_m"] = stem .. "ēs" forms["nom_pl_n"] = stem .. "ia" forms["gen_sg_m"] = stem .. "is" forms["gen_sg_n"] = stem .. "is" forms["gen_pl_m"] = stem .. "ium" forms["gen_pl_n"] = stem .. "ium" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" forms["dat_pl_m"] = stem .. "ibus" forms["dat_pl_n"] = stem .. "ibus" forms["acc_sg_m"] = stem .. "em" forms["acc_sg_n"] = stem .. "e" forms["acc_pl_m"] = {stem .. "īs", stem .. "ēs"} forms["acc_pl_n"] = stem .. "ia" forms["abl_sg_m"] = stem .. "ī" forms["abl_sg_n"] = stem .. "ī" forms["abl_pl_m"] = stem .. "ibus" forms["abl_pl_n"] = stem .. "ibus" -- abl_i_e(stem, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem .. "is" forms["voc_sg_n"] = stem .. "e" forms["voc_pl_m"] = stem .. "ēs" forms["voc_pl_n"] = stem .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-3+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con tres terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_f"] = stem2 .. "is" forms["nom_sg_n"] = stem2 .. "e" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_f"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_f"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_f"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_f"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_f"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_f"] = stem2 .. "em" forms["acc_sg_n"] = stem2 .. "e" forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_f"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_f"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_f"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" -- abl_i_e(stem2, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem1 forms["voc_sg_f"] = stem2 .. "is" forms["voc_sg_n"] = stem2 .. "e" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_f"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["indecl+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = {} forms["gen_sg_m"] = {} forms["gen_pl_m"] = {} forms["dat_sg_m"] = {} forms["dat_pl_m"] = {} forms["acc_sg_m"] = stem forms["acc_pl_m"] = {} forms["abl_sg_m"] = {} forms["abl_pl_m"] = {} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["irreg+"] = function(data,args) local forms, types, pos, notes, categories = data.forms, data.types, data.pos, data.notes, data.categories local arg1 = args[1] insert_if_not(data.title, "irregular") insert_if_not(categories, "LA:Adjetivos irregulares") if arg1 == "duo" or arg1 == "ambō" then local stem = sub(arg1, 1, -2) -- data.title = stem == "amb" and "irregular adjective" or "numeral" data.num = "pl" local stem_with_o = stem .. (stem == "amb" and "ō" or "o") forms["nom_pl_m"] = stem_with_o forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem_with_o forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_pl_m"] = stem .. "ōbus" forms["dat_pl_f"] = stem .. "ābus" forms["dat_pl_n"] = stem .. "ōbus" forms["acc_pl_m"] = {stem .. "ōs", stem_with_o} forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem_with_o forms["abl_pl_m"] = stem .. "ōbus" forms["abl_pl_f"] = stem .. "ābus" forms["abl_pl_n"] = stem .. "ōbus" forms["voc_pl_m"] = stem_with_o forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem_with_o if stem == "du" then forms["gen_pl_m"] = {forms["gen_pl_m"], "duum", "duom{†}"} forms["gen_pl_n"] = {forms["gen_pl_n"], "duum", "duom{†}"} end elseif arg1:sub(-6) == "mīlle" then insert_if_not(data.title, "numeral semiindeclinable") local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "le" forms["nom_pl_m"] = {stem .. "ia", stem .. "lia"} forms["gen_sg_m"] = stem .. "le" forms["gen_pl_m"] = {stem .. "ium", stem .. "lium"} forms["dat_sg_m"] = stem .. "le" forms["dat_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["acc_sg_m"] = stem .. "le" forms["acc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["abl_sg_m"] = stem .. "le" forms["abl_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["voc_sg_m"] = stem .. "le" forms["voc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) elseif arg1 == "ille" or arg1 == "iste" or arg1 == "ipse" or arg1 == "olle" then local stem = arg1:sub(1, -2) types.ius = true adj_decl["1&2+"](data, {stem}) insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) forms["nom_sg_m"] = arg1 if arg1 == "ipse" then add_form(forms, "nom_sg_n", stem, "ud{MED}") add_form(forms, "acc_sg_n", stem, "ud{MED}") else forms["nom_sg_n"] = stem .. "ud" forms["acc_sg_n"] = stem .. "ud" end forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} elseif arg1 == "illic" or arg1 == "istic" or arg1 == "isthic" then insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["gen_sg_m"] = stem .. "ī̆usce" forms["gen_sg_f"] = stem .. "ī̆usce" forms["gen_sg_n"] = stem .. "ī̆usce" forms["dat_sg_m"] = stem .. "īc" forms["dat_sg_f"] = stem .. "īc" forms["dat_sg_n"] = stem .. "īc" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. "ōc" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["nom_pl_m"] = stem .. "īsce" forms["nom_pl_f"] = stem .. "aec" forms["nom_pl_n"] = stem .. "aec" forms["gen_pl_m"] = stem .. "ōrunc{?}" forms["gen_pl_f"] = stem .. "ārunc{?}" forms["gen_ok_n"] = stem .. "ōrunc{?}" forms["dat_pl_m"] = stem .. "īsce" forms["dat_pl_f"] = stem .. "īsce" forms["dat_pl_n"] = stem .. "īsce" forms["acc_pl_m"] = stem .. "ōsce" forms["acc_pl_f"] = stem .. "āsce" forms["acc_pl_n"] = stem .. "aec" forms["abl_pl_m"] = stem .. "īsce" forms["abl_pl_f"] = stem .. "īsce" forms["abl_pl_n"] = stem .. "īsce" forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "hice" then insert_if_not(data.title, "demostrativo") -- .. " pronoun" forms["nom_sg_m"] = "hice" forms["nom_sg_f"] = "haece" forms["nom_sg_n"] = "hoce" forms["nom_pl_m"] = "hīce" forms["nom_pl_f"] = "haece" forms["nom_pl_n"] = "haece" forms["gen_sg_m"] = "huiusce" forms["gen_sg_f"] = "huiusce" forms["gen_sg_n"] = "huiusce" forms["gen_pl_m"] = {"hōrunce", "hōrumce"} forms["gen_pl_f"] = {"hārunce", "hārumce"} forms["gen_pl_n"] = {"hōrunce", "hōrumce"} forms["dat_sg_m"] = "huīce" forms["dat_sg_f"] = "huīce" forms["dat_sg_n"] = "huīce" forms["dat_pl_m"] = "hīsce" forms["dat_pl_f"] = "hīsce" forms["dat_pl_n"] = "hīsce" forms["acc_sg_m"] = "hunce" forms["acc_sg_f"] = "hance" forms["acc_sg_n"] = "hoce" forms["acc_pl_m"] = "hōsce" forms["acc_pl_f"] = "hāsce" forms["acc_pl_n"] = "haece" forms["abl_sg_m"] = "hōce" forms["abl_sg_f"] = "hāce" forms["abl_sg_n"] = "hōce" forms["abl_pl_m"] = "hīsce" forms["abl_pl_f"] = "hīsce" forms["abl_pl_n"] = "hīsce" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "plūs" then insert_if_not(data.title, "comparativo") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación con una terminación") data.note = "Ninguna de las formas en singular se usaron en latín clásico" forms["nom_sg_n"] = "plūs" forms["nom_pl_m"] = "plūrēs" forms["nom_pl_n"] = "plūra" forms["gen_sg_m"] = "plūris" forms["gen_sg_n"] = "plūris" forms["gen_pl_m"] = "plūrium" forms["gen_pl_n"] = "plūrium" forms["dat_sg_m"] = "plūrī" forms["dat_sg_n"] = "plūrī" forms["dat_pl_m"] = "plūribus" forms["dat_pl_n"] = "plūribus" forms["acc_sg_m"] = "plūrem" forms["acc_sg_f"] = "plūrem" forms["acc_sg_n"] = "plūs" forms["acc_pl_m"] = {"plūrēs", "plūrīs"} forms["acc_pl_n"] = "plūra" forms["abl_sg_m"] = {"plūrī", "plūre"} forms["abl_sg_f"] = {"plūrī", "plūre"} forms["abl_sg_n"] = {"plūrī", "plūre"} forms["abl_pl_m"] = "plūribus" forms["abl_pl_n"] = "plūribus" forms["voc_sg_n"] = "plūs" forms["voc_pl_m"] = "plūrēs" forms["voc_pl_n"] = "plūra" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif match(arg1, "^egō̆?$") or arg1 == "nōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "nōs" forms["gen_sg_m"] = "meī" forms["gen_pl_m"] = {"nostrī", "nostrum"} forms["dat_sg_m"] = "mihī̆" forms["dat_pl_m"] = "nōbīs" forms["acc_sg_m"] = {"mē", "mēmē"} forms["acc_pl_m"] = "nōs" forms["abl_sg_m"] = {"mē", "mēmē"} forms["abl_pl_m"] = "nōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "nōs" elseif arg1 == "tū" or arg1 == "vōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "vōs" forms["gen_sg_m"] = "tuī" forms["gen_pl_m"] = {"vestrī", "vestrum"} forms["dat_sg_m"] = "tibī̆" forms["dat_pl_m"] = "vōbīs" forms["acc_sg_m"] = {"tē", "tētē"} forms["acc_pl_m"] = "vōs" forms["abl_sg_m"] = {"tē", "tētē"} forms["abl_pl_m"] = "vōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "vōs" elseif arg1 == "suī" then insert_if_not(data.title, "pronombre reflexivo") forms["nom_sg_m"] = {} forms["nom_pl_m"] = {} forms["gen_sg_m"] = arg1 forms["gen_pl_m"] = forms["gen_sg_m"] forms["dat_sg_m"] = "sibī̆" forms["dat_pl_m"] = forms["dat_sg_m"] forms["acc_sg_m"] = {"sē", "sēsē"} forms["acc_pl_m"] = {"sē", "sēsē"} forms["abl_sg_m"] = {"sē", "sēsē"} forms["abl_pl_m"] = {"sē", "sēsē"} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} elseif arg1 == "is" or arg1 == "īdem" then insert_if_not(data.title, "pronombre demostrativo") forms["nom_sg_m"] = "is" forms["nom_sg_f"] = "ea" forms["nom_sg_n"] = "id" forms["nom_pl_m"] = {"iī", "eī", "ī"} forms["nom_pl_f"] = "eae" forms["nom_pl_n"] = "ea" forms["gen_sg_m"] = {"eius", "ejus"} forms["gen_sg_f"] = {"eius", "ejus"} forms["gen_sg_n"] = {"eius", "ejus"} forms["gen_pl_m"] = {"eōrum", "eum"} forms["gen_pl_f"] = "eārum" forms["gen_pl_n"] = {"eōrum", "eum"} forms["dat_sg_m"] = {"eī", "e͡i", "ēī"} forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"} forms["dat_sg_n"] = {"eī", "e͡i", "ēī"} forms["dat_pl_m"] = {"iīs", "eīs", "īs"} forms["dat_pl_f"] = {"iīs", "eīs", "īs", "eābus"} forms["dat_pl_n"] = {"iīs", "eīs", "īs"} forms["acc_sg_m"] = "eum" forms["acc_sg_f"] = "eam" forms["acc_sg_n"] = "id" forms["acc_pl_m"] = "eōs" forms["acc_pl_f"] = "eās" forms["acc_pl_n"] = "ea" forms["abl_sg_m"] = "eō" forms["abl_sg_f"] = "eā" forms["abl_sg_n"] = "eō" forms["abl_pl_m"] = {"iīs", "eīs", "īs"} forms["abl_pl_f"] = {"iīs", "eīs", "īs"} forms["abl_pl_n"] = {"iīs", "eīs", "īs"} if arg1 == "īdem" then forms["nom_sg_m"] = "ī" forms["nom_sg_n"] = "i" forms["acc_sg_n"] = "i" end elseif arg1 == "quis" or arg1 == "quī" then data.note = "La forma ''qua'' es preferida frente a ''quae'' cuando se usa como indefinido" local id = "id" if arg1 == "quī" then insert_if_not(data.title, "determinante relativo/interrogativo") id = "od" forms["nom_sg_m"] = {"quī", "quis", "quei{†}"} forms["nom_sg_f"] = {"quae", "qua"} forms["acc_sg_f"] = "quam" forms["abl_sg_m"] = "quō" forms["abl_sg_f"] = "quā" forms["abl_sg_n"] = "quō" else insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = {"quis", "quī"} forms["nom_sg_f"] = {"quae", "qua", "quis{†}"} forms["acc_sg_f"] = {"quam", "quem{†}"} forms["abl_sg_m"] = {"quō", "quī"} forms["abl_sg_f"] = {"quā", "quī"} forms["abl_sg_n"] = {"quō", "quī"} end forms["nom_sg_n"] = "qu"..id forms["nom_pl_m"] = {"quī", "quei{†}"} forms["nom_pl_f"] = "quae" forms["nom_pl_n"] = {"quae", "qua"} forms["gen_sg_m"] = {"cuius", "quoius{†}"} forms["gen_sg_f"] = {"cuius", "quoius{†}"} forms["gen_sg_n"] = {"cuius", "quoius{†}"} forms["gen_pl_m"] = "quōrum" forms["gen_pl_f"] = "quārum" forms["gen_pl_n"] = "quōrum" forms["dat_sg_m"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_f"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_n"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_n"] = {"quibus", "quīs", "queis{†}"} forms["acc_sg_m"] = "quem" forms["acc_sg_n"] = "qu"..id forms["acc_pl_m"] = "quōs" forms["acc_pl_f"] = "quās" forms["acc_pl_n"] = {"quae", "qua"} forms["abl_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_n"] = {"quibus", "quīs", "queis{†}"} elseif arg1 == "aliquī" then insert_if_not(data.title, "determinante indefinido") forms["nom_sg_m"] = {"aliquī{DET/ADJ}", "aliquis{PRON/SUST}"} forms["nom_sg_f"] = {"aliqua", "aliquae{R}"} forms["nom_sg_n"] = "aliquod" forms["nom_pl_m"] = "aliquī" forms["nom_pl_f"] = "aliquae" forms["nom_pl_n"] = "aliqua" forms["gen_sg_m"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_f"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_n"] = {"alicuius", "aliquoius{†}"} forms["gen_pl_m"] = "aliquōrum" forms["gen_pl_f"] = "aliquārum" forms["gen_pl_n"] = "aliquōrum" forms["dat_sg_m"] = {"alicui", "aliquoi{†}"} forms["dat_sg_f"] = {"alicui", "aliquoi{†}"} forms["dat_sg_n"] = {"alicui", "aliquoi{†}"} forms["dat_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["acc_sg_m"] = "aliquem" forms["acc_sg_f"] = "aliquam" forms["acc_sg_n"] = "aliquod" forms["acc_pl_m"] = "aliquōs" forms["acc_pl_f"] = "aliquās" forms["acc_pl_n"] = "aliqua" forms["abl_sg_m"] = "aliquō" forms["abl_sg_f"] = "aliquā" forms["abl_sg_n"] = "aliquō" forms["abl_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} elseif arg1 == "quisquam" then insert_if_not(data.title, "determinante indefinido, concordancia en negativo") data.note = "En latín clásico, era preferidas las formas de ''ūllus'' en lugar de las esta voz para el femenino y el neutro." forms["nom_sg_m"] = "quisquam" forms["nom_sg_f"] = {"quaequam", "quisquam{†}"} forms["nom_sg_n"] = "quodquam" forms["nom_pl_m"] = "quīquam" forms["nom_pl_f"] = "quaequam" forms["nom_pl_n"] = "quaequam" forms["gen_sg_m"] = "cuiusquam" forms["gen_sg_f"] = "cuiusquam" forms["gen_sg_n"] = "cuiusquam" forms["gen_pl_m"] = "quōrumquam" forms["gen_pl_f"] = "quārumquam" forms["gen_pl_n"] = "quōrumquam" forms["dat_sg_m"] = "cuiquam" forms["dat_sg_f"] = "cuiquam" forms["dat_sg_n"] = "cuiquam" forms["dat_pl_m"] = "quibusquam" forms["dat_pl_f"] = "quibusquam" forms["dat_pl_n"] = "quibusquam" forms["acc_sg_m"] = "quemquam" forms["acc_sg_f"] = {"quamquam", "quemquam{†}"} forms["acc_sg_n"] = "quodquam" forms["acc_pl_m"] = "quōsquam" forms["acc_pl_f"] = "quāsquam" forms["acc_pl_n"] = "quaequam" forms["abl_sg_m"] = {"quōquam", "quīquam{†}"} forms["abl_sg_f"] = "quāquam" forms["abl_sg_n"] = "quōquam" forms["abl_pl_m"] = "quibusquam" forms["abl_pl_f"] = "quibusquam" forms["abl_pl_n"] = "quibusquam" forms["voc_sg_m"] = "quisquam" forms["voc_sg_f"] = "quaequam" forms["voc_sg_n"] = "quodquam" forms["voc_pl_m"] = "quīquam" forms["voc_pl_f"] = "quaequam" forms["voc_pl_n"] = "quaequam" elseif arg1 == "quisquis" then insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = "quisquis" forms["nom_sg_f"] = "quisquis" forms["nom_sg_n"] = {"quidquid", "quicquid"} forms["nom_pl_m"] = "quīquī" forms["nom_pl_f"] = "quaequae" forms["nom_pl_n"] = "quaequae" forms["gen_sg_m"] = "cuiuscuius" forms["gen_sg_f"] = "cuiuscuius" forms["gen_sg_n"] = "cuiuscuius" forms["gen_pl_m"] = "quōrumquōrum" forms["gen_pl_f"] = "quārumquārum" forms["gen_pl_n"] = "quōrumquōrum" forms["dat_sg_m"] = "cuicui" forms["dat_sg_f"] = "cuicui" forms["dat_sg_n"] = "cuicui" forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"} forms["acc_sg_m"] = "quemquem" forms["acc_sg_f"] = "quamquam" forms["acc_sg_n"] = {"quidquid", "quicquid"} forms["acc_pl_m"] = "quōsquōs" forms["acc_pl_f"] = "quāsquās" forms["acc_pl_n"] = "quaequae" forms["abl_sg_m"] = "quōquō" forms["abl_sg_f"] = "quāquā" forms["abl_sg_n"] = "quōquō" forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"} forms["voc_sg_m"] = "quisquis" forms["voc_sg_f"] = "quisquis" forms["voc_sg_n"] = {"quidquid", "quicquid"} forms["voc_pl_m"] = "quīquī" forms["voc_pl_f"] = "quaequae" forms["voc_pl_n"] = "quaequae" elseif arg1 == "ecquis" then insert_if_not(data.title, "pronombre interrogativo") forms["nom_sg_m"] = {"ecquis", "ecquī"} forms["nom_sg_f"] = {"ecqua", "ecquae"} forms["nom_sg_n"] = "ecquid" forms["nom_pl_m"] = "ecquī" forms["nom_pl_f"] = "ecquae" forms["nom_pl_n"] = {"ecqua", "ecquae"} forms["gen_sg_m"] = "eccuius" forms["gen_sg_f"] = "eccuius" forms["gen_sg_n"] = "eccuius" forms["dat_sg_m"] = "eccui" forms["dat_sg_f"] = "eccui" forms["dat_sg_n"] = "eccui" forms["acc_sg_m"] = "ecquem" forms["acc_sg_f"] = "ecquam" forms["acc_sg_n"] = "ecquod" forms["acc_pl_m"] = "ecquōs" forms["acc_pl_f"] = "ecquās" forms["acc_pl_n"] = {"ecqua", "ecquae"} forms["abl_sg_m"] = {"ecquō", "ecquī"} forms["abl_sg_f"] = {"ecquā", "ecquī"} forms["abl_sg_n"] = {"ecquō", "ecquī"} elseif arg1 == "quīdam" then insert_if_not(data.title, "pronombre indefinido") forms["nom_sg_m"] = "quīdam" forms["nom_sg_f"] = "quaedam" forms["nom_sg_n"] = "quiddam" forms["nom_pl_m"] = {"quīdam", "quēsdam{†}"} forms["nom_pl_f"] = "quaedam" forms["nom_pl_n"] = "quaedam" forms["gen_sg_m"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_f"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_n"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_pl_m"] = {"quōrundam", "quōrumdam"} forms["gen_pl_f"] = {"quārundam", "quārumdam"} forms["gen_pl_n"] = {"quōrundam", "quōrumdam"} forms["dat_sg_m"] = {"cuidam", "quoidam{†}"} forms["dat_sg_f"] = {"cuidam", "quoidam{†}"} forms["dat_sg_n"] = {"cuidam", "quoidam{†}"} forms["dat_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_n"] = {"quibusdam", "quīsdam{†}"} forms["acc_sg_m"] = {"quendam", "quemdam"} forms["acc_sg_f"] = {"quandam", "quamdam"} forms["acc_sg_n"] = "quiddam" forms["acc_pl_m"] = {"quōsdam", "quēsdam{†}"} forms["acc_pl_f"] = "quāsdam" forms["acc_pl_n"] = "quaedam" forms["abl_sg_m"] = "quōdam" forms["abl_sg_f"] = "quādam" forms["abl_sg_n"] = "quōdam" forms["abl_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_n"] = {"quibusdam", "quīsdam{†}"} elseif arg1 == "nēmō" then insert_if_not(data.title, "Determinante y pronombre, concordancia en negativo") forms["nom_sg_m"] = "nēmō" forms["nom_sg_f"] = "nēmō" forms["gen_sg_m"] = {"nūllī̆us", "nēminis{R}"} forms["gen_sg_f"] = {"nūllī̆us", "nēminis{R}"} forms["dat_sg_m"] = "nēminī" forms["dat_sg_f"] = "nēminī" forms["acc_sg_m"] = "nēminem" forms["acc_sg_f"] = "nēminem" forms["abl_sg_m"] = {"nūllō", "nēmine{R}"} forms["abl_sg_f"] = {"nūllā", "nēmine{R}"} else error('adjective ' .. arg1 .. ' not recognized') end end local function extract_base(lemma, ending) if ending:find("(", nil, true) then return match(lemma, ending) end return match(lemma, "^(.*)" .. ending .. "$") end local function get_noun_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local subtypes = ending_and_subtypes[2] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. -- In addition, M or F as a subtype is canceled by N, and -- vice-versa, but M doesn't cancel F or vice-versa; instead, -- we simply ignore the conflicting gender specification when -- constructing the combination of specified and inferred subtypes. -- The reason for this is that neuters have distinct declensions -- from masculines and feminines, but masculines and feminines have -- the same declension, and various nouns in Latin that are -- normally masculine are exceptionally feminine and vice-versa -- (nauta, agricola, fraxinus, malus "apple tree", manus, rēs, -- etc.). -- -- In addition, sg as a subtype is canceled by pl and vice-versa. -- It's also possible to specify both, which will override sg but -- not cancel it (in the sense that it won't prevent the relevant -- rule from matching). For example, there's a rule specifying that -- lemmas beginning with a capital letter and ending in -ius take -- the ius.voci.sg subtypes. Specifying such a lemma with the -- subtype both will result in the ius.voci.both subtypes, whereas -- specifying such a lemma with the subtype pl will cause this rule -- not to match, and it will fall through to a less specific rule -- that returns just the ius subtype, which will be combined with -- the explicitly specified pl subtype to produce ius.pl. if specified_subtypes["-" .. subtype] or subtype == "N" and (specified_subtypes.M or specified_subtypes.F) or (subtype == "M" or subtype == "F") and specified_subtypes.N or subtype == "sg" and specified_subtypes.pl or subtype == "pl" and specified_subtypes.sg then not_this_subtype = true break end end end if not not_this_subtype then if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] local base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending == stem2 then return base, stem2, subtypes end else local base = extract_base(lemma, ending) if base then return base, stem2, subtypes end end end end if decltype then error("Unrecognized ending for declension-" .. decltype .. " noun: " .. lemma) end return lemma, stem2, keys_to_list(specified_subtypes) end local patterns = { {"[mM]a", "%0t"}, {"e", ""}, {"([aoAO])([lr])", "%1" .. MACRON .. "%2"}, {"[eE]l", "%0l"}, {"([mM])en", "%1in"}, {"([tT]ūd)ō", "%1in"}, {"([gG])ō", "%1in"}, {"[ōŌ]", "%1n"}, {"er", "r"}, {"[ēi]s", ""}, {"([āēīōūȳĀĒĪŌŪȲ]n)s", function(v) return (gsub(toNFD(v), MACRON, "") .. "t") end}, {"([cC])eps", "%1ipit"}, {"([bp])s", "%1"}, {"us", "or"}, {"s", "t"}, {"ex", "ic"}, {"x", "c"}, } local function make_stem2(stem) local n for _, pattern in ipairs(patterns) do local key = pattern[1] stem, n = gsub(stem, key .. "$", pattern[2]) if n > 0 then -- debug_track("la-utilities/" .. key) REVISAR return toNFC(stem) end end -- debug_track("la-utilities") REVISAR return stem end local function detect_noun_subtype(lemma, stem2, typ, subtypes) local base, _ if typ == "1" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ām", {"F", "am"}}, {"ās", {"M", "Greek", "Ma"}}, {"ēs", {"M", "Greek", "Me"}}, {"ē", {"F", "Greek"}}, {"ae", {"F", "pl"}}, {"a", {"F"}}, }) elseif typ == "2" then local detected_subtypes lemma, stem2, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(.*r)$", {"M", "er"}}, {"^(.*v)os$", {"M", "vos"}}, {"^(.*v)om$", {"N", "vom"}}, -- If the lemma ends in -os and the user said N or -M, then the -- following won't apply, and the second (neuter) -os will applly. {"os", {"M", "Greek"}}, {"os", {"N", "Greek", "us"}}, {"on", {"N", "Greek"}}, -- -ius beginning with a capital letter is assumed a proper name, -- and takes the voci subtype (vocative in -ī) along with the ius -- subtype and sg-only. Other nouns in -ius just take the ius -- subtype. Explicitly specify "sg" so that if .pl is given, -- this rule won't apply. {"^(%u.*)ius$", {"M", "ius", "voci", "sg"}}, {"ius", {"M", "ius"}}, {"ium", {"N", "ium"}}, -- If the lemma ends in -us and the user said N or -M, then the -- following won't apply, and the second (neuter) -us will applly. {"us", {"M"}}, {"us", {"N", "us"}}, {"um", {"N"}}, {"iī", {"M", "ius", "pl"}}, {"ia", {"N", "ium", "pl"}}, -- If the lemma ends in -ī and the user said N or -M, then the -- following won't apply, and the second (neuter) -ī will applly. {"ī", {"M", "pl"}}, {"ī", {"N", "us", "pl"}}, {"oe", {"M", "Greek", "pl"}}, {"a", {"N", "pl"}}, }) stem2 = stem2 or lemma return lemma, stem2, detected_subtypes elseif typ == "3" then if subtypes.pl then if subtypes.Greek then base = lemma:match("^(.*)erēs$") if base then return base .. "ēr", base .. "er", {"er"} end base = lemma:match("^(.*)ontēs$") if base then return base .. "ōn", base .. "ont", {"on"} end base = lemma:match("^(.*)es$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural Greek noun: " .. lemma) end base = lemma:match("^(.*)ia$") if base then return base, stem2 or base, {"N", "I", "pure"} end base = lemma:match("^(.*)a$") if base then return base, stem2 or base, {"N"} end base = lemma:match("^(.*)ēs$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural noun: " .. lemma) end stem2 = stem2 or make_stem2(lemma) local detected_subtypes if subtypes.Greek then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"is", ""}, {"I"}}, {"ēr", {"er"}}, {"ōn", {"on"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} end if not subtypes.N then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"^(%u.*pol)is$", ""}, {"F", "polis", "sg", "loc"}}, {{"tūdō", "tūdin"}, {"F"}}, {{"tās", "tāt"}, {"F"}}, {{"tūs", "tūt"}, {"F"}}, {{"tiō", "tiōn"}, {"F"}}, {{"siō", "siōn"}, {"F"}}, {{"xiō", "xiōn"}, {"F"}}, {{"gō", "gin"}, {"F"}}, {{"or", "ōr"}, {"M"}}, {{"tr[iī]x", "trīc"}, {"F"}}, {{"is", ""}, {"I"}}, {{"^(%l.*)ēs$", ""}, {"I"}}, }) if base then return lemma, stem2, detected_subtypes end end base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"us", "or"}, {"N"}}, {{"us", "er"}, {"N"}}, {{"ma", "mat"}, {"N"}}, {{"men", "min"}, {"N"}}, {{"^(%u.*)e$", ""}, {"N", "sg"}}, {{"e", ""}, {"N", "I", "pure"}}, {{"al", "āl"}, {"N", "I", "pure"}}, {{"ar", "ār"}, {"N", "I", "pure"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} elseif typ == "4" then if subtypes.echo or subtypes.Callisto then base = lemma:match("^(.*)ō$") if not base then error("Declension-4 noun of subtype .echo or .Callisto should end in -ō: " .. lemma) end if subtypes.Callisto then return base, nil, {"F", "sg"} else return base, nil, {"F"} end end return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", {"M"}}, {"ū̆", {"N"}}, {"ūs", {"M", "pl"}}, {"ua", {"N", "pl"}}, }) elseif typ == "5" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"iēs", {"F", "i"}}, {"iēs", {"F", "i", "pl"}}, {"ēs", {"F"}}, {"ēs", {"F", "pl"}}, }) elseif typ == "sgpl" then return lemma, stem2, {} elseif typ == "irreg" and lemma == "domus" then -- [[domus]] auto-sets data.loc = true, but we need to know this -- before declining the noun so we can propagate it to other segments. return lemma, nil, {"loc"} elseif typ == "indecl" or typ == "irreg" and ( lemma == "Deus" or match(lemma, "^[IJ]ēs[uū]s$") or lemma == "Athōs" or lemma == "vēnum" ) then -- Indeclinable nouns, and certain irregular nouns, set data.num = "sg", -- but we need to know this before declining the noun so we can -- propagate it to other segments. return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", {"both"}}, {"", {"sg"}}, {"", {"pl"}}, }) elseif typ == "indecl" or typ == "irreg" then return lemma, nil, {} else return nil, nil, {} end end -- Given ENDINGS_AND_SUBTYPES (a list of four-tuples of ENDING, RETTYPE, -- SUBTYPES, PROCESS_RETVAL), check each ENDING in turn against LEMMA and -- STEM2. If it matches, return a four-tuple BASE, STEM2, RETTYPE, NEW_SUBTYPES -- where BASE is normally the remainder of LEMMA minus the ending, STEM2 is -- as passed in, RETTYPE is as passed in, and NEW_SUBTYPES is the same as -- SUBTYPES minus any subtypes beginning with a hyphen. If no endings match, -- throw an error if DECLTYPPE is non-nil, mentioning the DECLTYPE -- (user-specified declension); but if DECLTYPE is nil, just return the tuple -- nil, nil, nil, nil. -- -- In order for a given entry to match, ENDING must match and also the subtypes -- in SUBTYPES (a list) must not be incompatible with the passed-in -- user-specified subtypes SPECIFIED_SUBTYPES (a set, i.e. a table where the -- keys are strings and the value is always true). "Incompatible" means that -- a given SUBTYPE is specified in either one and -SUBTYPE in the other, or -- that "pl" is found in SPECIFIED_SUBTYPES and not in SUBTYPES. -- -- The ending spec in ENDINGS_AND_SUBTYPES is one of the following: -- -- 1. A simple string, e.g. "tūdō", specifying an ending. -- 2. A regex that should match the entire lemma (it should be anchored at -- the beginning with ^ and at the end with $), and contains a single -- capturing group to match the base. -- 3. A pair {SIMPLE_STRING_OR_REGEX, STEM2_ENDING} where -- SIMPLE_STRING_OR_REGEX is one of the previous two possibilities and -- STEM2_ENDING is a string specifying the corresponding ending that must -- be present in STEM2. If this form is used, the combination of -- base + STEM2_ENDING must exactly match STEM2 in order for this entry -- to be considered a match. An example is {"is", ""}, which will match -- lemma == "follis", stem2 == "foll", but not lemma == "lapis", -- stem2 == "lapid". -- -- If PROCESS_STEM2 is given and the returned STEM2 would be nil, call -- process_stem2(BASE) to get the STEM2 to return. local function get_adj_type_and_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes, process_stem2) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local rettype = ending_and_subtypes[2] local subtypes = ending_and_subtypes[3] local process_retval = ending_and_subtypes[4] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. if specified_subtypes["-" .. subtype] then not_this_subtype = true break end -- A subtype is canceled if the user specified SUBTYPE and -- -SUBTYPE is given in the to-be-returned subtypes. local must_not_be_present = subtype:match("^%-(.*)$") if must_not_be_present and specified_subtypes[must_not_be_present] then not_this_subtype = true break end end end if not not_this_subtype then local base if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending ~= stem2 then base = nil end else base = extract_base(lemma, ending) end if base then -- Remove subtypes of the form -SUBTYPE from the subtypes -- to be returned. local new_subtypes = {} for _, subtype in ipairs(subtypes) do if subtype:sub(1, 1) ~= "-" then insert(new_subtypes, subtype) end end if process_retval then base, stem2 = process_retval(base, stem2) end if process_stem2 then stem2 = stem2 or process_stem2(base) end return base, stem2, rettype, new_subtypes end end end if not decltype then return lemma, stem2, nil, keys_to_list(specified_subtypes) elseif decltype == "" then error("Unrecognized ending for adjective: " .. lemma) else error("Unrecognized ending for declension-" .. decltype .. " adjective: " .. lemma) end end -- Autodetect the type and subtype of an adjective given all the information -- specified by the user: lemma, stem2, declension type and specified subtypes. -- Four values are returned: the lemma base (i.e. the stem of the lemma, as -- required by the declension functions), the value of stem2 to pass to the -- declension function, the declension type and the autodetected subtypes. -- Note that this will not detect a given subtype if -SUBTYPE is specified for -- any subtype that would be returned, or if SUBTYPE is specified and -SUBTYPE -- is among the subtypes that would be returned (such subtypes are filtered out -- of the returned subtypes). local function detect_adj_type_and_subtype(lemma, stem2, typ, subtypes) local function base_as_stem2(base, stem2) return base, base end local function constant_base(baseval) return function(base, stem2) return baseval, nil end end local function decl12_stem2(base) return base end local function decl3_stem2(base) return make_stem2(base) end local decl12_entries = { {"us", "1&2+", {}}, {"a", "1&2+", {}}, {"um", "1&2+", {}}, {"ī", "1&2+", {"pl"}}, {"ae", "1&2+", {"pl"}}, {"a", "1&2+", {"pl"}}, -- Nearly all -os adjectives are greekA {"os", "1&2+", {"greekA", "-greekE"}}, {"os", "1&2+", {"greekE", "-greekA"}}, {"ē", "1&2+", {"greekE", "-greekA"}}, {"on", "1&2+", {"greekA", "-greekE"}}, {"on", "1&2+", {"greekE", "-greekA"}}, {"^(.*er)$", "1&2+", {"er"}}, {"^(.*ur)$", "1&2+", {"er"}}, {"^(h)ic$", "1&2+", {"ic"}}, } local decl3_entries = { {"^(.*er)$", "3-3+", {"I"}}, {"^(.*er)$", "3-3+", {}}, {"is", "3-2+", {"I"}}, {"is", "3-2+", {}}, {"e", "3-2+", {"I"}}, {"e", "3-2+", {}}, {"^(.*[ij])or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(.*[ij])or$", "3-C+", {}}, {"^(min)or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(min)or$", "3-C+", {}}, {"^(.*trīx)$", "3-def+", {"trix", "abl_i_e", "-abl_e_i"}}, {"^(.*trīx)$", "3-def+", {"trix"}}, {"^(.*tor)$", "3-def+", {"tor", "abl_i_e", "-abl_e_i"}}, {"^(.*tor)$", "3-def+", {"tor"}}, -- Detect -ēs as 3-1 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like quadripēs, volucripēs). -- Essentially, for declension-3 adjectives, we require that -- .pl is given if the lemma is plural. -- -- Most 3-1 adjectives are i-stem (e.g. audāx) so we require -I -- to be given with non-i-stem adjectives. The first entry below -- will apply when -I isn't given, the second when it is given. {"^(.*ēs)$", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"I"}}, {"^(.*ēs)$", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"par"}}, {"^(.*[ij])ōrēs$", "3-C+", {"pl"}}, {"^(min)ōrēs$", "3-C+", {"pl"}}, -- If .pl with -ēs, we don't know if the adjective is 3-1, 3-2 -- or 3-3. Since 3-2 is probably the most common, we infer it -- (as well as the fact that these adjectives *are* in a sense -- 3-2 since they have a distinct neuter in -(i)a. Note that -- we have two entries here; the first one will apply unless -- -I is given, and will infer an i-stem adjective; the second -- one will apply otherwise (and infer a non-i-stem 3-1 adjective). {"ēs", "3-2+", {"pl", "I"}, base_as_stem2}, {"ēs", "3-1+", {"pl", "par"}, base_as_stem2}, -- Same for neuters. {"ia", "3-2+", {"pl", "I"}, base_as_stem2}, {"a", "3-1+", {"pl", "par"}, base_as_stem2}, -- As above for -ēs but for miscellaneous singulars. {"", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"I"}}, {"", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"par"}}, } local function get_subtypes_and_endings(typ, f) local subtypes_and_endings = {} for _, v in ipairs(decl3_entries) do if f(v) then v = deep_copy(v) v[2] = typ insert(subtypes_and_endings, v) end end return subtypes_and_endings end local function compare(spec) return spec[2] == typ end if typ == "+" then local base, new_stem2, rettype, new_subtypes = get_adj_type_and_subtype_by_ending(lemma, stem2, nil, subtypes, decl12_entries, decl12_stem2) if rettype then return base, new_stem2, rettype, new_subtypes else return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) end elseif typ == "3+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) elseif typ == "1&2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl12_entries, decl12_stem2) elseif typ == "1-1+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"a", typ, {}}, {"ae", typ, {"pl"}}, }) elseif typ == "2-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", typ, {}}, {"um", typ, {}}, {"ī", typ, {"pl"}}, {"a", typ, {"pl"}}, {"os", typ, {"greek"}}, {"on", typ, {"greek"}}, {"oe", typ, {"greek", "pl"}}, }) elseif typ == "3-1+" then -- Use the specs from `decl3_entries`, but add the two i-stem 3-2+ specs when plural-only, as they're the same when 3-1+. local subtypes_and_endings = get_subtypes_and_endings(typ, function(spec) local spec1, spec2 = spec[1], spec[2] return spec2 == typ or (spec2 == "3-2+" and spec1 == "ēs" or spec1 == "ia") end) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-def+" then -- Like 3-1+ but defective in gender local subtypes_and_endings = get_subtypes_and_endings(typ, compare) insert(subtypes_and_endings, {"", typ, {"I"}}) insert(subtypes_and_endings, {"", typ, {"par"}}) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"is", typ, {}}, {"e", typ, {}}, -- Detect -ēs as 3-2 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like isoscelēs). Essentially, -- for declension-3 adjectives, we require that .pl is given -- if the lemma is plural. {"ēs", typ, {}}, {"ēs", typ, {"pl"}}, {"ia", typ, {"pl"}}, }, decl3_stem2) elseif typ == "3-3+" or typ == "3-P+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ēs", typ, {"pl"}, base_as_stem2}, {"ia", typ, {"pl"}, base_as_stem2}, {"", typ, {}}, }, decl3_stem2) elseif typ == "3-C+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, get_subtypes_and_endings(typ, compare), decl3_stem2) elseif typ == "irreg+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(duo)$", typ, {"pl"}}, {"^(ambō)$", typ, {"pl"}}, {"^(mīll?ia)$", typ, {"N", "pl"}, constant_base("mīlle")}, -- match ea {"^(ea)$", typ, {}, constant_base("is")}, -- match id {"^(id)$", typ, {}, constant_base("is")}, -- match plural eī, iī {"^([ei]ī)$", typ, {"pl"}, constant_base("is")}, -- match plural ea, eae {"^(eae?)$", typ, {"pl"}, constant_base("is")}, -- match eadem {"^(eadem)$", typ, {}, constant_base("īdem")}, -- match īdem, idem {"^([īi]dem)$", typ, {}, constant_base("īdem")}, -- match plural īdem {"^(īdem)$", typ, {"pl"}}, -- match plural eadem, eaedem {"^(eae?dem)$", typ, {"pl"}, constant_base("īdem")}, -- match illa, ipsa, ista; it doesn't matter if we overmatch because -- we'll get an error as we use the stem itself in the returned base {"^(i[lps][lst])a$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match illud, istud; as above, it doesn't matter if we overmatch {"^(i[ls][lt])ud$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match ipsum {"^(ipsum)$", typ, {}, constant_base("ipse")}, -- match plural illī, ipsī, istī; as above, it doesn't matter if we -- overmatch {"^(i[lps][lst])ī$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- match plural illa, illae, ipsa, ipsae, ista, istae; as above, it -- doesn't matter if we overmatch {"^(i[lps][lst])ae?$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- Detect quī as non-plural unless .pl specified. {"^(quī)$", typ, {}}, -- Otherwise detect quī as plural. {"^(quī)$", typ, {"pl"}}, -- Same for quae. {"^(quae)$", typ, {}, constant_base("quī")}, {"^(quae)$", typ, {"pl"}, constant_base("quī")}, {"^(quid)$", typ, {}, constant_base("quis")}, {"^(quod)$", typ, {}, constant_base("quī")}, {"^(qui[cd]quid)$", typ, {}, constant_base("quisquis")}, {"^(quīquī)$", typ, {"pl"}, constant_base("quisquis")}, {"^(quaequae)$", typ, {"pl"}, constant_base("quisquis")}, -- match all remaining lemmas in lemma form {"", typ, {}}, }) elseif typ == "indecl+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", typ, {"both"}}, {"", typ, {"sg"}}, {"", typ, {"pl"}}, }) else -- 0+ return lemma, nil, typ, {} end end local noun_lb = { nom_sg = "sg.", gen_sg = "sg.", dat_sg = "sg.", acc_sg = "sg.", abl_sg = "sg.", voc_sg = "sg.", loc_sg = "sg.", nom_pl = "pl.", gen_pl = "pl.", dat_pl = "pl.", acc_pl = "pl.", abl_pl = "pl.", voc_pl = "pl.", loc_pl = "pl." } function export.sust(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de = "num"}, ["nota"] = {}, } for form,_ in pairs(noun_lb) do params[form] = {lista=true} end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local genero local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, detected_subtypes = detect_noun_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end if not genero then if types.M then genero = "m" end if types.N then genero = "n" end if types.F then genero = "f" end end local es_adj if not r1 and genero then local typ r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) if r1 then c = typ es_adj = true end end assert(r1, "forma no reconocida: "..r[1]) local cb = es_adj and adj_decl[c] or noun_decl[c] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) if es_adj then local forms_ = {} for form,arr in pairs(data.forms) do local f1, f2 = form:match("^(.*)(_"..genero..")$") if f1 then forms_[f1] = arr end end data.forms = forms_ end if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, noun_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if declinfo["loc_sg"] and #declinfo["loc_sg"] == 0 then declinfo["loc_sg"] = nil end if declinfo["loc_pl"] and #declinfo["loc_pl"] == 0 then declinfo["loc_pl"] = nil end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local forms = sobreescribir_formas(declinfo, args, false, {}) comprobar_defectivo(forms, {}) forms = desactivar_formas(forms, function (form) return (form:find("pl$") and nopl) or (form:find("sg$") and nosg) end ) local raiz_nom = f(forms["nom_sg"][1] or forms["nom_pl"][1] or "?") local raiz_gen = f(forms["gen_sg"][1] or forms["gen_pl"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, noun_lb) local t = {} insert(t, {{""}, {"Singular"}, {"Plural"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg"], forms["nom_pl"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg"], forms["gen_pl"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg"], forms["dat_pl"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg"], forms["acc_pl"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg"], forms["abl_pl"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg"], forms["voc_pl"]}) if (forms["loc_sg"] and forms["loc_sg"][1]) or (forms["loc_pl"] and forms["loc_pl"][1]) then insert(t, {{"Locativo", header=true, color=COLOR_H}, forms["loc_sg"], forms["loc_pl"]}) end insert(t, {{args["nota"] or "", colspan=3}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_nom..", "..raiz_gen.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local adj_lb = { nom_sg_m = "m.", nom_sg_n = "n.", nom_sg_f = "f.", nom_pl_m = "m.", nom_pl_n = "n.", nom_pl_f = "f.", gen_sg_m = "m.", gen_sg_n = "n.", gen_sg_f = "f.", gen_pl_m = "m.", gen_pl_n = "n.", gen_pl_f = "f.", dat_sg_m = "m.", dat_sg_n = "n.", dat_sg_f = "f.", dat_pl_m = "m.", dat_pl_n = "n.", dat_pl_f = "f.", acc_sg_m = "m.", acc_sg_n = "n.", acc_sg_f = "f.", acc_pl_m = "m.", acc_pl_n = "n.", acc_pl_f = "f.", abl_sg_m = "m.", abl_sg_n = "n.", abl_sg_f = "f.", abl_pl_m = "m.", abl_pl_n = "n.", abl_pl_f = "f.", voc_sg_m = "m.", voc_sg_n = "n.", voc_sg_f = "f.", voc_pl_m = "m.", voc_pl_n = "n.", voc_pl_f = "f.", } function export.adj(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de="num"}, ["gen"] = {por_defecto="mfn"}, ["nota"] = {}, } for form,_ in pairs(adj_lb) do params[form] = {lista=true} end params["dat_pl"] = {lista=true} params["abl_pl"] = {lista=true} params["loc_pl"] = {lista=true} local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) if args["dat_pl"][1] then args["dat_pl_m"] = deep_copy(args["dat_pl"]) args["dat_pl_n"] = deep_copy(args["dat_pl"]) args["dat_pl_f"] = deep_copy(args["dat_pl"]) end if args["abl_pl"][1] then args["abl_pl_m"] = deep_copy(args["abl_pl"]) args["abl_pl_n"] = deep_copy(args["abl_pl"]) args["abl_pl_f"] = deep_copy(args["abl_pl"]) end if args["loc_pl"][1] then args["loc_pl_m"] = deep_copy(args["loc_pl"]) args["loc_pl_n"] = deep_copy(args["loc_pl"]) args["loc_pl_f"] = deep_copy(args["loc_pl"]) end args["dat_pl"] = nil args["abl_pl"] = nil args["loc_pl"] = nil assert(not find(title, " "), "locuciones no soportadas aún") -- REVISAR local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") a = a or subarg b = b or "+" local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end local cb = adj_decl[typ] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) local formas_ = {} -- necesario crear otro arreglo para no modificar las claves durante la iteración for form,arr in pairs(data.forms) do local pref = match(form, "^(.*)_m$") if pref and not data.forms[pref.."_f"] then formas_[pref.."_f"] = deep_copy(arr) end if pref and not data.forms[pref.."_n"] then formas_[pref.."_n"] = deep_copy(arr) end formas_[form] = arr end data.forms = formas_ if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, adj_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local m = find(args["gen"], "m") local fem = find(args["gen"], "f") local n = find(args["gen"], "n") local forms = sobreescribir_formas(declinfo, args, false, {}, adj_lb) comprobar_defectivo(forms) forms = desactivar_formas(forms, function (form) return (form:find("pl") and nopl) or (form:find("sg") and nosg) or (form:find("m$") and not m) or (form:find("f$") and not fem) or (form:find("n$") and not n) end ) local raiz_m = f(forms["nom_sg_m"][1] or forms["nom_pl_m"][1] or "?") local raiz_f = f(forms["nom_sg_f"][1] or forms["nom_pl_f"][1] or "?") local raiz_n = f(forms["nom_sg_n"][1] or forms["nom_pl_n"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, adj_lb) local t = {} insert(t, {{"Singular", colspan=4}, header=true, color=COLOR_H}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg_m"], forms["nom_sg_f"], forms["nom_sg_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg_m"], forms["gen_sg_f"], forms["gen_sg_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg_m"], forms["dat_sg_f"], forms["dat_sg_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg_m"], forms["acc_sg_f"], forms["acc_sg_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg_m"], forms["abl_sg_f"], forms["abl_sg_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg_m"], forms["voc_sg_f"], forms["voc_sg_n"]}) insert(t, {{"Plural", colspan=4, header=true, color=COLOR_H}}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_pl_m"], forms["nom_pl_f"], forms["nom_pl_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_pl_m"], forms["gen_pl_f"], forms["gen_pl_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_pl_m"], forms["dat_pl_f"], forms["dat_pl_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_pl_m"], forms["acc_pl_f"], forms["acc_pl_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_pl_m"], forms["abl_pl_f"], forms["abl_pl_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_pl_m"], forms["voc_pl_f"], forms["voc_pl_n"]}) insert(t, {{args["nota"] or "", colspan=4}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_m..", "..raiz_f..", "..raiz_n.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local EGO, TU, IS, NOS, VOS, EI = 1, 2, 3, 4, 5, 6 local tostr = {"1", "2", "3", "4", "5", "6"} local PRONOMBRES = {"ego", "tū", "is, ea, id", "nōs", "vōs", "eī, eae, ea"} local PRONOMBRES_SUBJ = {"ut ego", "ut tū", "ut is, ut ea, ut id", "ut nōs", "ut vōs", "ut eī, ut eae, ut ea"} local PRONOMBRES_IMP = {"―", "(tū)", "(is, ea, id)", "―", "(vōs)", "(eī, eae, ea)"} local IMPERSONALES = {"", "", "(id)", "", "", ""} local function obtener_pronombre(forma, impers) local conj, p = match(forma, "^(.*)(%d)$") if not p then return nil end p = tonumber(p) if impers then return IMPERSONALES[p] else if find(conj, "^subj") then return PRONOMBRES_SUBJ[p] end if find(conj, "^imper") then return PRONOMBRES_IMP[p] end return PRONOMBRES[p] end end local sufijos = { ["1"] = { inf_act = {"āre","isse"}, inf_pas = {"ārī"}, part_act = {"āns","ūrus"}, part_pas = {"andus","us"}, ger = {"andī","andō","andum"}, sup = {"um","ū"}, ind_pres = {"ō","ās","at","āmus","ātis","ant"}, ind_imp = {"ābam","ābās","ābat","ābāmus","ābātis","ābant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ābō","ābis","ābit","ābimus","ābitis","ābunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","āris","ātur","āmur","āminī","antur", nil,"āre"}, ind_imp_pas = {"ābar","ābāris","ābātur","ābāmur","ābāminī","ābantur", nil,"ābāre"}, ind_fut_pas = {"ābor","āberis","ābitur","ābimur","ābiminī","ābuntur", nil,"ābere"}, subj_pres = {"em","ēs","et","ēmus","ētis","ent"}, subj_imp = {"ārem","ārēs","āret","ārēmus","ārētis","ārent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"er","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_imp_pas = {"ārer","ārēris","ārētur","ārēmur","ārēminī","ārentur", nil,"ārēre"}, imper_pres = {nil,"ā",nil,nil,"āte",nil}, imper_fut = {nil,"ātō","ātō",nil,"ātōte","antō"}, imper_pres_pas = {nil,"āre",nil,nil,"āminī",nil}, imper_fut_pas = {nil,"ātor","ātor",nil,nil,"antor"}, }, ["2"] = { inf_act = {"ēre","isse"}, inf_pas = {"ērī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"eō","ēs","et","ēmus","ētis","ent"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ēbō","ēbis","ēbit","ēbimus","ēbitis","ēbunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"eor","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ēbor","ēberis","ēbitur","ēbimur","ēbiminī","ēbuntur", nil,"ēbere"}, subj_pres = {"eam","eās","eat","eāmus","eātis","eant"}, subj_imp = {"ērem","ērēs","ēret","ērēmus","ērētis","ērent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ear","eāris","eātur","eāmur","eāminī","eantur", nil,"eāre"}, subj_imp_pas = {"ērer","ērēris","ērētur","ērēmur","ērēminī","ērentur", nil,"ērēre"}, imper_pres = {nil,"ē",nil,nil,"ēte",nil}, imper_fut = {nil,"ētō","ētō",nil,"ētōte","entō"}, imper_pres_pas = {nil,"ēre",nil,nil,"ēminī",nil}, imper_fut_pas = {nil,"ētor","ētor",nil,nil,"entor"}, }, ["3"] = { -- 3 (comparar [[capio]] con [[lego]], las raíces con capi- y leg- pero hay que eliminar la doble ii) inf_act = {"ere","isse"}, inf_pas = {"ī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", nil,"ere"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_pres = {"am","ās","at","āmus","ātis","ant"}, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", nil,"āre"}, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", nil,"erēre"}, imper_pres = {nil,"e",nil,nil,"ite",nil}, imper_fut = {nil,"itō","itō",nil,"itōte","untō"}, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil}, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor"}, }, ["3/4"] = { inf_act = {"ere","isse","īre","isse"}, inf_pas = {"ī","īrī"}, part_act = {"ēns","iēns","ūrus"}, part_pas = {"endus","iendus","us"}, ger = {"endī","endō","endum","iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt", "iō","īs",nil,"īmus","ītis","iunt" }, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant", "iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant" }, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent", "iam","iēs","iet","iēmus","iētis","ient" }, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", "ior","ere","ītur","īmur","īminī","iuntur", nil,"īris",nil,nil,nil,nil, nil,"īre" }, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", "iēbar","ēbāre","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāris",nil,nil,nil,nil, nil,"iēbāre" }, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", "iar","ēre","iētur","iēmur","iēminī","ientur", nil,"iēris",nil,nil,nil,nil, nil,"iēre" }, subj_pres = {"am","ās","at","āmus","ātis","ant", "iam","iās","iat","iāmus","iātis","iant", }, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent", "īrem","īrēs","īret","īrēmus","īrētis","īrent" }, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", "iar","āre","iātur","iāmur","iāminī","iantur", nil,"iāris",nil,nil,nil,nil, nil,"iāre" }, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", "īrer","erēre","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēris",nil,nil,nil,nil, nil,"īrēre" }, imper_pres = {nil,"e",nil,nil,"ite",nil, nil,"ī",nil,nil,"īte",nil }, imper_fut = {nil,"itō","itō",nil,"itōte","untō", nil,"ītō","ītō",nil,"ītōte","iuntō" }, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil, nil,"īre",nil,nil,"īminī",nil }, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor", nil,"ītor","ītor",nil,nil,"iuntor" }, }, ["4"] = { inf_act = {"īre","isse"}, inf_pas = {"īrī"}, part_act = {"iēns","ūrus"}, part_pas = {"iendus","us"}, ger = {"iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"iō","īs","it","īmus","ītis","iunt"}, ind_imp = {"iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"iam","iēs","iet","iēmus","iētis","ient"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"ior","īris","ītur","īmur","īminī","iuntur", nil,"īre"}, ind_imp_pas = {"iēbar","iēbāris","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāre"}, ind_fut_pas = {"iar","iēris","iētur","iēmur","iēminī","ientur", nil,"iēre"}, subj_pres = {"iam","iās","iat","iāmus","iātis","iant"}, subj_imp = {"īrem","īrēs","īret","īrēmus","īrētis","īrent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"iar","iāris","iātur","iāmur","iāminī","iantur", nil,"iāre"}, subj_imp_pas = {"īrer","īrēris","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēre"}, imper_pres = {nil,"ī",nil,nil,"īte",nil}, imper_fut = {nil,"ītō","ītō",nil,"ītōte","iuntō"}, imper_pres_pas = {nil,"īre",nil,nil,"īminī",nil}, imper_fut_pas = {nil,"ītor","ītor",nil,nil,"iuntor"}, } } local formas_no_personales = { inf_act = true, inf_pas = true, part_act = true, part_pas = true, ger = true, sup = true, } local formas_personales = { ind_pres = true, ind_imp = true, ind_perf = true, ind_pluperf = true, ind_fut = true, ind_fut_perf = true, ind_fut_sig = true, ind_pres_pas = true, ind_imp_pas = true, ind_fut_pas = true, subj_pres = true, subj_imp = true, subj_perf = true, subj_pluperf = true, subj_aor_sig = true, subj_pres_pas = true, subj_imp_pas = true, imper_pres = true, imper_fut = true, imper_pres_pas = true, imper_fut_pas = true, } local formas = merge(formas_no_personales, formas_personales) local verbos_irregulares = { {"aiō", {"aiō", "aiiō", "aijō", "ajō"}, { desactivar = {"inf_pas","part_pas","ger","sup","ind_pluperf","ind_fut","ind_fut_perf", "ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_perf","subj_pluperf","subj_pres_pas", "subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {"ai"}, nucleoperf = {"a"}, nucleosup = {}, nucleosigm = {}, inf_act = {"aiere"}, ind_pres = {nil,nil,nil,{}}, ind_perf = {{},nil,nil,{},{}}, subj_pres = {nil,nil,nil,{},{}}, subj_imp = {{},{},nil,{},{},{}}, imper_pres = {{},{"ai"},{},{},{},{}}, }}, {"cedo", {"cedo"}, { desactivar = {"inf_act","inf_pas","part_act","part_pas","ger","sup","ind_pluperf","ind_pres","ind_imp","ind_perf", "ind_fut","ind_fut_perf","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres","subj_imp","subj_perf", "subj_pluperf","subj_pres_pas","subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, imper_pres = {nil,{"cedo"},nil,nil,{"cette","cedile"},nil}, }}, {"dīcō", {"dīcō"}, { conj = "3", nucleopres = {"dīc"}, nucleoperf = {"dīx"}, nucleosup = {"dict"}, nucleosigm = {"dīx"}, desactivar = {}, part_pas = {"dīcendus", "dīcundus", "dictus"}, imper_pres = {nil, {"dīc", "dīce"}}, inf_pas = {"dīcī", "dīcier{L}"}, }}, {"dō", {"dō"}, { conj = "1", nucleopres = {"d"}, nucleoperf = {"ded"}, nucleosup = {"dat"}, nucleosigm = {}, desactivar = {}, inf_act = {"dare","dedisse"}, inf_pas = {"darī"}, ind_pres = {nil,nil,nil,{"damus"},{"datis"},nil}, ind_imp = {{"dabam"},{"dabās"},{"dabat"},{"dabāmus"},{"dabātis"},{"dabant"}}, ind_fut = {{"dabō"},{"dabis"},{"dabit"},{"dabimus"},{"dabitis"},{"dabunt"}}, ind_imp_pas = {{"dabar"},{"dabāris","dabāre"},{"dabātur"},{"dabāmur"},{"dabāminī"},{"dabantur"}}, ind_fut_pas = {{"dabor"},{"daberis","dabere"},{"dabitur"},{"dabimur"},{"dabiminī"},{"dabuntur"}}, subj_imp = {{"darem"},{"darēs"},{"daret"},{"darēmus"},{"darētis"},{"darent"}}, subj_imp_pas = {{"darer"},{"darēris","darēre"},{"darētur"},{"darēmur"},{"darēminī"},{"darentur"}}, imper_pres = {nil,nil,nil,nil,{"date"},nil}, imper_fut = {nil,{"datō"},{"datō"},nil,{"datōte"},{"dantō"}}, imper_pres_pas = {nil,{"dare"},nil,nil,{"daminī"},nil}, imper_fut_pas = {nil,{"dator"},{"dator"},nil,nil,{"dator"}}, }}, {"dūcō", {"dūcō"}, { conj = "3", nucleopres = {"dūc"}, nucleoperf = {"dūx"}, nucleosup = {"duct"}, nucleosigm = {}, desactivar = {}, imper_pres = {nil, {"dūc", "dūce"}}, }}, {"edō", {"edō", "ëdō"}, { conj = "3", nucleopres = {"ed"}, nucleoperf = {"ed"}, nucleosup = {""}, nucleosigm = {}, desactivar = {}, inf_act = {"edere","ēsse"}, part_act = {"edēns","ēsūrus","ēssūrus","ēstūrus"}, part_pas = {"edendus","edundus","ēsus","ēssus","ēstus"}, sup = {"ēsum","ēssum","ēstum","ēsū","ēssū","ēstū"}, ind_pres = {nil,{"edis","ēs"},{"edit","ēst"},nil,{"editis","ēstis"},nil}, ind_pres_pas = {nil,{"ederis","edere","ēssis","ēsse"},{"editur","ēstur"}}, subj_pres = {{"edam","edim"},{"edās","edīs"},{"edat","edit","ēst"},{"edāmus","edīmus"},{"edātis","edītis"},{"edant","edint"}}, subj_imp = {{"ederem","ēssem"},{"ederēs","ēssēs"},{"ederet","ēsset"},{"ederēmus","ēssēmus"},{"ederētis","ēssētis"},{"ederent","ēssent"}}, subj_imp_pas = {{"ederer","ēsser"},{"ederēris","ederēre","ēssēris","ēssēre"},{"ederetur","ēssetur"},{"ederēmur","ēssēmur"},{"ederēminī","ēssēminī"},{"ederentur","ēssentur"}}, imper_pres = {nil,{"ede","ēs"},nil,nil,{"edite","ēste"},nil}, imper_fut = {nil,{"editō","ēstō"},{"editō","ēstō"},nil,{"editōte","ēstōte"},{"eduntō"}}, imper_pres_pas = {nil,{"edere","ēsse"},nil,nil,{"ediminī"},nil}, imper_fut_pas = {nil,{"editor","ēstor"},{"editor","ēstor"},nil,nil,{"eduntor"}}, }}, {"eō", {"eō", "ëō"}, { conj = "4", nucleopres = {""}, nucleoperf = {""}, nucleosup = {""}, nucleosigm = {}, desactivar = {"imper_pres_pas"}, inf_act = {"īre","īsse","iisse","īvisse"}, inf_pas = {"īrī","īrier"}, part_act = {"iēns","itūrus"}, part_pas = {"eundum","itum"}, ger = {"eundī","eundō","eundum"}, sup = {"itum","itū"}, ind_pres = {{"eō"},{"īs"},{"it"},{"īmus"},{"ītis"},{"eunt"}}, ind_imp = {{"ībam"},{"ībās"},{"ībat"},{"ībāmus"},{"ībātis"},{"ībant"}}, ind_perf = {{"iī","īvī"},{"īstī","iistī","īvistī"},{"iit","īvit"},{"iimus","īvimus"},{"īstis","iistis","īvistis"},{"iērunt","iēre","īvērunt","īvēre"}}, ind_pluperf = {{"ieram","īveram"},{"ierās","īverās"},{"ierat","īverat"},{"ierāmus","īverāmus"},{"ierātis","īverātis"},{"ierant","īverant"}}, ind_fut = {{"ībō"},{"ībis"},{"ībit"},{"ībimus"},{"ībitis"},{"ībunt"}}, ind_fut_perf = {{"ierō","īverō"},{"ieris","īveris"},{"ierit","īverit"},{"ierimus","īverimus"},{"ieritis","īveritis"},{"ierint","īverint"}}, ind_fut_sig = {nil,nil,nil,nil,nil,nil}, ind_pres_pas = {{},{},{"ītur"},{},{},{}}, ind_imp_pas = {{},{},{"ībātur"},{},{},{}}, ind_fut_pas = {{},{},{"ībitur"},{},{},{}}, subj_pres = {{"eam"},{"eās"},{"eat"},{"eāmus"},{"eātis"},{"eant"}}, subj_imp = {{"īrem"},{"īrēs"},{"īret"},{"īrēmus"},{"īrētis"},{"īrent"}}, subj_perf = {{"ierim","īverim"},{"ierīs","īverīs"},{"ierit","īverit"},{"ierīmus","īverīmus"},{"ierītis","īverītis"},{"ierint","īverint"}}, subj_pluperf = {{"īssem","iissem","īvissem"},{"īssēs","iissēs","īvissēs"},{"īsset","iisset","īvisset"},{"īssēmus","iissēmus","īvissēmus"},{"īssētis","iissētis","īvissētis"},{"īssent","iissent","īvissent"}}, subj_aor_sig = {nil,nil,nil,nil,nil,nil}, subj_pres_pas = {{},{},{"eātur"},{},{},{}}, subj_imp_pas = {{},{},{"īrētur"},{},{},{}}, imper_pres = {nil,nil,nil,nil,nil,nil}, imper_fut = {nil,nil,nil,nil,nil,{"euntō"}}, imper_fut_pas = {nil,{},nil,nil,nil,{}}, }}, {"faciō", {"faciō"}, { conj = "3", I = true, inf_act = {"facere", "fāre{L}", "fēcisse"}, inf_pas = {"fierī"}, part_pas = {"faciendus", "faciundus", "factus"}, nucleopres = {"fac"}, nucleoperf = {"fēc"}, nucleosup = {"fact"}, nucleosigm = {"fax","faxs","facs"}, desactivar = {}, ind_pres_pas = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, ind_imp_pas = {{"fīēbam"},{"fīēbās"},{"fīēbat"},{"fīēbāmus"},{"fīēbātis"},{"fīēbant"}}, ind_fut_pas = {{"fīam"},{"fīēs"},{"fīet"},{"fīēmus"},{"fīētis"},{"fīent"}}, subj_pres_pas = {{"fīam"},{"fīās"},{"fīat"},{"fīāmus"},{"fīātis"},{"fīant"}}, subj_imp_pas = {{"fierem"},{"fierēs"},{"fieret"},{"fierēmus"},{"fierētis"},{"fierent"}}, imper_pres = {nil,{"fac","face"},nil,nil,nil,nil}, imper_pres_pas = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut_pas = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"ferō", {"ferō"}, { conj = "3", nucleopres = {"fer"}, nucleoperf = {"tul", "tetul{†}"}, nucleosup = {"lāt"}, nucleosigm = {}, desactivar = {}, inf_act = {"ferre", "tulisse", "tetulisse{†}"}, inf_pas = {"ferrī"}, ind_pres = {nil,{"fers"},{"fert"},nil,{"fertis"}}, ind_pres_pas = {nil,{"ferris","ferre"}}, subj_imp = {{"ferrem"},{"ferrēs"},{"ferret"},{"ferrēmus"},{"ferrētis"},{"ferrent"}}, subj_imp_pas = {{"ferrer"},{"ferrēris","ferrēre"},{"ferrētur"},{"ferrēmur"},{"ferrēminī"},{"ferrentur"}}, imper_pres = {nil,{"fer"},nil,nil,{"ferte"},nil}, imper_pres_pas = {nil,{"ferre"},nil,nil,nil,nil}, imper_fut = {nil,{"fertō"},{"fertō"},nil,{"fertōte"},{"feruntō"}}, imper_fut_pas = {nil,{"fertor"},{"fertor"},nil,nil,nil}, }}, {"fīō", {"fīō"}, { conj = "3", nucleopres = {"fī"}, nucleoperf = {}, nucleosup = {"fact"}, nucleosigm = {}, semidep = true, desactivar = {}, inf_act = {"fierī"}, ind_pres = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, imper_pres = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"inquam", {"inquam"}, { conj = "3", nucleopres = {"inqu"}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, nopasivo = true, desactivar = {"inf_act","inf_pas","part_pas","ger"}, ind_pres = {{"inquam"}}, }}, {"possum", {"possum"}, { conj = "3", nucleopres = {"pot"}, nucleoperf = {"pot"}, nucleosup = {}, nucleosigm = {}, pres = "possō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"posse","potesse{†}"}, part_act = {"potēns"}, ind_pres = {{"possum"},{"potes"},{"potest"},{"possumus"},{"potestis"},{"possunt"}}, ind_imp = {{"poteram"},{"poterās"},{"poterat"},{"poterāmus"},{"poterātis"},{"poterant"}}, ind_fut = {{"poterō"},{"poteris","potere"},{"poterit"},{"poterimus"},{"poteritis"},{"poterunt"}}, ind_perf = {{"potuī"},{"potuistī"},{"potuit"},{"potuimus"},{"potuistis"},{"potuērunt","potuēre"}}, ind_pluperf = {{"potueram"},{"potuerās"},{"potuerat"},{"potuerāmus"},{"potuerātis"},{"potuerant"}}, ind_fut_perf = {{"potuerō"},{"potueris"},{"potuerit"},{"potuerimus"},{"potueritis"},{"potuerunt"}}, subj_pres = {{"possem"},{"possēs"},{"possēt"},{"possēmus"},{"possētis"},{"possent"}}, subj_imp = {{"possim"},{"possīs"},{"possit"},{"possīmus"},{"possītis"},{"possint"}}, subj_perf = {{"potuerim"},{"potuerīs"},{"potuerit"},{"potuerīmus"},{"potuerītis"},{"potuerint"}}, subj_pluperf = {{"potuissem"},{"potuissēs"},{"potuisset"},{"potuissēmus"},{"potuissētis"},{"potuissent"}}, }}, {"sum", {"sum"}, { conj = "3", nucleopres = {"s"}, nucleoperf = {"fu"}, nucleosup = {}, nucleosigm = {}, pres = "sō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres_pas","imper_fut_pas"}, inf_act = {"esse"}, part_act = {"futūrus"}, ind_pres = {{"sum"},{"es"},{"est"},{"sumus"},{"estis"},{"sunt"}}, ind_imp = {{"eram"},{"erās"},{"erat"},{"erāmus"},{"erātis"},{"erant"}}, ind_fut = {{"erō"},{"eris","ere"},{"erit"},{"erimus"},{"eritis"},{"erunt"}}, subj_pres = {{"sim","siem","fuam{†}"},{"sīs","siēs","fuās{†}"},{"sit","siet","fuat{†}"},{"sīmus","siēmus","fuāmus{†}"},{"sītis","siētis","fuātis{†}"},{"sint","sient","fuant{†}"}}, subj_imp = {{"essem","forem"},{"essēs","forēs"},{"esset","foret"},{"essēmus","forēmus"},{"essētis","forētis"},{"essent","forent"}}, imper_pres = {nil,{"es"},nil,nil,{"este"},nil}, imper_fut = {nil,{"estō"},{"estō"},nil,{"estōte"},nil}, }}, {"mālō", {"mālō"}, { conj = "3", nucleopres = {"māl"}, nucleoperf = {"mālu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"mālle","māluisse"}, ind_pres = {{"mālō"},{"māvīs"},{"māvult"},{"mālumus"},{"māvultis"},{"mālunt"}}, subj_pres = {{"mālim"},{"mālīs"},{"mālit"},{"mālīmus"},{"mālītis"},{"mālint"}}, subj_imp = {{"māllem"},{"māllēs"},{"māllet"},{"māllēmus"},{"māllētis"},{"māllent"}}, }}, {"nōlō", {"nōlō"}, { conj = "3", nucleopres = {"nōl"}, nucleoperf = {"nōlu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"nōlle","nōluisse"}, ind_pres = {{"nōlō"},{"nōn vīs","nevīs{†}"},{"nōn vult","nōn volt","nevolt{†}"},{"nōlumus"},{"nōn vultis","nōn voltis","nōltis{†}"},{"nōlunt"}}, subj_pres = {{"nōlim"},{"nōlīs"},{"nōlit"},{"nōlīmus"},{"nōlītis"},{"nōlint"}}, subj_imp = {{"nōllem"},{"nōllēs"},{"nōllet"},{"nōllēmus"},{"nōllētis"},{"nōllent"}}, }}, {"volō", {"volō"}, { conj = "3", nucleopres = {"vol"}, nucleoperf = {"volu"}, nucleosup = {"volit"}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"velle","voluisse"}, ind_pres = {{"volō"},{"vīs"},{"vult","volt{†}"},{"volumus"},{"vultis","voltis{†}"},{"volunt"}}, subj_pres = {{"velim","volim{†}"},{"velīs","volīs{†}"},{"velit","volit{†}"},{"velīmus","volīmus{†}"},{"velītis","volītis{†}"},{"velint","volint{†}"}}, subj_imp = {{"vellem"},{"vellēs"},{"vellet"},{"vellēmus"},{"vellētis"},{"vellent"}}, }}, } local function combinar_prefijo_nucleosufijo(prefijo, nucleosufijo) return prefijo..nucleosufijo end local function combinar_nucleo_sufijo(nucleo, sufijo, agregar_i) if agregar_i and (not find(sufijo, "^[iī]")) and (sufijo ~= "e") and (not find(sufijo, "^er")) then return nucleo.."~i~"..sufijo end return nucleo..sufijo end local function agregar_forma(conjugado, conjinfo, forma) conjinfo[forma] = conjinfo[forma] or {} local sufijos_ = sufijos[conjinfo.conj][forma] local nucleos local prefijo if forma == "sup" then nucleos = conjinfo.nucleosup prefijo = conjinfo.prefijosup or conjinfo.prefijo elseif find(forma, "sig") then nucleos = conjinfo.nucleosigm prefijo = conjinfo.prefijosigm or conjinfo.prefijo elseif find(forma, "perf") then nucleos = conjinfo.nucleoperf prefijo = conjinfo.prefijoperf or conjinfo.prefijo else nucleos = conjinfo.nucleopres prefijo = conjinfo.prefijo end if formas_no_personales[forma] then if conjinfo[forma][1] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma]) do insert_if_not(conjugado[forma], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else for _, sufijo in ipairs(sufijos_) do local nucleos_ = nucleos if forma == "inf_act" and sufijo == "isse" then nucleos_ = conjinfo.nucleoperf elseif forma == "part_act" and sufijo == "ūrus" then nucleos_ = conjinfo.nucleosup elseif forma == "part_pas" and sufijo == "us" then nucleos_ = conjinfo.nucleosup end local agregar_i = conjinfo.I and nucleos_ == conjinfo.nucleopres for _,nucleo in ipairs(nucleos_) do insert_if_not(conjugado[forma], combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(nucleo, sufijo, agregar_i))) end end end return end for i = EGO, EI do local p = tostr[i] if conjinfo[forma][i] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma][i]) do insert_if_not(conjugado[forma..p], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else local k = i while sufijos_[k] do local agregar_i = conjinfo.I and nucleos == conjinfo.nucleopres for j, n in ipairs(nucleos) do local x = combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(n, sufijos_[k], agregar_i)) if conjinfo.always_sync_perf and (forma == "ind_perf" or forma == "ind_pluperf" or forma == "ind_fut_perf" or forma == "subj_perf" or forma == "subj_pluperf") then x = x:gsub("īvī", "iī") x = x:gsub("īvi", "ī") x = x:gsub("īve", "ī") x = x:gsub("īvē", "ē") end insert_if_not(conjugado[forma..p], x) end k = k + 6 end end end end local function get_subtype_by_ending(pres, conjinfo, specs) for _, spec in ipairs(specs) do local base = extract_base(pres, spec[1]) if base then for _,s in ipairs(spec[2]) do if conjinfo[s] == nil then conjinfo[s] = true end end return base end end error("Unrecognized ending for conjugation " .. conjinfo["conj"]) end local function detect_v_type_and_subtypes(conjinfo) local pres = conjinfo["v"] local conj_arg = conjinfo["conj"] pres = toNFC(pres) local base_conj_arg, auto_perf_supine = conj_arg:match("^([124]/?4?)(%+%+?)$") if base_conj_arg then if auto_perf_supine == "++" and base_conj_arg ~= "4" then error("Conjugation types 1++ and 2++ not allowed") end conj_arg = base_conj_arg end conjinfo.conj = conj_arg if conj_arg == "1" then local base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"at", {"impers"}}, {"ātur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "āv" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "āt" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "āss" end end elseif conj_arg == "2" then local base = get_subtype_by_ending(pres, conjinfo, { {"eō", {}}, {"eor", {"dep"}}, {"et", {"impers"}}, {"ētur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "u" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "it" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3" then local base if conjinfo.I == false then -- si explícitamente se indicó que no es del tipo -io, hay que excluir sufijos base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) else base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) end if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end assert(conjinfo["nucleoperf"][1], "especifique todos los núcleos para verbos de la tercera conjugación") assert(conjinfo["nucleosup"][1], "especifique todos los núcleos para verbos de la tercera conjugación") if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3/4" then local base base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "4" then local base = get_subtype_by_ending(pres, conjinfo, { {"iō", {}}, {"ior", {"dep"}}, {"it", {"impers"}}, {"ītur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "irreg" then for _,p in ipairs(verbos_irregulares) do for _,rx in ipairs(p[2]) do local pref, verb = match(conjinfo.v, "^(.*)("..rx..")$") if verb then conjinfo.v = verb conjinfo.prefijo = pref if conjinfo.nucleoperf[1] and conjinfo.nucleoperf[1] ~= "-" then -- [[ecfero]] conjinfo.prefijoperf = conjinfo.nucleoperf[1] conjinfo.nucleoperf = {} end if conjinfo.nucleosup[1] and conjinfo.nucleosup[1] ~= "-" then conjinfo.prefijosup = conjinfo.nucleosup[1] conjinfo.nucleosup = {} end if conjinfo.nucleosigm[1] and conjinfo.nucleosigm[1] ~= "-" then conjinfo.prefijosigm = conjinfo.nucleosigm[1] conjinfo.nucleosigm = {} end conjinfo.irreg = true conjinfo.conj = p[3].conj for k,val in pairs(p[3]) do if not conjinfo[k] or (type(conjinfo[k]) == "table" and not conjinfo[k][1]) then conjinfo[k] = deep_copy(val) end end return conjinfo end end end error("Unrecognized conjugation '" .. conj_arg .. "'") else error("Unrecognized conjugation '" .. conj_arg .. "'") end return conjinfo end function export.v(frame) local title_ = mw.title.getCurrentTitle() local tit = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {alias_de = "conj"}, [2] = {alias_de = "pres"}, [3] = {alias_de = "nucleoperf"}, [4] = {alias_de = "nucleosup"}, [5] = {alias_de = "nucleosigm"}, ["impers"] = {}, -- pas para formas pasivas solamente ["impersonal"] = {alias_de = "impers"}, ["dep"] = {tipo="bool"}, ["depon"] = {alias_de="dep"}, ["deponente"] = {alias_de="dep"}, ["semidep"] = {tipo="bool"}, ["semidepon"] = {alias_de="semidep"}, ["semideponente"] = {alias_de="semidep"}, ["sigm"] = {tipo="bool"}, ["nopasivo"] = {tipo="bool"}, ["soloperf"] = {tipo="bool"}, ["I"] = {tipo="bool"}, ["p3inf"] = {tipo="bool"}, -- sin uso ["poet_sync_perf"] = {tipo="bool"}, -- sin uso ["always_sync_perf"] = {tipo="bool"}, -- solo en [[saevio]] ["conj"] = {requerido=true}, ["pres"] = {requerido=true}, ["nucleopres"] = {lista = true}, ["nucleoperf"] = {lista = true}, ["nucleosup"] = {lista = true}, ["nucleosigm"] = {lista = true}, ["núcleopres"] = {alias_de="nucleopres"}, ["núcleoperf"] = {alias_de="nucleoperf"}, ["núcleosup"] = {alias_de="nucleosup"}, ["paradigma"] = {lista = true}, ["desactivarnucleos"] = {tipo="bool", por_defecto=true}, -- para [[-o]] ["nota"] = {}, } local conjugado = {} for forma,_ in pairs(formas_no_personales) do params[forma] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma] = {} end for forma,_ in pairs(formas_personales) do for i,s in ipairs(tostr) do params[forma..s] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma..s] = {} if i == 1 then params[forma] = {alias_de=forma..s} end end end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) assert(not find(tit, " "), "locuciones no soportadas aún") assert(not (args["dep"] and args["semidep"]), "un verbo no puede ser deponente y semideponente a la vez") local conjinfo = { conj = args.conj, prefijo="", v=args.pres, desactivar = {}, dep=args.dep, semidep=args.semidep, sigm=args.sigm, impers=args.impers, nopasivo=args.nopasivo, soloperf=args.soloperf, I=args.I, p3inf=args.p3inf, poet_sync_perf=args.poet_sync_perf, -- sin uso always_sync_perf=args.always_sync_perf, nucleopres = deep_copy(args.nucleopres), nucleoperf = deep_copy(args.nucleoperf), nucleosup = deep_copy(args.nucleosup), nucleosigm = deep_copy(args.nucleosigm) } conjinfo = detect_v_type_and_subtypes(conjinfo) conjinfo.conj = conjinfo.conj if conjinfo.impers == true then conjinfo.impers = "3" end -- no puede ir conjinfo acá abajo porque si es un sufijo va a quedar "-" en la raíz, lo que anularía todas las formas conjugadas, tiene que venir directo de args if args.desactivarnucleos then if args.nucleopres[1] == "-" then conjinfo.nucleopres = {} end if args.nucleoperf[1] == "-" then conjinfo.nucleoperf = {} end if args.nucleosup[1] == "-" then conjinfo.nucleosup = {} end if args.nucleosigm[1] == "-" then conjinfo.nucleosigm = {} end end local es_irregular = conjinfo.irreg for _,d in ipairs(conjinfo.desactivar) do if formas_no_personales[d] then args[d] = {"no"} else args[d.."2"] = {"no"} end end for forma,_ in pairs(formas) do agregar_forma(conjugado, conjinfo, forma) end local resultante = sobreescribir_formas(conjugado, args) local mostrar_fut_sig = #resultante["ind_fut_sig1"] > 0 local mostrar_aor_sig = #resultante["subj_aor_sig1"] > 0 local defectivo = comprobar_defectivo(resultante, {"^imper", "_sig"}, tostr) local defect2 resultante, defect2 = desactivar_formas(resultante, function (form) return (conjinfo.nopasivo and form:find("_pas")) or (conjinfo.soloperf and not form:find("perf")) or (conjinfo.impers == "pas" and form:find("_pas[^3]")) or (conjinfo.impers == "pas3" and form:find("_pas[^3]")) or (conjinfo.impers == "pas36" and form:find("_pas[^36]")) end ) if defect2 then defectivo = true end -- por ahora innecesario -- local part_no_adj = {} -- for _,e in ipairs(resultante.part) do -- if (find(e, 'PART') or not find(e, 'ADJ')) and not find(e, "†") then -- insert(part_no_adj, gsub1(e, '%b{}', '')) -- end -- end local tit_pres = f(resultante["ind_pres1"][1] or "―") local tit_inf = f(resultante["inf_act"][1] or "―") local tit_perf = f(resultante["ind_perf1"][1] or "―") local tit_sup = f(resultante["sup"][1] or "―") resultante = agregar_enlaces(resultante, tit, normalizar_enlace) local es_impersonal = conjinfo.impers resultante = formatear_formas(resultante, function (x) return obtener_pronombre(x, es_impersonal) end) local impers = conjinfo.impers local cs, cs1, cs2, fila_pronombres_ind, fila_pronombres_subj, fila_pronombres_imper, mostrar_imper if impers == "3" then fila_pronombres_ind = {"", "(id)", color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", "(quod id)", color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", "(id)", color=COLOR_IMPER, header=true, class="pc"} cs = 2 elseif impers == "36" then error("no soportado actualmente") cs = 3 else fila_pronombres_ind = {"", PRONOMBRES[1], PRONOMBRES[2], PRONOMBRES[3], PRONOMBRES[4], PRONOMBRES[5], PRONOMBRES[6], color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", PRONOMBRES_SUBJ[1], PRONOMBRES_SUBJ[2], PRONOMBRES_SUBJ[3], PRONOMBRES_SUBJ[4], PRONOMBRES_SUBJ[5], PRONOMBRES_SUBJ[6], color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", PRONOMBRES_IMP[1], PRONOMBRES_IMP[2], PRONOMBRES_IMP[3], PRONOMBRES_IMP[4], PRONOMBRES_IMP[5], PRONOMBRES_IMP[6], color=COLOR_IMPER, header=true, class="pc"} cs = 7 mostrar_imper = true end cs1 = cs -- math.floor(cs / 2) -- cs2 = cs - cs1 local t = {} insert(t, {{"Formas no personales (verboides)", colspan=cs}, color=COLOR_H, header=true}) if impers == "3" then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else resultante.inf_act.colspan = cs1-1 resultante.inf_pas.colspan = cs1-1 resultante.part_act.colspan = cs1-1 resultante.part_pas.colspan = cs1-1 resultante.ger.colspan = cs1-1 resultante.sup.colspan = cs1-1 if conjinfo.dep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) elseif conjinfo.semidep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) end end local function ic(tiempo) if impers == "3" then return resultante[tiempo.."3"] elseif impers == "36" then return resultante[tiempo.."3"], resultante[tiempo.."6"] end return resultante[tiempo.."1"], resultante[tiempo.."2"], resultante[tiempo.."3"], resultante[tiempo.."4"], resultante[tiempo.."5"], resultante[tiempo.."6"] end insert(t, {{"Formas personales", colspan=cs}, color=COLOR_H, header=true}) insert(t, {{"Modo indicativo", colspan=cs}, color=COLOR_IND, header=true}) insert(t, fila_pronombres_ind) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end else insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) insert(t, {{"Pretérito perfecto", color=COLOR_IND, header=true}, ic("ind_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_IND, header=true}, ic("ind_pluperf")}) insert(t, {{"Futuro perfecto", color=COLOR_IND, header=true}, ic("ind_fut_perf")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) end insert(t, {{"Modo subjuntivo", colspan=cs}, color=COLOR_SUBJ, header=true}) insert(t, fila_pronombres_subj) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end else insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) insert(t, {{"Pretérito perfecto", color=COLOR_SUBJ, header=true}, ic("subj_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_SUBJ, header=true}, ic("subj_pluperf")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) end insert(t, {{"Modo imperativo", colspan=cs}, color=COLOR_IMPER, header=true}) insert(t, fila_pronombres_imper) if mostrar_imper then if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) else insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) insert(t, {{"Presente pasivo", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) end else insert(t, {{"Como verbo "..(impers == "3" and "impersonal" or "terciopersonal")..", ''"..tit.."'' CARECE de imperativo", color=COLOR_IMPER, header=true, colspan=cs}}) end insert(t, {{f("Leyenda: † arcaico, x no normativo, ~■~ cambio ortográfico, #■# irregularidad"), colspan=cs}}) args["nota"] = args["nota"] or "" if conjinfo.impers == "utc3" then args["nota"] = args["nota"].." NOTA: se usa también como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "umc3" then args["nota"] = args["nota"].." NOTA: se usa más como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "utc36" then args["nota"] = args["nota"].." NOTA: se usa también como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "umc36" then args["nota"] = args["nota"].." NOTA: se usa más como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "pas" or conjinfo.imeprs == "pas3" then args["nota"] = args["nota"].." NOTA: impersonal para las formas pasivas" end if conjinfo.impers == "pas36" then args["nota"] = args["nota"].." NOTA: formas pasivas terciopersonales (solamente tercera persona singular y plural)" end if conjinfo.soloperf then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas del perfecto y pluscuamperfecto con valor de presente, imperfecto o futuro" end if conjinfo.nopasivo then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas activas" end insert(t, {{args["nota"] and args["nota"] or "", colspan=cs}}) local cats = {} local subtits = {} local conj_str if conjinfo.conj == "1" then conj_str = "primera conjugación" elseif conjinfo.conj == "2" then conj_str = "segunda conjugación" elseif conjinfo.conj == "3" then conj_str = "tercera conjugación" elseif conjinfo.conj == "3/4" then conj_str = "tercera/cuarta conjugación" else conj_str = "cuarta conjugación" end insert(cats, "LA:Verbos de la "..conj_str) insert(subtits, conj_str) impers = impers or "" if impers == "3" or find(impers, "^u[tm]c3$") then insert(subtits, "impersonal") insert(cats, "LA:Verbos impersonales") end if defectivo then insert(subtits, "defectivo") insert(cats, "LA:Verbos defectivos") end if conjinfo.dep then insert(subtits, "deponente") insert(cats, "LA:Verbos deponentes") end if conjinfo.semidep then insert(subtits, "semideponente") insert(cats, "LA:Verbos semideponentes") end if es_irregular then insert(subtits, "irregular") insert(cats, "LA:Verbos irregulares") else insert(subtits, "regular") insert(cats, "LA:Verbos regulares") end return renderizar_tabla( frame, "'''Conjugación de ''"..tit_pres..", "..tit_inf..", "..tit_perf..", "..tit_sup.."'''''&emsp;&emsp;("..concat(subtits, ", ")..")", t, ns == 0 and cats or {}) end function export.adv(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { ["n"] = {}, ["nota"] = {alias_de = "n"}, ["comp"] = {lista = true}, ["comparativo"] = {alias_de = "comp"}, ["compnota"] = {lista = true}, ["sup"] = {lista = true}, ["superlativo"] = {alias_de = "sup"}, ["supnota"] = {lista = true}, } local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local head = args[1] local modo = args[2] local enc local cats = {} local cat_pref = "LA:Adverbios" if modo == "-" then enc = "sin comparativo ni superlativo" insert(cats, cat_pref.." incomparables") return renderizar_encabezado( frame, head, enc, args["n"], {}, ns == 0 and cats or {}, normalizar_enlace ) end local flex = {comp={},sup={}} local stem for _, suff in ipairs{"iter", "nter", "ter", "er", "iē", "ē", "rā", "im", "ō"} do stem = match(head, "^(.*)" .. suff .. "$") if stem ~= nil then local comp_suff, sup_suff = "ius", "issimē" if suff == "nter" then stem = stem .. "nt" end if suff == "rā" then comp_suff = "er" .. comp_suff sup_suff = "imē" end insert(flex.comp, stem .. comp_suff) insert(flex.sup, stem .. sup_suff) break end end if not stem and not args.comp[1] and not args.sup[1] then error("Unrecognized adverb type, recognized types are “-ē”, “-er”, “-ter”, “-iter”, “-im”, or “-ō”, “-ra” or specify irregular forms or “-” if incomparable.") end local formas, irr = sobreescribir_formas(flex, args) if args["comp"][1] == "no" then enc = "sin comparativo" insert(cats, cat_pref.." sin comparativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) elseif args["sup"][1] == "no" then enc = "sin superlativo" insert(cats, cat_pref.." sin superlativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end if irr then enc = f("#irregular#") insert(cats, cat_pref.." irregulares") end return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}, {"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end return export 4bm63azilipwh3yw3cozx0n3hl2asaw 6123513 6123511 2026-07-25T02:22:44Z Tmagc 158167 6123513 Scribunto text/plain -- FLEXIÓN DEL LATÍN -- Adaptado desde en.wikt por Tmagc local export = {} local unpack = unpack or table.unpack local insert = table.insert local concat = table.concat local m_table = require("Módulo:tabla") local keys_to_list = m_table.keysToList local insert_if_not = m_table.insertIfNot local deep_copy = m_table.deepCopy local contains = m_table.contains local merge = m_table.merge local m_str = require("Módulo:string") local u = m_str.char local match = m_str.match local sub = m_str.sub local gsub = m_str.gsub local split = m_str.split local gsplit = m_str.gsplit local find = m_str.find local m_str_avanzado = require("Módulo:string/avanzado") local toNFD = m_str_avanzado.toNFD local toNFC = m_str_avanzado.toNFC local m_flex = require("Módulo:flex") local f = m_flex.f local f_links = m_flex.f_links local parsear_arreglo = m_flex.parsear_arreglo local separar_palabras = m_flex.separar_palabras local combinar_copulativa = m_flex.combinar_copulativa local sobreescribir_formas = m_flex.sobreescribir_formas local desactivar_formas = m_flex.desactivar_formas local agregar_enlaces = m_flex.agregar_enlaces local formatear_formas = m_flex.formatear_formas local comprobar_defectivo = m_flex.comprobar_defectivo local renderizar_tabla = m_flex.renderizar_tabla local renderizar_encabezado = m_flex.renderizar_encabezado local COLOR_H = m_flex.COLOR_H local COLOR_NP = m_flex.COLOR_NP local COLOR_IND = m_flex.COLOR_IND local COLOR_SUBJ = m_flex.COLOR_SUBJ local COLOR_IMPER = m_flex.COLOR_IMPER local MACRON = u(0x304) local BREVE = u(0x306) local DIAER = u(0x308) local DBREVE = u(0x361) local ACCENT = "[" .. MACRON .. BREVE .. DIAER .. DBREVE .. "]" local VOWEL = "[aæeioœuyAÆEIOŒUY]" local cons_to_vowel = { ["j"] = "i", ["J"] = "I", ["v"] = "u", ["V"] = "U", } local function normalizar_enlace(x) x = toNFD(x) x = gsub(x, ACCENT, "") return toNFC(x) end local function join(a, b) a, b = toNFD(a), toNFD(b) -- If the first part ends in "j" or "v", convert it to "i" or "u" unless -- the second part begins with a vowel. if not match(b, "^" .. VOWEL) then a = gsub(a, "[jvJV]$", cons_to_vowel) end return toNFC(a..b) end local function add_form(decl, slot, stem, suf) if type(slot) == "string" then slot = {slot} end for _,slt in ipairs(slot) do if type(decl[slt]) == "nil" or decl[slt] == "" then decl[slt] = {} elseif type(decl[slt]) == "string" then decl[slt] = {decl[slt]} end insert_if_not(decl[slt], join(stem, suf)) end end local function remove_forms(decl, forms) for form,_ in pairs(decl) do for _,rx in ipairs(forms) do if form:find(rx) then forms[form] = {} break end end end end local function merge_forms(forms, forms2, keys) keys = keys or forms2 for key,arr in pairs(keys) do if not forms[key] then forms[key] = {} end if type(forms2[key]) == "string" then insert_if_not(forms[key], forms2[key]) elseif type(forms2[key]) == "table" then for _,a in ipairs(forms2[key]) do insert_if_not(forms[key], a) end end end end local noun_decl = {} noun_decl["0"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = stem forms["dat_sg"] = stem forms["acc_sg"] = stem forms["abl_sg"] = stem forms["voc_sg"] = stem forms["nom_pl"] = stem forms["gen_pl"] = stem forms["dat_pl"] = stem forms["acc_pl"] = stem forms["abl_pl"] = stem forms["voc_pl"] = stem -- with locative if data.loc then forms["loc_sg"] = stem forms["loc_pl"] = stem end end local function alt_gen_pl_in_um(stem, forms, types, subtitles, i_stem) if types.genplum then add_form(forms, "gen_pl", stem, (i_stem and "i" or "") .. "um") elseif types.not_genplum then -- FIXME: not a contraction. -- insert_if_not(subtitles, "uncontracted genitive plural") end end noun_decl["1"] = function(data, args) local forms, types, loc, subtitles = data.forms, data.types, data.loc, data.subtitles local stem = args[1] -- normal 1st local nom_sg = "a" local gen_loc_sg = "ae" local dat_sg = "ae" local acc_sg = "am" local abl_sg = "ā" local voc_sg = "a" local nom_voc_pl = "ae" local gen_pl = "ārum" local dat_abl_loc_pl = "īs" local acc_pl = "ās" insert_if_not(data.title, "primera declinación") insert_if_not(data.categories, "LA:Sustantivos de la primera declinación") -- ām if types.am then nom_sg = "ām" acc_sg = "ām" abl_sg = {"ām", "ā"} voc_sg = "ām" -- all Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") --Greek Ma if types.Ma then nom_sg = "ās" acc_sg = "ān" voc_sg = "ā" -- Greek Me elseif types.Me then nom_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" -- Greek else nom_sg = "ē" gen_loc_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" end end -- ābus if types.abus then dat_abl_loc_pl = "ābus" end add_form(forms, "nom_sg", stem, nom_sg) add_form(forms, "gen_sg", stem, gen_loc_sg) add_form(forms, "dat_sg", stem, dat_sg) add_form(forms, "acc_sg", stem, acc_sg) add_form(forms, "abl_sg", stem, abl_sg) add_form(forms, "voc_sg", stem, voc_sg) add_form(forms, {"nom_pl", "voc_pl"}, stem, nom_voc_pl) add_form(forms, "gen_pl", stem, gen_pl) add_form(forms, {"dat_pl", "abl_pl"}, stem, dat_abl_loc_pl) add_form(forms, "acc_pl", stem, acc_pl) -- with locative if loc then add_form(forms, "loc_sg", stem, gen_loc_sg) add_form(forms, "loc_pl", stem, dat_abl_loc_pl) end end noun_decl["2"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "segunda declinación") insert_if_not(data.categories, "LA:Sustantivos de la segunda declinación") -- normal 2nd forms["nom_sg"] = stem1 .. "us" forms["gen_sg"] = stem1 .. "ī" forms["dat_sg"] = stem1 .. "ō" forms["acc_sg"] = stem1 .. "um" forms["abl_sg"] = stem1 .. "ō" forms["voc_sg"] = stem1 .. "e" forms["nom_pl"] = stem1 .. "ī" forms["gen_pl"] = stem1 .. "ōrum" forms["dat_pl"] = stem1 .. "īs" forms["acc_pl"] = stem1 .. "ōs" forms["abl_pl"] = stem1 .. "īs" forms["voc_pl"] = stem1 .. "ī" -- all neuter if types.N then forms["nom_sg"] = stem1 .. "um" forms["voc_sg"] = stem1 .. "um" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- neuter ium if types.ium then forms["nom_sg"] = stem1 .. "ium" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" forms["voc_sg"] = stem1 .. "ium" forms["nom_pl"] = stem1 .. "ia" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "ia" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "ia" -- neuter us, plural a elseif types.a then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- -vom (aevom, etc.) elseif types.vom then forms["nom_sg"] = stem1 .. "om" forms["acc_sg"] = stem1 .. "om" forms["voc_sg"] = stem1 .. "om" -- neuter Greek in -os (cētos) elseif types.Greek and types.us then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "os" forms["voc_sg"] = stem1 .. "os" forms["nom_pl"] = stem1 .. "ē" forms["gen_pl"] = stem1 .. "ōn" forms["acc_pl"] = stem1 .. "ē" forms["voc_pl"] = stem1 .. "ē" -- neuter Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "on" forms["acc_sg"] = stem1 .. "on" forms["voc_sg"] = stem1 .. "on" -- neuter us elseif types.us then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "ī" forms["acc_pl"] = stem1 .. "ōs" forms["voc_pl"] = stem1 .. "ī" end -- er elseif types.er then forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "ī" forms["dat_sg"] = stem2 .. "ō" forms["acc_sg"] = stem2 .. "um" forms["abl_sg"] = stem2 .. "ō" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ī" forms["gen_pl"] = stem2 .. "ōrum" forms["dat_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "ōs" forms["abl_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "ī" -- ius elseif types.ius then forms["nom_sg"] = stem1 .. "ius" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" if types.voci then -- Only for proper names and fīlius, genius forms["voc_sg"] = stem1 .. "ī" else forms["voc_sg"] = stem1 .. "ie" end forms["nom_pl"] = stem1 .. "iī" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "iōs" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "iī" -- -vos (servos, etc.) elseif types.vos then forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "om" -- Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "on" if data.num == "pl" then forms["nom_pl"] = stem1 .. "oe" forms["voc_pl"] = stem1 .. "oe" else forms["nom_pl"] = {stem1 .. "ī", stem1 .. "oe"} forms["voc_pl"] = {stem1 .. "ī", stem1 .. "oe"} end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- with -um genitive plural alt_gen_pl_in_um(stem2, forms, types, subtitles, types.ius or types.ium) -- with locative if data.loc then if types.ius or types.ium then forms["loc_sg"] = stem2 .. "iī" forms["loc_pl"] = stem2 .. "iīs" else forms["loc_sg"] = stem2 .. "ī" forms["loc_pl"] = stem2 .. "īs" end end end local acc_sg_i_stem_subtypes = { acc_im = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [abl -ī]; -- cannabis, senapis, sinapis [abl -e, -ī] acc_sg = {"im"}, title = {"accusative singular in ''-im''"}, }, acc_im_in = { -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [abl -ī]; -- Baetis, Tigris [acc -e, -ī] acc_sg = {"im", "in"}, title = {"accusative singular in ''-im'' or ''-in''"}, }, acc_im_in_em = { -- e.g. tigris, river Līris acc_sg = {"im", "in", "em"}, title = {"accusative singular in ''-im'', ''-in'' or ''-em''"}, }, acc_im_em = { acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or ''-em''"}, }, acc_im_occ_em = { -- febris, pelvis, puppis, restis, securis, turris [abl -ī, -e] acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or occasionally ''-em''"}, }, acc_em_im = { -- aqualis, clavis, lens, navis [abl -e, -ī]; -- cutis, restis [abl -e] acc_sg = {"em", "im"}, title = {"accusative singular in ''-em'' or ''-im''"}, }, } local abl_sg_i_stem_subtypes = { abl_i = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [acc -im]; -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [acc -im or -in]; -- canalis "water pipe", months in -is or -er, nouns originally i-stem adjectives such as aedilis, affinis, bipennis, familiaris, sodalis, volucris, etc. [acc -em] abl_sg = {"ī"}, title = {"ablative singular in ''-ī''"}, }, abl_i_e = { -- febris, pelvis, puppis, restis, securis, turris [acc -im, -em] abl_sg = {"ī", "e"}, title = {"ablative singular in ''-ī'' or ''-e''"}, }, abl_e_i = { -- cannabis, senapis, sinapis [acc -im]; -- Baetis, Tigris [acc -im, -in]; -- aqualis, clavis, lens, navis [acc -em, -im]; -- finis, mugilis, occiput, pugil, rus, supellex, vectis [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or ''-ī''"}, }, abl_e_occ_i = { -- amnis, anguis, avis, civis, classis, fustis, ignis, imber, orbis, pars, postis, sors, unguis, vesper [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or occasionally ''-ī''"}, }, } local function extract_stem(form, ending) local base = match(form, "^(.*)" .. ending .. "$") if not base then error("Form " .. form .. " should end in -" .. ending) end return base end local function count_vowels(stem) return select(2, toNFD(stem):gsub("[aeiouyAEIOUY]", "")) end noun_decl["3"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] -- local function non_i_stem_type() -- return (count_vowels(stem1) > count_vowels(stem2) and "parisyllabic" or "imparisyllabic") .. " non-i-stem" -- end insert_if_not(data.title, "tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") --normal 3rd forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "is" forms["dat_sg"] = stem2 .. "ī" forms["acc_sg"] = stem2 .. "em" forms["abl_sg"] = stem2 .. "e" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ēs" forms["gen_pl"] = stem2 .. "um" forms["dat_pl"] = stem2 .. "ibus" forms["acc_pl"] = stem2 .. "ēs" forms["abl_pl"] = stem2 .. "ibus" forms["voc_pl"] = stem2 .. "ēs" local acc_sg_i_stem_subtype = false local not_acc_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if acc_sg_i_stem_subtypes[subtype] then acc_sg_i_stem_subtype = true break end end for acc_sg_subtype, _ in pairs(acc_sg_i_stem_subtypes) do if types["not_" .. acc_sg_subtype] then not_acc_sg_i_stem_subtype = true break end end local abl_sg_i_stem_subtype = false local not_abl_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if abl_sg_i_stem_subtypes[subtype] then abl_sg_i_stem_subtype = true break end end for abl_sg_subtype, _ in pairs(abl_sg_i_stem_subtypes) do if types["not_" .. abl_sg_subtype] then not_abl_sg_i_stem_subtype = true break end end -- all Greek if types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") -- Greek er if types.er then stem1 = extract_stem(stem1, "ēr") forms["nom_sg"] = stem1 .. "ēr" forms["gen_sg"] = stem1 .. "eris" forms["dat_sg"] = stem1 .. "erī" forms["acc_sg"] = {stem1 .. "era", stem1 .. "erem"} forms["abl_sg"] = stem1 .. "ere" forms["voc_sg"] = stem1 .. "ēr" forms["nom_pl"] = stem1 .. "erēs" forms["gen_pl"] = stem1 .. "erum" forms["dat_pl"] = stem1 .. "eribus" forms["acc_pl"] = stem1 .. "erēs" forms["abl_pl"] = stem1 .. "eribus" forms["voc_pl"] = stem1 .. "erēs" -- Greek on elseif types.on then stem1 = extract_stem(stem1, "ōn") forms["nom_sg"] = stem1 .. "ōn" forms["gen_sg"] = {stem1 .. "ontis", stem1 .. "ontos"} forms["dat_sg"] = stem1 .. "ontī" forms["acc_sg"] = stem1 .. "onta" forms["abl_sg"] = stem1 .. "onte" forms["voc_sg"] = stem1 .. "ōn" forms["nom_pl"] = stem1 .. "ontēs" forms["gen_pl"] = {stem1 .. "ontum", stem1 .. "ontium"} forms["dat_pl"] = stem1 .. "ontibus" forms["acc_pl"] = {stem1 .. "ontēs", stem1 .. "ontās"} forms["abl_pl"] = stem1 .. "ontibus" forms["voc_pl"] = stem1 .. "ontēs" -- Greek i-stem elseif types.I then forms["gen_sg"] = {stem2 .. "is", stem2 .. "eōs", stem2 .. "ios"} forms["acc_sg"] = {stem2 .. "im", stem2 .. "in", stem2 .. "em{MED}"} forms["abl_sg"] = {stem2 .. "ī", stem2 .. "e{MED}"} forms["voc_sg"] = {stem2 .. "is", stem2 .. "i"} forms["nom_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["gen_pl"] = {stem2 .. "ium", stem2 .. "eōn"} forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["voc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} if types.poetic_esi then forms["dat_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} forms["abl_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} end -- normal Greek else forms["gen_sg"] = stem2 .. "os" if match(toNFD(stem2), "[yY]" .. ACCENT .. "*$") then forms["acc_sg"] = stem2 .. "n" else forms["acc_sg"] = stem2 .. "a" end forms["nom_pl"] = stem2 .. "es" forms["acc_pl"] = stem2 .. "as" forms["voc_pl"] = stem2 .. "es" if match(toNFD(stem1), "[iyIY]" .. ACCENT .. "*s$") then -- Per Hiley, words in -is and -ys have a poetic vocative -- without the -s, but otherwise the vocative is the same -- as the nominative. forms["voc_sg"] = {stem1, (stem1:gsub("s$", "")).."{L}"} end end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- polis if types.polis then stem1 = extract_stem(stem1, "polis") insert_if_not(data.title, "parcialmente griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "polis" forms["gen_sg"] = stem1 .. "polis" forms["dat_sg"] = stem1 .. "polī" forms["acc_sg"] = {stem1 .. "polim", stem1 .. "polin"} forms["abl_sg"] = stem1 .. "polī" forms["voc_sg"] = {stem1 .. "polis", stem1 .. "polī"} end -- all neuter if types.N then forms["acc_sg"] = stem1 -- neuter I stem if types.I then -- pure variety if types.pure then forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "ia" forms["gen_pl"] = stem2 .. "ium" forms["acc_pl"] = stem2 .. "ia" forms["voc_pl"] = stem2 .. "ia" -- non-pure variety (rare) else forms["nom_pl"] = stem2 .. "a" forms["gen_pl"] = {stem2 .. "ium", stem2 .. "um"} forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- normal neuter else forms["nom_pl"] = stem2 .. "a" forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- I stem elseif types.I or acc_sg_i_stem_subtype or abl_sg_i_stem_subtype then forms["gen_pl"] = stem2 .. "ium" -- Per Allen and Greenough, Hiley and others, the acc_pl in -īs -- applied originally to all i-stem nouns, and was current as an -- alternative form up through Caesar. forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "īs"} -- pure variety if types.pure then forms["acc_sg"] = stem2 .. "im" forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "īs" end local num = data.num for subtype, _ in pairs(types) do local acc_sg_i_stem_props = acc_sg_i_stem_subtypes[subtype] if acc_sg_i_stem_props then forms["acc_sg"] = {} for _, ending in ipairs(acc_sg_i_stem_props.acc_sg) do insert_if_not(forms["acc_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(acc_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end -- FIXME: needs to be done for neuter nouns as well. for subtype, _ in pairs(types) do local abl_sg_i_stem_props = abl_sg_i_stem_subtypes[subtype] if abl_sg_i_stem_props then forms["abl_sg"] = {} for _, ending in ipairs(abl_sg_i_stem_props.abl_sg) do insert_if_not(forms["abl_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(abl_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end end -- with locative if data.loc then -- As far as I can tell, in general both dative singular and -- ablative singular could be used for the third-declension locative, -- with different time periods preferring different forms. -- http://dcc.dickinson.edu/grammar/latin/3rd-declension-locative-case -- mentions rūrī along with either Carthāginī or Carthāgine. -- Wikipedia in https://en.wikipedia.org/wiki/Locative_case#Latin -- says this: -- -- In archaic times, the locative singular of third declension nouns -- was still interchangeable between ablative and dative forms, but in -- the Augustan Period the use of the ablative form became fixed. -- Therefore, both forms "rūrī" and "rūre" may be encountered. -- -- Lewis and Short confirm this. local loc_sg = forms["dat_sg"] if type(loc_sg) == "table" then loc_sg = deep_copy(loc_sg) else loc_sg = {loc_sg} end local abl_sg = forms["abl_sg"] if type(abl_sg) == "table" then for _, form in ipairs(abl_sg) do insert_if_not(loc_sg, deep_copy(form)) end else insert_if_not(loc_sg, abl_sg) end forms["loc_sg"] = loc_sg forms["loc_pl"] = deep_copy(forms["abl_pl"]) --The following is what we used to have, but I simply cannot believe it. --if types.Greek and not types.s then -- forms["loc_pl"] = stem2 .. "ēs" --end end end noun_decl["4"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "cuarta declinación") insert_if_not(data.categories, "LA:Sustantivos de la cuarta declinación") -- normal 4th forms["nom_sg"] = stem .. "us" forms["gen_sg"] = stem .. "ūs" forms["dat_sg"] = stem .. "uī" forms["acc_sg"] = stem .. "um" forms["abl_sg"] = stem .. "ū" forms["voc_sg"] = stem .. "us" forms["nom_pl"] = stem .. "ūs" forms["gen_pl"] = stem .. "uum" forms["dat_pl"] = stem .. "ibus" forms["acc_pl"] = stem .. "ūs" forms["abl_pl"] = stem .. "ibus" forms["voc_pl"] = stem .. "ūs" if types.echo then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end add_form(forms, "acc_sg", stem, "ōn") elseif types.Callisto then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end end -- neuter if types.N then forms["nom_sg"] = stem .. "ū̆{?}" forms["gen_sg"] = {stem .. "ūs{C}", stem .. "ū{S}"} forms["dat_sg"] = {stem .. "uī{C}", stem .. "ū{S}"} forms["acc_sg"] = stem .. "ū̆{?}" forms["voc_sg"] = stem .. "ū̆{?}" forms["nom_pl"] = stem .. "ua" forms["acc_pl"] = stem .. "ua" forms["voc_pl"] = stem .. "ua" end -- ubus if types.ubus then forms["dat_pl"] = stem .. "ubus" forms["abl_pl"] = stem .. "ubus" end -- with locative if data.loc then forms["loc_sg"] = forms["abl_sg"] forms["loc_pl"] = forms["abl_pl"] end end noun_decl["5"] = function(data, args) local forms, types = data.forms, data.types local stem = args[1] insert_if_not(data.title, "quinta declinación") insert_if_not(data.categories, "LA:Sustantivos de la quinta declinación") -- ies if types.i then stem = stem .. "i" end forms["nom_sg"] = stem .. "ēs" forms["gen_sg"] = stem .. "eī" forms["dat_sg"] = stem .. "eī" forms["acc_sg"] = stem .. "em" forms["abl_sg"] = stem .. "ē" forms["voc_sg"] = stem .. "ēs" forms["nom_pl"] = stem .. "ēs" forms["gen_pl"] = stem .. "ērum" forms["dat_pl"] = stem .. "ēbus" forms["acc_pl"] = stem .. "ēs" forms["abl_pl"] = stem .. "ēbus" forms["voc_pl"] = stem .. "ēs" -- ies if types.i then forms["gen_sg"] = stem .. "ēī" forms["dat_sg"] = stem .. "ēī" end --with locative if data.loc then forms["loc_sg"] = stem .. "ē" forms["loc_pl"] = stem .. "ēbus" end end noun_decl["sgpl"] = function(data, args) local forms = data.forms local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem1 forms["gen_sg"] = stem1 forms["dat_sg"] = stem1 forms["acc_sg"] = stem1 forms["abl_sg"] = stem1 forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 forms["gen_pl"] = stem2 forms["dat_pl"] = stem2 forms["acc_pl"] = stem2 forms["abl_pl"] = stem2 forms["voc_pl"] = stem2 -- with locative if data.loc then forms["loc_sg"] = stem1 forms["loc_pl"] = stem2 end end noun_decl["indecl"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = stem forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} -- with locative (for multiword terms) if data.loc then forms["loc_sg"] = {} forms["loc_pl"] = {} end data.num = "sg" end noun_decl["irreg"] = function(data, args) local forms, subtitles, notes = data.forms, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "irregular") insert_if_not(data.categories, "LA:Sustantivos irregulares") forms["nom_sg"] = {} forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = {} forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} if stem == "bōs" then data.decl = "3" local stem1, stem2 = "bōs", "bov" noun_decl["3"](data, {stem1, stem2}) add_form(forms, "abl_sg", stem2, "īd{†}") add_form(forms, "gen_pl", "bo", "um") add_form(forms, "gen_pl", stem2, "erum") add_form(forms, "dat_pl", "", "bōbus") add_form(forms, "dat_pl", "", "būbus") add_form(forms, "abl_pl", "", "bōbus") add_form(forms, "abl_pl", "", "būbus") elseif stem:match("^[dD]eus$") then data.decl = "2" local dD = stem:sub(1, 1) forms["nom_sg"] = dD .. "eus" forms["gen_sg"] = dD .. "eī" forms["dat_sg"] = dD .. "eō" forms["acc_sg"] = dD .. "eum" forms["abl_sg"] = dD .. "eō" forms["voc_sg"] = {dD .. "eus", dD .. "ee"} if stem == "deus" then forms["nom_pl"] = {"dī", "diī", "deī"} forms["gen_pl"] = {"deōrum", "deum"} forms["dat_pl"] = {"dīs", "diīs", "deīs"} forms["acc_pl"] = "deōs" forms["abl_pl"] = {"dīs", "diīs", "deīs"} forms["voc_pl"] = {"dī", "diī", "deī"} end elseif stem == "domus" then data.decl = "4,2" insert_if_not(data.title, "cuarta/segunda declinación") forms["nom_sg"] = "domus" forms["gen_sg"] = {"domūs", "domī"} forms["dat_sg"] = {"domuī", "domō", "domū"} forms["acc_sg"] = "domum" forms["abl_sg"] = {"domū", "domō"} forms["voc_sg"] = "domus" forms["loc_sg"] = "domī" forms["nom_pl"] = "domūs" forms["gen_pl"] = {"domuum", "domōrum"} forms["dat_pl"] = "domibus" forms["acc_pl"] = {"domūs", "domōs"} forms["abl_pl"] = "domibus" forms["voc_pl"] = "domūs" forms["loc_pl"] = {} data.loc = true elseif match(stem, "^[IÏJ]ēs[uū]" .. BREVE .. "?s$") then local ij = sub(stem, 1, 1) local uu = match(stem, "[uū]" .. BREVE .. "?") forms["nom_sg"] = stem forms["gen_sg"] = ij .. "ēsū" forms["dat_sg"] = ij .. "ēsū" forms["acc_sg"] = ij .. "ēs" .. uu .. "m" forms["abl_sg"] = ij .. "ēsū" forms["voc_sg"] = ij .. "ēsū" data.num = "sg" elseif stem == "Mōsēs" or stem == "Moesēs" or match(stem, "^M[oō]" .. BREVE .. "?[īȳ]sēs$") then local mos = sub(stem, 1, -3) forms["nom_sg"] = stem forms["gen_sg"] = {mos .. "ī", mos .. "ēī", mos .. "is", mos .. "ēn", mos .. "eōs"} forms["dat_sg"] = mos .. "ī" forms["acc_sg"] = {mos .. "ēn", mos .. "em"} forms["abl_sg"] = {mos .. "e", mos .. "ēn", mos .. "ī"} forms["voc_sg"] = {mos .. "ēs", mos .. "ē"} data.num = "sg" elseif stem:match("^[ij]ūgerum$") then data.decl = "2,3" local ij = stem:sub(1, 1) insert_if_not(data.title, "segunda/tercera declinación híbrido") forms["nom_sg"] = ij .. "ūgerum" forms["gen_sg"] = ij .. "ūgerī" forms["dat_sg"] = ij .. "ūgerō" forms["acc_sg"] = ij .. "ūgerum" forms["abl_sg"] = ij .. "ūgerō" forms["voc_sg"] = ij .. "ūgerum" forms["nom_pl"] = ij .. "ūgera" forms["gen_pl"] = ij .. "ūgerum" forms["dat_pl"] = ij .. "ūgeribus" forms["acc_pl"] = ij .. "ūgera" forms["abl_pl"] = {ij .. "ūgeribus", ij .. "ūgerīs{†}"} forms["voc_pl"] = ij .. "ūgera" elseif stem == "sūs" then data.decl = "3" forms["nom_sg"] = "sūs" forms["gen_sg"] = "suis" forms["dat_sg"] = "suī" forms["acc_sg"] = "suem" forms["abl_sg"] = "sue" forms["voc_sg"] = "sūs" forms["nom_pl"] = "suēs" forms["gen_pl"] = "suum" forms["dat_pl"] = {"suibus", "sūbus", "subus"} forms["acc_pl"] = "suēs" forms["abl_pl"] = {"suibus", "sūbus", "subus"} forms["voc_pl"] = "suēs" elseif stem == "ēthos" then data.decl = "3" insert_if_not(data.title, "tercera declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "ēthos" forms["gen_sg"] = "ētheos" forms["acc_sg"] = "ēthos" forms["voc_sg"] = "ēthos" forms["nom_pl"] = {"ēthea", "ēthē"} forms["dat_pl"] = {"ēthesi", "ēthesin"} forms["acc_pl"] = {"ēthea", "ēthē"} forms["abl_pl"] = {"ēthesi", "ēthesin"} forms["voc_pl"] = {"ēthea", "ēthē"} elseif stem == "Athōs" then data.decl = "2" insert_if_not(data.title, "segunda declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "Athōs" forms["gen_sg"] = "Athō" forms["dat_sg"] = "Athō" forms["acc_sg"] = {"Athō", "Athōn"} forms["abl_sg"] = "Athō" forms["voc_sg"] = "Athōs" data.num = "sg" elseif stem:match("^[uv]ēnum$") then data.decl = "4,2" local uv = stem:sub(1, 1) insert_if_not(data.title, "cuarta/segunda declinación, defectivo") forms["dat_sg"] = {uv .. "ēnuī", uv .. "ēnō"} forms["acc_sg"] = uv .. "ēnum" data.num = "sg" elseif stem:match("^[uv]īs$") then data.decl = "3" local uv = stem:sub(1, 1) insert_if_not(data.title, "defectivo") forms["nom_sg"] = uv .. "īs" forms["gen_sg"] = uv .. "īs" forms["dat_sg"] = uv .. "ī" forms["acc_sg"] = uv .. "im" forms["abl_sg"] = uv .. "ī" forms["voc_sg"] = uv .. "īs" forms["nom_pl"] = uv .. "īrēs" forms["gen_pl"] = uv .. "īrium" forms["dat_pl"] = uv .. "īribus" forms["acc_pl"] = {uv .. "īrēs", uv .. "īrīs"} forms["abl_pl"] = uv .. "īribus" forms["voc_pl"] = uv .. "īrēs" else error("Stem " .. stem .. " not recognized.") end end local adj_decl = {} adj_decl["0+"] = function(data, args) local forms, categories = data.forms, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = stem forms["gen_sg_m"] = stem forms["gen_pl_m"] = stem forms["dat_sg_m"] = stem forms["dat_pl_m"] = stem forms["acc_sg_m"] = stem forms["acc_pl_m"] = stem forms["abl_sg_m"] = stem forms["abl_pl_m"] = stem forms["voc_sg_m"] = stem forms["voc_pl_m"] = stem forms["loc_sg_m"] = stem forms["loc_pl_m"] = stem end adj_decl["1&2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera y segunda declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local original if types.er then local final2 = stem:sub(-2) if final2 == "er" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") elseif final2 == "ur" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") else error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem) end stem, original = args[2], stem end local us = "us" local a_sf = "a" local um = "um" local ae_gsf = "ae" local am = "am" local a_macron = "ā" local i_pl = stem .. "ī" if types.greekA or types.greekE then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") if types.greekA then us = "os" um = "on" am = "ān" else us = "os" a_sf = "ē" um = "on" ae_gsf = "ēs" am = "ēn" a_macron = "ē" end i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = original or (stem .. us) forms["nom_sg_f"] = stem .. a_sf forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_f"] = stem .. ae_gsf forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_f"] = stem .. "ae" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_f"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_f"] = stem .. am forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_f"] = stem .. a_macron forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_f"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = original or (stem .. "e") forms["voc_sg_f"] = stem .. a_sf forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" if types.ius then insert_if_not(data.title, "pronominal") --insert_if_not(subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''") forms["gen_sg_m"] = stem .. "ī̆us" forms["gen_sg_f"] = stem .. "ī̆us" forms["gen_sg_n"] = stem .. "ī̆us" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_f"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" elseif types.not_ius then insert_if_not(data.title, "no pronominal") --insert_if_not(subtitles, "with normal genitive and dative singular") end if stem == "me" then forms["voc_sg_m"] = "mī" end if types.ic then --insert_if_not(subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''") local oc = "oc" local oc_macron = "ōc" if stem == "ill" then oc = "uc" oc_macron = "ūc" end forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = stem .. oc forms["nom_pl_n"] = stem .. "aec" forms["gen_sg_m"] = stem .. "uius" forms["gen_sg_f"] = stem .. "uius" forms["gen_sg_n"] = stem .. "uius" forms["dat_sg_m"] = stem .. "uic" forms["dat_sg_f"] = stem .. "uic" forms["dat_sg_n"] = stem .. "uic" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = stem .. oc forms["acc_pl_n"] = stem .. "aec" forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. oc_macron forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} end if types.distr then if stem:sub(-1) == "n" then forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum{R}"} forms["gen_pl_f"] = {stem .. "um", stem .. "ārum{R}"} forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum{R}"} else error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem) end end forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["1-1+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") forms["nom_sg_m"] = stem .. "a" forms["nom_pl_m"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ae" forms["gen_pl_m"] = stem .. "ārum" forms["dat_sg_m"] = stem .. "ae" forms["dat_pl_m"] = stem .. "īs" forms["acc_sg_m"] = stem .. "am" forms["acc_sg_n"] = stem .. "a" forms["acc_pl_m"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ā" forms["abl_pl_m"] = stem .. "īs" forms["voc_sg_m"] = stem .. "a" forms["voc_pl_m"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["2-2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "segunda declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local us = "us" local um = "um" local i_pl = stem .. "ī" if types.greek then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") us = "os" um = "on" i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = stem .. us forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = stem .. "e" forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end local function abl_i_e(...) local function update_slot(forms, slot, f, do_copy) if not forms[slot] then return do_copy elseif do_copy then f = deep_copy(f) end forms[slot] = f return true end function abl_i_e(stem, forms, types) local f, do_copy if types["abl_e_i"] then f = {stem .. "e", stem .. "ī"} elseif types["abl_i_e"] then f = {stem .. "ī", stem .. "e"} else return end do_copy = update_slot(forms, "abl_sg_m", f, do_copy) do_copy = update_slot(forms, "abl_sg_f", f, do_copy) -- Neuter doesn't take -e with i-stems. if not types.I then update_slot(forms, "abl_sg_n", f, do_copy) end end return abl_i_e(...) end adj_decl["3-1+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) if types.par then forms["nom_pl_n"] = stem2 .. "a" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["abl_sg_m"] = stem2 .. "e" forms["abl_sg_n"] = stem2 .. "e" forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"} -- Really? forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"} -- Why does this happen? forms["acc_pl_n"] = stem2 .. "a" forms["voc_pl_n"] = stem2 .. "a" end local es_base = stem1:match("^(.-)ēs$") if es_base and es_base == stem2 then if types.greek then forms["nom_sg_n"] = {stem2 .. "ē̆s{?}"} forms["acc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_m"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["nom_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["acc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["voc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["abl_sg_m"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["abl_sg_n"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["gen_pl_m"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} forms["gen_pl_n"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Adjetivos griegos") elseif types.not_greek then insert_if_not(data.title, "no griego") end end end adj_decl["3-def+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, defectivo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = stem2 .. "ēs" forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" if types.tor then insert_if_not(data.title, "tercera declinación, solo en masculino") insert_if_not(categories, "LA:Adjetivos solo en masculino") remove_forms(forms, {"_f$", "_n$"}) forms["nom_sg_m"] = stem1 forms["gen_sg_m"] = stem2 .. "is" forms["dat_sg_m"] = stem2 .. "ī" forms["acc_sg_m"] = stem2 .. "em" forms["abl_sg_m"] = stem2 .. "e" forms["voc_sg_m"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["gen_pl_m"] = stem2 .. "um" forms["dat_pl_m"] = stem2 .. "ibus" forms["acc_pl_m"] = stem2 .. "ēs" forms["abl_pl_m"] = stem2 .. "ibus" forms["voc_pl_m"] = stem2 .. "ēs" end if types.trix then insert_if_not(data.title, "tercera declinación, solo en femenino o en neutro plural") insert_if_not(categories, "LA:Adjetivos solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en neutro") remove_forms(forms, {"_m$", "sg_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.trixf then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.idis then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = {stem2 .. "is", stem2 .. "os"} forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = {stem2 .. "em", stem2 .. "a"} forms["abl_sg_f"] = stem2 .. "e" forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} forms["gen_pl_f"] = stem2 .. "um" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = {stem2 .. "ēs", stem2 .. "as"} forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} end forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-C+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1 = args[1] local stem2 = stem1 .. "ōr" insert_if_not(data.title, "tercera declinación, comparativo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos comparativos") forms["nom_sg_m"] = stem1 .. "or" forms["nom_sg_n"] = stem1 .. "us" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "a" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 .. "us" forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} forms["acc_pl_n"] = stem2 .. "a" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 .. "or" forms["voc_sg_n"] = stem1 .. "us" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "a" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-P+"] = function(data, args) local forms, notes = data.forms, data.notes local stem2 = args[2] adj_decl["3-1+"](data, args) insert_if_not(data.title, "tercera declinación, participio") insert_if_not(data.categories, "LA:Adjetivos de la tercera declinación") forms["abl_sg_m"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["abl_sg_n"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} end adj_decl["3-2+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem = args[1] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem .. "is" forms["nom_sg_n"] = stem .. "e" forms["nom_pl_m"] = stem .. "ēs" forms["nom_pl_n"] = stem .. "ia" forms["gen_sg_m"] = stem .. "is" forms["gen_sg_n"] = stem .. "is" forms["gen_pl_m"] = stem .. "ium" forms["gen_pl_n"] = stem .. "ium" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" forms["dat_pl_m"] = stem .. "ibus" forms["dat_pl_n"] = stem .. "ibus" forms["acc_sg_m"] = stem .. "em" forms["acc_sg_n"] = stem .. "e" forms["acc_pl_m"] = {stem .. "īs", stem .. "ēs"} forms["acc_pl_n"] = stem .. "ia" forms["abl_sg_m"] = stem .. "ī" forms["abl_sg_n"] = stem .. "ī" forms["abl_pl_m"] = stem .. "ibus" forms["abl_pl_n"] = stem .. "ibus" -- abl_i_e(stem, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem .. "is" forms["voc_sg_n"] = stem .. "e" forms["voc_pl_m"] = stem .. "ēs" forms["voc_pl_n"] = stem .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-3+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con tres terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_f"] = stem2 .. "is" forms["nom_sg_n"] = stem2 .. "e" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_f"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_f"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_f"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_f"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_f"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_f"] = stem2 .. "em" forms["acc_sg_n"] = stem2 .. "e" forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_f"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_f"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_f"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" -- abl_i_e(stem2, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem1 forms["voc_sg_f"] = stem2 .. "is" forms["voc_sg_n"] = stem2 .. "e" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_f"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["indecl+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = {} forms["gen_sg_m"] = {} forms["gen_pl_m"] = {} forms["dat_sg_m"] = {} forms["dat_pl_m"] = {} forms["acc_sg_m"] = stem forms["acc_pl_m"] = {} forms["abl_sg_m"] = {} forms["abl_pl_m"] = {} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["irreg+"] = function(data,args) local forms, types, pos, notes, categories = data.forms, data.types, data.pos, data.notes, data.categories local arg1 = args[1] insert_if_not(data.title, "irregular") insert_if_not(categories, "LA:Adjetivos irregulares") if arg1 == "duo" or arg1 == "ambō" then local stem = sub(arg1, 1, -2) -- data.title = stem == "amb" and "irregular adjective" or "numeral" data.num = "pl" local stem_with_o = stem .. (stem == "amb" and "ō" or "o") forms["nom_pl_m"] = stem_with_o forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem_with_o forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_pl_m"] = stem .. "ōbus" forms["dat_pl_f"] = stem .. "ābus" forms["dat_pl_n"] = stem .. "ōbus" forms["acc_pl_m"] = {stem .. "ōs", stem_with_o} forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem_with_o forms["abl_pl_m"] = stem .. "ōbus" forms["abl_pl_f"] = stem .. "ābus" forms["abl_pl_n"] = stem .. "ōbus" forms["voc_pl_m"] = stem_with_o forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem_with_o if stem == "du" then forms["gen_pl_m"] = {forms["gen_pl_m"], "duum", "duom{†}"} forms["gen_pl_n"] = {forms["gen_pl_n"], "duum", "duom{†}"} end elseif arg1:sub(-6) == "mīlle" then insert_if_not(data.title, "numeral semiindeclinable") local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "le" forms["nom_pl_m"] = {stem .. "ia", stem .. "lia"} forms["gen_sg_m"] = stem .. "le" forms["gen_pl_m"] = {stem .. "ium", stem .. "lium"} forms["dat_sg_m"] = stem .. "le" forms["dat_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["acc_sg_m"] = stem .. "le" forms["acc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["abl_sg_m"] = stem .. "le" forms["abl_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["voc_sg_m"] = stem .. "le" forms["voc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) elseif arg1 == "ille" or arg1 == "iste" or arg1 == "ipse" or arg1 == "olle" then local stem = arg1:sub(1, -2) types.ius = true adj_decl["1&2+"](data, {stem}) insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) forms["nom_sg_m"] = arg1 if arg1 == "ipse" then add_form(forms, "nom_sg_n", stem, "ud{MED}") add_form(forms, "acc_sg_n", stem, "ud{MED}") else forms["nom_sg_n"] = stem .. "ud" forms["acc_sg_n"] = stem .. "ud" end forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} elseif arg1 == "illic" or arg1 == "istic" or arg1 == "isthic" then insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["gen_sg_m"] = stem .. "ī̆usce" forms["gen_sg_f"] = stem .. "ī̆usce" forms["gen_sg_n"] = stem .. "ī̆usce" forms["dat_sg_m"] = stem .. "īc" forms["dat_sg_f"] = stem .. "īc" forms["dat_sg_n"] = stem .. "īc" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. "ōc" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["nom_pl_m"] = stem .. "īsce" forms["nom_pl_f"] = stem .. "aec" forms["nom_pl_n"] = stem .. "aec" forms["gen_pl_m"] = stem .. "ōrunc{?}" forms["gen_pl_f"] = stem .. "ārunc{?}" forms["gen_ok_n"] = stem .. "ōrunc{?}" forms["dat_pl_m"] = stem .. "īsce" forms["dat_pl_f"] = stem .. "īsce" forms["dat_pl_n"] = stem .. "īsce" forms["acc_pl_m"] = stem .. "ōsce" forms["acc_pl_f"] = stem .. "āsce" forms["acc_pl_n"] = stem .. "aec" forms["abl_pl_m"] = stem .. "īsce" forms["abl_pl_f"] = stem .. "īsce" forms["abl_pl_n"] = stem .. "īsce" forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "hice" then insert_if_not(data.title, "demostrativo") -- .. " pronoun" forms["nom_sg_m"] = "hice" forms["nom_sg_f"] = "haece" forms["nom_sg_n"] = "hoce" forms["nom_pl_m"] = "hīce" forms["nom_pl_f"] = "haece" forms["nom_pl_n"] = "haece" forms["gen_sg_m"] = "huiusce" forms["gen_sg_f"] = "huiusce" forms["gen_sg_n"] = "huiusce" forms["gen_pl_m"] = {"hōrunce", "hōrumce"} forms["gen_pl_f"] = {"hārunce", "hārumce"} forms["gen_pl_n"] = {"hōrunce", "hōrumce"} forms["dat_sg_m"] = "huīce" forms["dat_sg_f"] = "huīce" forms["dat_sg_n"] = "huīce" forms["dat_pl_m"] = "hīsce" forms["dat_pl_f"] = "hīsce" forms["dat_pl_n"] = "hīsce" forms["acc_sg_m"] = "hunce" forms["acc_sg_f"] = "hance" forms["acc_sg_n"] = "hoce" forms["acc_pl_m"] = "hōsce" forms["acc_pl_f"] = "hāsce" forms["acc_pl_n"] = "haece" forms["abl_sg_m"] = "hōce" forms["abl_sg_f"] = "hāce" forms["abl_sg_n"] = "hōce" forms["abl_pl_m"] = "hīsce" forms["abl_pl_f"] = "hīsce" forms["abl_pl_n"] = "hīsce" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "plūs" then insert_if_not(data.title, "comparativo") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación con una terminación") data.note = "Ninguna de las formas en singular se usaron en latín clásico" forms["nom_sg_n"] = "plūs" forms["nom_pl_m"] = "plūrēs" forms["nom_pl_n"] = "plūra" forms["gen_sg_m"] = "plūris" forms["gen_sg_n"] = "plūris" forms["gen_pl_m"] = "plūrium" forms["gen_pl_n"] = "plūrium" forms["dat_sg_m"] = "plūrī" forms["dat_sg_n"] = "plūrī" forms["dat_pl_m"] = "plūribus" forms["dat_pl_n"] = "plūribus" forms["acc_sg_m"] = "plūrem" forms["acc_sg_f"] = "plūrem" forms["acc_sg_n"] = "plūs" forms["acc_pl_m"] = {"plūrēs", "plūrīs"} forms["acc_pl_n"] = "plūra" forms["abl_sg_m"] = {"plūrī", "plūre"} forms["abl_sg_f"] = {"plūrī", "plūre"} forms["abl_sg_n"] = {"plūrī", "plūre"} forms["abl_pl_m"] = "plūribus" forms["abl_pl_n"] = "plūribus" forms["voc_sg_n"] = "plūs" forms["voc_pl_m"] = "plūrēs" forms["voc_pl_n"] = "plūra" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif match(arg1, "^egō̆?$") or arg1 == "nōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "nōs" forms["gen_sg_m"] = "meī" forms["gen_pl_m"] = {"nostrī", "nostrum"} forms["dat_sg_m"] = "mihī̆" forms["dat_pl_m"] = "nōbīs" forms["acc_sg_m"] = {"mē", "mēmē"} forms["acc_pl_m"] = "nōs" forms["abl_sg_m"] = {"mē", "mēmē"} forms["abl_pl_m"] = "nōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "nōs" elseif arg1 == "tū" or arg1 == "vōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "vōs" forms["gen_sg_m"] = "tuī" forms["gen_pl_m"] = {"vestrī", "vestrum"} forms["dat_sg_m"] = "tibī̆" forms["dat_pl_m"] = "vōbīs" forms["acc_sg_m"] = {"tē", "tētē"} forms["acc_pl_m"] = "vōs" forms["abl_sg_m"] = {"tē", "tētē"} forms["abl_pl_m"] = "vōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "vōs" elseif arg1 == "suī" then insert_if_not(data.title, "pronombre reflexivo") forms["nom_sg_m"] = {} forms["nom_pl_m"] = {} forms["gen_sg_m"] = arg1 forms["gen_pl_m"] = forms["gen_sg_m"] forms["dat_sg_m"] = "sibī̆" forms["dat_pl_m"] = forms["dat_sg_m"] forms["acc_sg_m"] = {"sē", "sēsē"} forms["acc_pl_m"] = {"sē", "sēsē"} forms["abl_sg_m"] = {"sē", "sēsē"} forms["abl_pl_m"] = {"sē", "sēsē"} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} elseif arg1 == "is" or arg1 == "īdem" then insert_if_not(data.title, "pronombre demostrativo") forms["nom_sg_m"] = "is" forms["nom_sg_f"] = "ea" forms["nom_sg_n"] = "id" forms["nom_pl_m"] = {"iī", "eī", "ī"} forms["nom_pl_f"] = "eae" forms["nom_pl_n"] = "ea" forms["gen_sg_m"] = {"eius", "ejus"} forms["gen_sg_f"] = {"eius", "ejus"} forms["gen_sg_n"] = {"eius", "ejus"} forms["gen_pl_m"] = {"eōrum", "eum"} forms["gen_pl_f"] = "eārum" forms["gen_pl_n"] = {"eōrum", "eum"} forms["dat_sg_m"] = {"eī", "e͡i", "ēī"} forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"} forms["dat_sg_n"] = {"eī", "e͡i", "ēī"} forms["dat_pl_m"] = {"iīs", "eīs", "īs"} forms["dat_pl_f"] = {"iīs", "eīs", "īs", "eābus"} forms["dat_pl_n"] = {"iīs", "eīs", "īs"} forms["acc_sg_m"] = "eum" forms["acc_sg_f"] = "eam" forms["acc_sg_n"] = "id" forms["acc_pl_m"] = "eōs" forms["acc_pl_f"] = "eās" forms["acc_pl_n"] = "ea" forms["abl_sg_m"] = "eō" forms["abl_sg_f"] = "eā" forms["abl_sg_n"] = "eō" forms["abl_pl_m"] = {"iīs", "eīs", "īs"} forms["abl_pl_f"] = {"iīs", "eīs", "īs"} forms["abl_pl_n"] = {"iīs", "eīs", "īs"} if arg1 == "īdem" then forms["nom_sg_m"] = "ī" forms["nom_sg_n"] = "i" forms["acc_sg_n"] = "i" end elseif arg1 == "quis" or arg1 == "quī" then data.note = "La forma ''qua'' es preferida frente a ''quae'' cuando se usa como indefinido" local id = "id" if arg1 == "quī" then insert_if_not(data.title, "determinante relativo/interrogativo") id = "od" forms["nom_sg_m"] = {"quī", "quis", "quei{†}"} forms["nom_sg_f"] = {"quae", "qua"} forms["acc_sg_f"] = "quam" forms["abl_sg_m"] = "quō" forms["abl_sg_f"] = "quā" forms["abl_sg_n"] = "quō" else insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = {"quis", "quī"} forms["nom_sg_f"] = {"quae", "qua", "quis{†}"} forms["acc_sg_f"] = {"quam", "quem{†}"} forms["abl_sg_m"] = {"quō", "quī"} forms["abl_sg_f"] = {"quā", "quī"} forms["abl_sg_n"] = {"quō", "quī"} end forms["nom_sg_n"] = "qu"..id forms["nom_pl_m"] = {"quī", "quei{†}"} forms["nom_pl_f"] = "quae" forms["nom_pl_n"] = {"quae", "qua"} forms["gen_sg_m"] = {"cuius", "quoius{†}"} forms["gen_sg_f"] = {"cuius", "quoius{†}"} forms["gen_sg_n"] = {"cuius", "quoius{†}"} forms["gen_pl_m"] = "quōrum" forms["gen_pl_f"] = "quārum" forms["gen_pl_n"] = "quōrum" forms["dat_sg_m"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_f"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_n"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_n"] = {"quibus", "quīs", "queis{†}"} forms["acc_sg_m"] = "quem" forms["acc_sg_n"] = "qu"..id forms["acc_pl_m"] = "quōs" forms["acc_pl_f"] = "quās" forms["acc_pl_n"] = {"quae", "qua"} forms["abl_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_n"] = {"quibus", "quīs", "queis{†}"} elseif arg1 == "aliquī" then insert_if_not(data.title, "determinante indefinido") forms["nom_sg_m"] = {"aliquī{DET/ADJ}", "aliquis{PRON/SUST}"} forms["nom_sg_f"] = {"aliqua", "aliquae{R}"} forms["nom_sg_n"] = "aliquod" forms["nom_pl_m"] = "aliquī" forms["nom_pl_f"] = "aliquae" forms["nom_pl_n"] = "aliqua" forms["gen_sg_m"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_f"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_n"] = {"alicuius", "aliquoius{†}"} forms["gen_pl_m"] = "aliquōrum" forms["gen_pl_f"] = "aliquārum" forms["gen_pl_n"] = "aliquōrum" forms["dat_sg_m"] = {"alicui", "aliquoi{†}"} forms["dat_sg_f"] = {"alicui", "aliquoi{†}"} forms["dat_sg_n"] = {"alicui", "aliquoi{†}"} forms["dat_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["acc_sg_m"] = "aliquem" forms["acc_sg_f"] = "aliquam" forms["acc_sg_n"] = "aliquod" forms["acc_pl_m"] = "aliquōs" forms["acc_pl_f"] = "aliquās" forms["acc_pl_n"] = "aliqua" forms["abl_sg_m"] = "aliquō" forms["abl_sg_f"] = "aliquā" forms["abl_sg_n"] = "aliquō" forms["abl_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} elseif arg1 == "quisquam" then insert_if_not(data.title, "determinante indefinido, concordancia en negativo") data.note = "En latín clásico, era preferidas las formas de ''ūllus'' en lugar de las esta voz para el femenino y el neutro." forms["nom_sg_m"] = "quisquam" forms["nom_sg_f"] = {"quaequam", "quisquam{†}"} forms["nom_sg_n"] = "quodquam" forms["nom_pl_m"] = "quīquam" forms["nom_pl_f"] = "quaequam" forms["nom_pl_n"] = "quaequam" forms["gen_sg_m"] = "cuiusquam" forms["gen_sg_f"] = "cuiusquam" forms["gen_sg_n"] = "cuiusquam" forms["gen_pl_m"] = "quōrumquam" forms["gen_pl_f"] = "quārumquam" forms["gen_pl_n"] = "quōrumquam" forms["dat_sg_m"] = "cuiquam" forms["dat_sg_f"] = "cuiquam" forms["dat_sg_n"] = "cuiquam" forms["dat_pl_m"] = "quibusquam" forms["dat_pl_f"] = "quibusquam" forms["dat_pl_n"] = "quibusquam" forms["acc_sg_m"] = "quemquam" forms["acc_sg_f"] = {"quamquam", "quemquam{†}"} forms["acc_sg_n"] = "quodquam" forms["acc_pl_m"] = "quōsquam" forms["acc_pl_f"] = "quāsquam" forms["acc_pl_n"] = "quaequam" forms["abl_sg_m"] = {"quōquam", "quīquam{†}"} forms["abl_sg_f"] = "quāquam" forms["abl_sg_n"] = "quōquam" forms["abl_pl_m"] = "quibusquam" forms["abl_pl_f"] = "quibusquam" forms["abl_pl_n"] = "quibusquam" forms["voc_sg_m"] = "quisquam" forms["voc_sg_f"] = "quaequam" forms["voc_sg_n"] = "quodquam" forms["voc_pl_m"] = "quīquam" forms["voc_pl_f"] = "quaequam" forms["voc_pl_n"] = "quaequam" elseif arg1 == "quisquis" then insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = "quisquis" forms["nom_sg_f"] = "quisquis" forms["nom_sg_n"] = {"quidquid", "quicquid"} forms["nom_pl_m"] = "quīquī" forms["nom_pl_f"] = "quaequae" forms["nom_pl_n"] = "quaequae" forms["gen_sg_m"] = "cuiuscuius" forms["gen_sg_f"] = "cuiuscuius" forms["gen_sg_n"] = "cuiuscuius" forms["gen_pl_m"] = "quōrumquōrum" forms["gen_pl_f"] = "quārumquārum" forms["gen_pl_n"] = "quōrumquōrum" forms["dat_sg_m"] = "cuicui" forms["dat_sg_f"] = "cuicui" forms["dat_sg_n"] = "cuicui" forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"} forms["acc_sg_m"] = "quemquem" forms["acc_sg_f"] = "quamquam" forms["acc_sg_n"] = {"quidquid", "quicquid"} forms["acc_pl_m"] = "quōsquōs" forms["acc_pl_f"] = "quāsquās" forms["acc_pl_n"] = "quaequae" forms["abl_sg_m"] = "quōquō" forms["abl_sg_f"] = "quāquā" forms["abl_sg_n"] = "quōquō" forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"} forms["voc_sg_m"] = "quisquis" forms["voc_sg_f"] = "quisquis" forms["voc_sg_n"] = {"quidquid", "quicquid"} forms["voc_pl_m"] = "quīquī" forms["voc_pl_f"] = "quaequae" forms["voc_pl_n"] = "quaequae" elseif arg1 == "ecquis" then insert_if_not(data.title, "pronombre interrogativo") forms["nom_sg_m"] = {"ecquis", "ecquī"} forms["nom_sg_f"] = {"ecqua", "ecquae"} forms["nom_sg_n"] = "ecquid" forms["nom_pl_m"] = "ecquī" forms["nom_pl_f"] = "ecquae" forms["nom_pl_n"] = {"ecqua", "ecquae"} forms["gen_sg_m"] = "eccuius" forms["gen_sg_f"] = "eccuius" forms["gen_sg_n"] = "eccuius" forms["dat_sg_m"] = "eccui" forms["dat_sg_f"] = "eccui" forms["dat_sg_n"] = "eccui" forms["acc_sg_m"] = "ecquem" forms["acc_sg_f"] = "ecquam" forms["acc_sg_n"] = "ecquod" forms["acc_pl_m"] = "ecquōs" forms["acc_pl_f"] = "ecquās" forms["acc_pl_n"] = {"ecqua", "ecquae"} forms["abl_sg_m"] = {"ecquō", "ecquī"} forms["abl_sg_f"] = {"ecquā", "ecquī"} forms["abl_sg_n"] = {"ecquō", "ecquī"} elseif arg1 == "quīdam" then insert_if_not(data.title, "pronombre indefinido") forms["nom_sg_m"] = "quīdam" forms["nom_sg_f"] = "quaedam" forms["nom_sg_n"] = "quiddam" forms["nom_pl_m"] = {"quīdam", "quēsdam{†}"} forms["nom_pl_f"] = "quaedam" forms["nom_pl_n"] = "quaedam" forms["gen_sg_m"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_f"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_n"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_pl_m"] = {"quōrundam", "quōrumdam"} forms["gen_pl_f"] = {"quārundam", "quārumdam"} forms["gen_pl_n"] = {"quōrundam", "quōrumdam"} forms["dat_sg_m"] = {"cuidam", "quoidam{†}"} forms["dat_sg_f"] = {"cuidam", "quoidam{†}"} forms["dat_sg_n"] = {"cuidam", "quoidam{†}"} forms["dat_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_n"] = {"quibusdam", "quīsdam{†}"} forms["acc_sg_m"] = {"quendam", "quemdam"} forms["acc_sg_f"] = {"quandam", "quamdam"} forms["acc_sg_n"] = "quiddam" forms["acc_pl_m"] = {"quōsdam", "quēsdam{†}"} forms["acc_pl_f"] = "quāsdam" forms["acc_pl_n"] = "quaedam" forms["abl_sg_m"] = "quōdam" forms["abl_sg_f"] = "quādam" forms["abl_sg_n"] = "quōdam" forms["abl_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_n"] = {"quibusdam", "quīsdam{†}"} elseif arg1 == "nēmō" then insert_if_not(data.title, "Determinante y pronombre, concordancia en negativo") forms["nom_sg_m"] = "nēmō" forms["nom_sg_f"] = "nēmō" forms["gen_sg_m"] = {"nūllī̆us", "nēminis{R}"} forms["gen_sg_f"] = {"nūllī̆us", "nēminis{R}"} forms["dat_sg_m"] = "nēminī" forms["dat_sg_f"] = "nēminī" forms["acc_sg_m"] = "nēminem" forms["acc_sg_f"] = "nēminem" forms["abl_sg_m"] = {"nūllō", "nēmine{R}"} forms["abl_sg_f"] = {"nūllā", "nēmine{R}"} else error('adjective ' .. arg1 .. ' not recognized') end end local function extract_base(lemma, ending) if ending:find("(", nil, true) then return match(lemma, ending) end return match(lemma, "^(.*)" .. ending .. "$") end local function get_noun_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local subtypes = ending_and_subtypes[2] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. -- In addition, M or F as a subtype is canceled by N, and -- vice-versa, but M doesn't cancel F or vice-versa; instead, -- we simply ignore the conflicting gender specification when -- constructing the combination of specified and inferred subtypes. -- The reason for this is that neuters have distinct declensions -- from masculines and feminines, but masculines and feminines have -- the same declension, and various nouns in Latin that are -- normally masculine are exceptionally feminine and vice-versa -- (nauta, agricola, fraxinus, malus "apple tree", manus, rēs, -- etc.). -- -- In addition, sg as a subtype is canceled by pl and vice-versa. -- It's also possible to specify both, which will override sg but -- not cancel it (in the sense that it won't prevent the relevant -- rule from matching). For example, there's a rule specifying that -- lemmas beginning with a capital letter and ending in -ius take -- the ius.voci.sg subtypes. Specifying such a lemma with the -- subtype both will result in the ius.voci.both subtypes, whereas -- specifying such a lemma with the subtype pl will cause this rule -- not to match, and it will fall through to a less specific rule -- that returns just the ius subtype, which will be combined with -- the explicitly specified pl subtype to produce ius.pl. if specified_subtypes["-" .. subtype] or subtype == "N" and (specified_subtypes.M or specified_subtypes.F) or (subtype == "M" or subtype == "F") and specified_subtypes.N or subtype == "sg" and specified_subtypes.pl or subtype == "pl" and specified_subtypes.sg then not_this_subtype = true break end end end if not not_this_subtype then if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] local base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending == stem2 then return base, stem2, subtypes end else local base = extract_base(lemma, ending) if base then return base, stem2, subtypes end end end end if decltype then error("Unrecognized ending for declension-" .. decltype .. " noun: " .. lemma) end return lemma, stem2, keys_to_list(specified_subtypes) end local patterns = { {"[mM]a", "%0t"}, {"e", ""}, {"([aoAO])([lr])", "%1" .. MACRON .. "%2"}, {"[eE]l", "%0l"}, {"([mM])en", "%1in"}, {"([tT]ūd)ō", "%1in"}, {"([gG])ō", "%1in"}, {"[ōŌ]", "%1n"}, {"er", "r"}, {"[ēi]s", ""}, {"([āēīōūȳĀĒĪŌŪȲ]n)s", function(v) return (gsub(toNFD(v), MACRON, "") .. "t") end}, {"([cC])eps", "%1ipit"}, {"([bp])s", "%1"}, {"us", "or"}, {"s", "t"}, {"ex", "ic"}, {"x", "c"}, } local function make_stem2(stem) local n for _, pattern in ipairs(patterns) do local key = pattern[1] stem, n = gsub(stem, key .. "$", pattern[2]) if n > 0 then -- debug_track("la-utilities/" .. key) REVISAR return toNFC(stem) end end -- debug_track("la-utilities") REVISAR return stem end local function detect_noun_subtype(lemma, stem2, typ, subtypes) local base, _ if typ == "1" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ām", {"F", "am"}}, {"ās", {"M", "Greek", "Ma"}}, {"ēs", {"M", "Greek", "Me"}}, {"ē", {"F", "Greek"}}, {"ae", {"F", "pl"}}, {"a", {"F"}}, }) elseif typ == "2" then local detected_subtypes lemma, stem2, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(.*r)$", {"M", "er"}}, {"^(.*v)os$", {"M", "vos"}}, {"^(.*v)om$", {"N", "vom"}}, -- If the lemma ends in -os and the user said N or -M, then the -- following won't apply, and the second (neuter) -os will applly. {"os", {"M", "Greek"}}, {"os", {"N", "Greek", "us"}}, {"on", {"N", "Greek"}}, -- -ius beginning with a capital letter is assumed a proper name, -- and takes the voci subtype (vocative in -ī) along with the ius -- subtype and sg-only. Other nouns in -ius just take the ius -- subtype. Explicitly specify "sg" so that if .pl is given, -- this rule won't apply. {"^(%u.*)ius$", {"M", "ius", "voci", "sg"}}, {"ius", {"M", "ius"}}, {"ium", {"N", "ium"}}, -- If the lemma ends in -us and the user said N or -M, then the -- following won't apply, and the second (neuter) -us will applly. {"us", {"M"}}, {"us", {"N", "us"}}, {"um", {"N"}}, {"iī", {"M", "ius", "pl"}}, {"ia", {"N", "ium", "pl"}}, -- If the lemma ends in -ī and the user said N or -M, then the -- following won't apply, and the second (neuter) -ī will applly. {"ī", {"M", "pl"}}, {"ī", {"N", "us", "pl"}}, {"oe", {"M", "Greek", "pl"}}, {"a", {"N", "pl"}}, }) stem2 = stem2 or lemma return lemma, stem2, detected_subtypes elseif typ == "3" then if subtypes.pl then if subtypes.Greek then base = lemma:match("^(.*)erēs$") if base then return base .. "ēr", base .. "er", {"er"} end base = lemma:match("^(.*)ontēs$") if base then return base .. "ōn", base .. "ont", {"on"} end base = lemma:match("^(.*)es$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural Greek noun: " .. lemma) end base = lemma:match("^(.*)ia$") if base then return base, stem2 or base, {"N", "I", "pure"} end base = lemma:match("^(.*)a$") if base then return base, stem2 or base, {"N"} end base = lemma:match("^(.*)ēs$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural noun: " .. lemma) end stem2 = stem2 or make_stem2(lemma) local detected_subtypes if subtypes.Greek then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"is", ""}, {"I"}}, {"ēr", {"er"}}, {"ōn", {"on"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} end if not subtypes.N then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"^(%u.*pol)is$", ""}, {"F", "polis", "sg", "loc"}}, {{"tūdō", "tūdin"}, {"F"}}, {{"tās", "tāt"}, {"F"}}, {{"tūs", "tūt"}, {"F"}}, {{"tiō", "tiōn"}, {"F"}}, {{"siō", "siōn"}, {"F"}}, {{"xiō", "xiōn"}, {"F"}}, {{"gō", "gin"}, {"F"}}, {{"or", "ōr"}, {"M"}}, {{"tr[iī]x", "trīc"}, {"F"}}, {{"is", ""}, {"I"}}, {{"^(%l.*)ēs$", ""}, {"I"}}, }) if base then return lemma, stem2, detected_subtypes end end base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"us", "or"}, {"N"}}, {{"us", "er"}, {"N"}}, {{"ma", "mat"}, {"N"}}, {{"men", "min"}, {"N"}}, {{"^(%u.*)e$", ""}, {"N", "sg"}}, {{"e", ""}, {"N", "I", "pure"}}, {{"al", "āl"}, {"N", "I", "pure"}}, {{"ar", "ār"}, {"N", "I", "pure"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} elseif typ == "4" then if subtypes.echo or subtypes.Callisto then base = lemma:match("^(.*)ō$") if not base then error("Declension-4 noun of subtype .echo or .Callisto should end in -ō: " .. lemma) end if subtypes.Callisto then return base, nil, {"F", "sg"} else return base, nil, {"F"} end end return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", {"M"}}, {"ū̆", {"N"}}, {"ūs", {"M", "pl"}}, {"ua", {"N", "pl"}}, }) elseif typ == "5" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"iēs", {"F", "i"}}, {"iēs", {"F", "i", "pl"}}, {"ēs", {"F"}}, {"ēs", {"F", "pl"}}, }) elseif typ == "sgpl" then return lemma, stem2, {} elseif typ == "irreg" and lemma == "domus" then -- [[domus]] auto-sets data.loc = true, but we need to know this -- before declining the noun so we can propagate it to other segments. return lemma, nil, {"loc"} elseif typ == "indecl" or typ == "irreg" and ( lemma == "Deus" or match(lemma, "^[IJ]ēs[uū]s$") or lemma == "Athōs" or lemma == "vēnum" ) then -- Indeclinable nouns, and certain irregular nouns, set data.num = "sg", -- but we need to know this before declining the noun so we can -- propagate it to other segments. return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", {"both"}}, {"", {"sg"}}, {"", {"pl"}}, }) elseif typ == "indecl" or typ == "irreg" then return lemma, nil, {} else return nil, nil, {} end end -- Given ENDINGS_AND_SUBTYPES (a list of four-tuples of ENDING, RETTYPE, -- SUBTYPES, PROCESS_RETVAL), check each ENDING in turn against LEMMA and -- STEM2. If it matches, return a four-tuple BASE, STEM2, RETTYPE, NEW_SUBTYPES -- where BASE is normally the remainder of LEMMA minus the ending, STEM2 is -- as passed in, RETTYPE is as passed in, and NEW_SUBTYPES is the same as -- SUBTYPES minus any subtypes beginning with a hyphen. If no endings match, -- throw an error if DECLTYPPE is non-nil, mentioning the DECLTYPE -- (user-specified declension); but if DECLTYPE is nil, just return the tuple -- nil, nil, nil, nil. -- -- In order for a given entry to match, ENDING must match and also the subtypes -- in SUBTYPES (a list) must not be incompatible with the passed-in -- user-specified subtypes SPECIFIED_SUBTYPES (a set, i.e. a table where the -- keys are strings and the value is always true). "Incompatible" means that -- a given SUBTYPE is specified in either one and -SUBTYPE in the other, or -- that "pl" is found in SPECIFIED_SUBTYPES and not in SUBTYPES. -- -- The ending spec in ENDINGS_AND_SUBTYPES is one of the following: -- -- 1. A simple string, e.g. "tūdō", specifying an ending. -- 2. A regex that should match the entire lemma (it should be anchored at -- the beginning with ^ and at the end with $), and contains a single -- capturing group to match the base. -- 3. A pair {SIMPLE_STRING_OR_REGEX, STEM2_ENDING} where -- SIMPLE_STRING_OR_REGEX is one of the previous two possibilities and -- STEM2_ENDING is a string specifying the corresponding ending that must -- be present in STEM2. If this form is used, the combination of -- base + STEM2_ENDING must exactly match STEM2 in order for this entry -- to be considered a match. An example is {"is", ""}, which will match -- lemma == "follis", stem2 == "foll", but not lemma == "lapis", -- stem2 == "lapid". -- -- If PROCESS_STEM2 is given and the returned STEM2 would be nil, call -- process_stem2(BASE) to get the STEM2 to return. local function get_adj_type_and_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes, process_stem2) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local rettype = ending_and_subtypes[2] local subtypes = ending_and_subtypes[3] local process_retval = ending_and_subtypes[4] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. if specified_subtypes["-" .. subtype] then not_this_subtype = true break end -- A subtype is canceled if the user specified SUBTYPE and -- -SUBTYPE is given in the to-be-returned subtypes. local must_not_be_present = subtype:match("^%-(.*)$") if must_not_be_present and specified_subtypes[must_not_be_present] then not_this_subtype = true break end end end if not not_this_subtype then local base if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending ~= stem2 then base = nil end else base = extract_base(lemma, ending) end if base then -- Remove subtypes of the form -SUBTYPE from the subtypes -- to be returned. local new_subtypes = {} for _, subtype in ipairs(subtypes) do if subtype:sub(1, 1) ~= "-" then insert(new_subtypes, subtype) end end if process_retval then base, stem2 = process_retval(base, stem2) end if process_stem2 then stem2 = stem2 or process_stem2(base) end return base, stem2, rettype, new_subtypes end end end if not decltype then return lemma, stem2, nil, keys_to_list(specified_subtypes) elseif decltype == "" then error("Unrecognized ending for adjective: " .. lemma) else error("Unrecognized ending for declension-" .. decltype .. " adjective: " .. lemma) end end -- Autodetect the type and subtype of an adjective given all the information -- specified by the user: lemma, stem2, declension type and specified subtypes. -- Four values are returned: the lemma base (i.e. the stem of the lemma, as -- required by the declension functions), the value of stem2 to pass to the -- declension function, the declension type and the autodetected subtypes. -- Note that this will not detect a given subtype if -SUBTYPE is specified for -- any subtype that would be returned, or if SUBTYPE is specified and -SUBTYPE -- is among the subtypes that would be returned (such subtypes are filtered out -- of the returned subtypes). local function detect_adj_type_and_subtype(lemma, stem2, typ, subtypes) local function base_as_stem2(base, stem2) return base, base end local function constant_base(baseval) return function(base, stem2) return baseval, nil end end local function decl12_stem2(base) return base end local function decl3_stem2(base) return make_stem2(base) end local decl12_entries = { {"us", "1&2+", {}}, {"a", "1&2+", {}}, {"um", "1&2+", {}}, {"ī", "1&2+", {"pl"}}, {"ae", "1&2+", {"pl"}}, {"a", "1&2+", {"pl"}}, -- Nearly all -os adjectives are greekA {"os", "1&2+", {"greekA", "-greekE"}}, {"os", "1&2+", {"greekE", "-greekA"}}, {"ē", "1&2+", {"greekE", "-greekA"}}, {"on", "1&2+", {"greekA", "-greekE"}}, {"on", "1&2+", {"greekE", "-greekA"}}, {"^(.*er)$", "1&2+", {"er"}}, {"^(.*ur)$", "1&2+", {"er"}}, {"^(h)ic$", "1&2+", {"ic"}}, } local decl3_entries = { {"^(.*er)$", "3-3+", {"I"}}, {"^(.*er)$", "3-3+", {}}, {"is", "3-2+", {"I"}}, {"is", "3-2+", {}}, {"e", "3-2+", {"I"}}, {"e", "3-2+", {}}, {"^(.*[ij])or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(.*[ij])or$", "3-C+", {}}, {"^(min)or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(min)or$", "3-C+", {}}, {"^(.*trīx)$", "3-def+", {"trix", "abl_i_e", "-abl_e_i"}}, {"^(.*trīx)$", "3-def+", {"trix"}}, {"^(.*tor)$", "3-def+", {"tor", "abl_i_e", "-abl_e_i"}}, {"^(.*tor)$", "3-def+", {"tor"}}, -- Detect -ēs as 3-1 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like quadripēs, volucripēs). -- Essentially, for declension-3 adjectives, we require that -- .pl is given if the lemma is plural. -- -- Most 3-1 adjectives are i-stem (e.g. audāx) so we require -I -- to be given with non-i-stem adjectives. The first entry below -- will apply when -I isn't given, the second when it is given. {"^(.*ēs)$", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"I"}}, {"^(.*ēs)$", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"par"}}, {"^(.*[ij])ōrēs$", "3-C+", {"pl"}}, {"^(min)ōrēs$", "3-C+", {"pl"}}, -- If .pl with -ēs, we don't know if the adjective is 3-1, 3-2 -- or 3-3. Since 3-2 is probably the most common, we infer it -- (as well as the fact that these adjectives *are* in a sense -- 3-2 since they have a distinct neuter in -(i)a. Note that -- we have two entries here; the first one will apply unless -- -I is given, and will infer an i-stem adjective; the second -- one will apply otherwise (and infer a non-i-stem 3-1 adjective). {"ēs", "3-2+", {"pl", "I"}, base_as_stem2}, {"ēs", "3-1+", {"pl", "par"}, base_as_stem2}, -- Same for neuters. {"ia", "3-2+", {"pl", "I"}, base_as_stem2}, {"a", "3-1+", {"pl", "par"}, base_as_stem2}, -- As above for -ēs but for miscellaneous singulars. {"", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"I"}}, {"", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"par"}}, } local function get_subtypes_and_endings(typ, f) local subtypes_and_endings = {} for _, v in ipairs(decl3_entries) do if f(v) then v = deep_copy(v) v[2] = typ insert(subtypes_and_endings, v) end end return subtypes_and_endings end local function compare(spec) return spec[2] == typ end if typ == "+" then local base, new_stem2, rettype, new_subtypes = get_adj_type_and_subtype_by_ending(lemma, stem2, nil, subtypes, decl12_entries, decl12_stem2) if rettype then return base, new_stem2, rettype, new_subtypes else return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) end elseif typ == "3+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) elseif typ == "1&2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl12_entries, decl12_stem2) elseif typ == "1-1+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"a", typ, {}}, {"ae", typ, {"pl"}}, }) elseif typ == "2-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", typ, {}}, {"um", typ, {}}, {"ī", typ, {"pl"}}, {"a", typ, {"pl"}}, {"os", typ, {"greek"}}, {"on", typ, {"greek"}}, {"oe", typ, {"greek", "pl"}}, }) elseif typ == "3-1+" then -- Use the specs from `decl3_entries`, but add the two i-stem 3-2+ specs when plural-only, as they're the same when 3-1+. local subtypes_and_endings = get_subtypes_and_endings(typ, function(spec) local spec1, spec2 = spec[1], spec[2] return spec2 == typ or (spec2 == "3-2+" and spec1 == "ēs" or spec1 == "ia") end) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-def+" then -- Like 3-1+ but defective in gender local subtypes_and_endings = get_subtypes_and_endings(typ, compare) insert(subtypes_and_endings, {"", typ, {"I"}}) insert(subtypes_and_endings, {"", typ, {"par"}}) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"is", typ, {}}, {"e", typ, {}}, -- Detect -ēs as 3-2 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like isoscelēs). Essentially, -- for declension-3 adjectives, we require that .pl is given -- if the lemma is plural. {"ēs", typ, {}}, {"ēs", typ, {"pl"}}, {"ia", typ, {"pl"}}, }, decl3_stem2) elseif typ == "3-3+" or typ == "3-P+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ēs", typ, {"pl"}, base_as_stem2}, {"ia", typ, {"pl"}, base_as_stem2}, {"", typ, {}}, }, decl3_stem2) elseif typ == "3-C+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, get_subtypes_and_endings(typ, compare), decl3_stem2) elseif typ == "irreg+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(duo)$", typ, {"pl"}}, {"^(ambō)$", typ, {"pl"}}, {"^(mīll?ia)$", typ, {"N", "pl"}, constant_base("mīlle")}, -- match ea {"^(ea)$", typ, {}, constant_base("is")}, -- match id {"^(id)$", typ, {}, constant_base("is")}, -- match plural eī, iī {"^([ei]ī)$", typ, {"pl"}, constant_base("is")}, -- match plural ea, eae {"^(eae?)$", typ, {"pl"}, constant_base("is")}, -- match eadem {"^(eadem)$", typ, {}, constant_base("īdem")}, -- match īdem, idem {"^([īi]dem)$", typ, {}, constant_base("īdem")}, -- match plural īdem {"^(īdem)$", typ, {"pl"}}, -- match plural eadem, eaedem {"^(eae?dem)$", typ, {"pl"}, constant_base("īdem")}, -- match illa, ipsa, ista; it doesn't matter if we overmatch because -- we'll get an error as we use the stem itself in the returned base {"^(i[lps][lst])a$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match illud, istud; as above, it doesn't matter if we overmatch {"^(i[ls][lt])ud$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match ipsum {"^(ipsum)$", typ, {}, constant_base("ipse")}, -- match plural illī, ipsī, istī; as above, it doesn't matter if we -- overmatch {"^(i[lps][lst])ī$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- match plural illa, illae, ipsa, ipsae, ista, istae; as above, it -- doesn't matter if we overmatch {"^(i[lps][lst])ae?$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- Detect quī as non-plural unless .pl specified. {"^(quī)$", typ, {}}, -- Otherwise detect quī as plural. {"^(quī)$", typ, {"pl"}}, -- Same for quae. {"^(quae)$", typ, {}, constant_base("quī")}, {"^(quae)$", typ, {"pl"}, constant_base("quī")}, {"^(quid)$", typ, {}, constant_base("quis")}, {"^(quod)$", typ, {}, constant_base("quī")}, {"^(qui[cd]quid)$", typ, {}, constant_base("quisquis")}, {"^(quīquī)$", typ, {"pl"}, constant_base("quisquis")}, {"^(quaequae)$", typ, {"pl"}, constant_base("quisquis")}, -- match all remaining lemmas in lemma form {"", typ, {}}, }) elseif typ == "indecl+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", typ, {"both"}}, {"", typ, {"sg"}}, {"", typ, {"pl"}}, }) else -- 0+ return lemma, nil, typ, {} end end local noun_lb = { nom_sg = "sg.", gen_sg = "sg.", dat_sg = "sg.", acc_sg = "sg.", abl_sg = "sg.", voc_sg = "sg.", loc_sg = "sg.", nom_pl = "pl.", gen_pl = "pl.", dat_pl = "pl.", acc_pl = "pl.", abl_pl = "pl.", voc_pl = "pl.", loc_pl = "pl." } function export.sust(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de = "num"}, ["nota"] = {}, } for form,_ in pairs(noun_lb) do params[form] = {lista=true} end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local genero local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, detected_subtypes = detect_noun_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end if not genero then if types.M then genero = "m" end if types.N then genero = "n" end if types.F then genero = "f" end end local es_adj if not r1 and genero then local typ r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) if r1 then c = typ es_adj = true end end assert(r1, "forma no reconocida: "..r[1]) local cb = es_adj and adj_decl[c] or noun_decl[c] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) if es_adj then local forms_ = {} for form,arr in pairs(data.forms) do local f1, f2 = form:match("^(.*)(_"..genero..")$") if f1 then forms_[f1] = arr end end data.forms = forms_ end if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, noun_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if declinfo["loc_sg"] and #declinfo["loc_sg"] == 0 then declinfo["loc_sg"] = nil end if declinfo["loc_pl"] and #declinfo["loc_pl"] == 0 then declinfo["loc_pl"] = nil end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local forms = sobreescribir_formas(declinfo, args, false, {}) comprobar_defectivo(forms, {}) forms = desactivar_formas(forms, function (form) return (form:find("pl$") and nopl) or (form:find("sg$") and nosg) end ) local raiz_nom = f(forms["nom_sg"][1] or forms["nom_pl"][1] or "?") local raiz_gen = f(forms["gen_sg"][1] or forms["gen_pl"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, noun_lb) local t = {} insert(t, {{""}, {"Singular"}, {"Plural"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg"], forms["nom_pl"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg"], forms["gen_pl"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg"], forms["dat_pl"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg"], forms["acc_pl"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg"], forms["abl_pl"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg"], forms["voc_pl"]}) if (forms["loc_sg"] and forms["loc_sg"][1]) or (forms["loc_pl"] and forms["loc_pl"][1]) then insert(t, {{"Locativo", header=true, color=COLOR_H}, forms["loc_sg"], forms["loc_pl"]}) end insert(t, {{args["nota"] or "", colspan=3}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_nom..", "..raiz_gen.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local adj_lb = { nom_sg_m = "m.", nom_sg_n = "n.", nom_sg_f = "f.", nom_pl_m = "m.", nom_pl_n = "n.", nom_pl_f = "f.", gen_sg_m = "m.", gen_sg_n = "n.", gen_sg_f = "f.", gen_pl_m = "m.", gen_pl_n = "n.", gen_pl_f = "f.", dat_sg_m = "m.", dat_sg_n = "n.", dat_sg_f = "f.", dat_pl_m = "m.", dat_pl_n = "n.", dat_pl_f = "f.", acc_sg_m = "m.", acc_sg_n = "n.", acc_sg_f = "f.", acc_pl_m = "m.", acc_pl_n = "n.", acc_pl_f = "f.", abl_sg_m = "m.", abl_sg_n = "n.", abl_sg_f = "f.", abl_pl_m = "m.", abl_pl_n = "n.", abl_pl_f = "f.", voc_sg_m = "m.", voc_sg_n = "n.", voc_sg_f = "f.", voc_pl_m = "m.", voc_pl_n = "n.", voc_pl_f = "f.", } function export.adj(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de="num"}, ["gen"] = {por_defecto="mfn"}, ["nota"] = {}, } for form,_ in pairs(adj_lb) do params[form] = {lista=true} end params["dat_pl"] = {lista=true} params["abl_pl"] = {lista=true} params["loc_pl"] = {lista=true} local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) if args["dat_pl"][1] then args["dat_pl_m"] = deep_copy(args["dat_pl"]) args["dat_pl_n"] = deep_copy(args["dat_pl"]) args["dat_pl_f"] = deep_copy(args["dat_pl"]) end if args["abl_pl"][1] then args["abl_pl_m"] = deep_copy(args["abl_pl"]) args["abl_pl_n"] = deep_copy(args["abl_pl"]) args["abl_pl_f"] = deep_copy(args["abl_pl"]) end if args["loc_pl"][1] then args["loc_pl_m"] = deep_copy(args["loc_pl"]) args["loc_pl_n"] = deep_copy(args["loc_pl"]) args["loc_pl_f"] = deep_copy(args["loc_pl"]) end args["dat_pl"] = nil args["abl_pl"] = nil args["loc_pl"] = nil assert(not find(title, " "), "locuciones no soportadas aún") -- REVISAR local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") a = a or subarg b = b or "+" local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end local cb = adj_decl[typ] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) local formas_ = {} -- necesario crear otro arreglo para no modificar las claves durante la iteración for form,arr in pairs(data.forms) do local pref = match(form, "^(.*)_m$") if pref and not data.forms[pref.."_f"] then formas_[pref.."_f"] = deep_copy(arr) end if pref and not data.forms[pref.."_n"] then formas_[pref.."_n"] = deep_copy(arr) end formas_[form] = arr end data.forms = formas_ if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, adj_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local m = find(args["gen"], "m") local fem = find(args["gen"], "f") local n = find(args["gen"], "n") local forms = sobreescribir_formas(declinfo, args, false, {}, adj_lb) comprobar_defectivo(forms) forms = desactivar_formas(forms, function (form) return (form:find("pl") and nopl) or (form:find("sg") and nosg) or (form:find("m$") and not m) or (form:find("f$") and not fem) or (form:find("n$") and not n) end ) local raiz_m = f(forms["nom_sg_m"][1] or forms["nom_pl_m"][1] or "?") local raiz_f = f(forms["nom_sg_f"][1] or forms["nom_pl_f"][1] or "?") local raiz_n = f(forms["nom_sg_n"][1] or forms["nom_pl_n"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, adj_lb) local t = {} insert(t, {{"Singular", colspan=4}, header=true, color=COLOR_H}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg_m"], forms["nom_sg_f"], forms["nom_sg_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg_m"], forms["gen_sg_f"], forms["gen_sg_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg_m"], forms["dat_sg_f"], forms["dat_sg_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg_m"], forms["acc_sg_f"], forms["acc_sg_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg_m"], forms["abl_sg_f"], forms["abl_sg_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg_m"], forms["voc_sg_f"], forms["voc_sg_n"]}) insert(t, {{"Plural", colspan=4, header=true, color=COLOR_H}}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_pl_m"], forms["nom_pl_f"], forms["nom_pl_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_pl_m"], forms["gen_pl_f"], forms["gen_pl_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_pl_m"], forms["dat_pl_f"], forms["dat_pl_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_pl_m"], forms["acc_pl_f"], forms["acc_pl_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_pl_m"], forms["abl_pl_f"], forms["abl_pl_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_pl_m"], forms["voc_pl_f"], forms["voc_pl_n"]}) insert(t, {{args["nota"] or "", colspan=4}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_m..", "..raiz_f..", "..raiz_n.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local EGO, TU, IS, NOS, VOS, EI = 1, 2, 3, 4, 5, 6 local tostr = {"1", "2", "3", "4", "5", "6"} local PRONOMBRES = {"ego", "tū", "is, ea, id", "nōs", "vōs", "eī, eae, ea"} local PRONOMBRES_SUBJ = {"ut ego", "ut tū", "ut is, ut ea, ut id", "ut nōs", "ut vōs", "ut eī, ut eae, ut ea"} local PRONOMBRES_IMP = {"―", "(tū)", "(is, ea, id)", "―", "(vōs)", "(eī, eae, ea)"} local IMPERSONALES = {"", "", "(id)", "", "", ""} local function obtener_pronombre(forma, impers) local conj, p = match(forma, "^(.*)(%d)$") if not p then return nil end p = tonumber(p) if impers then return IMPERSONALES[p] else if find(conj, "^subj") then return PRONOMBRES_SUBJ[p] end if find(conj, "^imper") then return PRONOMBRES_IMP[p] end return PRONOMBRES[p] end end local sufijos = { ["1"] = { inf_act = {"āre","isse"}, inf_pas = {"ārī"}, part_act = {"āns","ūrus"}, part_pas = {"andus","us"}, ger = {"andī","andō","andum"}, sup = {"um","ū"}, ind_pres = {"ō","ās","at","āmus","ātis","ant"}, ind_imp = {"ābam","ābās","ābat","ābāmus","ābātis","ābant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ābō","ābis","ābit","ābimus","ābitis","ābunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","āris","ātur","āmur","āminī","antur", nil,"āre"}, ind_imp_pas = {"ābar","ābāris","ābātur","ābāmur","ābāminī","ābantur", nil,"ābāre"}, ind_fut_pas = {"ābor","āberis","ābitur","ābimur","ābiminī","ābuntur", nil,"ābere"}, subj_pres = {"em","ēs","et","ēmus","ētis","ent"}, subj_imp = {"ārem","ārēs","āret","ārēmus","ārētis","ārent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"er","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_imp_pas = {"ārer","ārēris","ārētur","ārēmur","ārēminī","ārentur", nil,"ārēre"}, imper_pres = {nil,"ā",nil,nil,"āte",nil}, imper_fut = {nil,"ātō","ātō",nil,"ātōte","antō"}, imper_pres_pas = {nil,"āre",nil,nil,"āminī",nil}, imper_fut_pas = {nil,"ātor","ātor",nil,nil,"antor"}, }, ["2"] = { inf_act = {"ēre","isse"}, inf_pas = {"ērī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"eō","ēs","et","ēmus","ētis","ent"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ēbō","ēbis","ēbit","ēbimus","ēbitis","ēbunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"eor","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ēbor","ēberis","ēbitur","ēbimur","ēbiminī","ēbuntur", nil,"ēbere"}, subj_pres = {"eam","eās","eat","eāmus","eātis","eant"}, subj_imp = {"ērem","ērēs","ēret","ērēmus","ērētis","ērent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ear","eāris","eātur","eāmur","eāminī","eantur", nil,"eāre"}, subj_imp_pas = {"ērer","ērēris","ērētur","ērēmur","ērēminī","ērentur", nil,"ērēre"}, imper_pres = {nil,"ē",nil,nil,"ēte",nil}, imper_fut = {nil,"ētō","ētō",nil,"ētōte","entō"}, imper_pres_pas = {nil,"ēre",nil,nil,"ēminī",nil}, imper_fut_pas = {nil,"ētor","ētor",nil,nil,"entor"}, }, ["3"] = { -- 3 (comparar [[capio]] con [[lego]], las raíces con capi- y leg- pero hay que eliminar la doble ii) inf_act = {"ere","isse"}, inf_pas = {"ī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", nil,"ere"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_pres = {"am","ās","at","āmus","ātis","ant"}, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", nil,"āre"}, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", nil,"erēre"}, imper_pres = {nil,"e",nil,nil,"ite",nil}, imper_fut = {nil,"itō","itō",nil,"itōte","untō"}, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil}, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor"}, }, ["3/4"] = { inf_act = {"ere","isse","īre","isse"}, inf_pas = {"ī","īrī"}, part_act = {"ēns","iēns","ūrus"}, part_pas = {"endus","iendus","us"}, ger = {"endī","endō","endum","iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt", "iō","īs",nil,"īmus","ītis","iunt" }, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant", "iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant" }, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent", "iam","iēs","iet","iēmus","iētis","ient" }, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", "ior","ere","ītur","īmur","īminī","iuntur", nil,"īris",nil,nil,nil,nil, nil,"īre" }, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", "iēbar","ēbāre","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāris",nil,nil,nil,nil, nil,"iēbāre" }, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", "iar","ēre","iētur","iēmur","iēminī","ientur", nil,"iēris",nil,nil,nil,nil, nil,"iēre" }, subj_pres = {"am","ās","at","āmus","ātis","ant", "iam","iās","iat","iāmus","iātis","iant", }, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent", "īrem","īrēs","īret","īrēmus","īrētis","īrent" }, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", "iar","āre","iātur","iāmur","iāminī","iantur", nil,"iāris",nil,nil,nil,nil, nil,"iāre" }, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", "īrer","erēre","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēris",nil,nil,nil,nil, nil,"īrēre" }, imper_pres = {nil,"e",nil,nil,"ite",nil, nil,"ī",nil,nil,"īte",nil }, imper_fut = {nil,"itō","itō",nil,"itōte","untō", nil,"ītō","ītō",nil,"ītōte","iuntō" }, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil, nil,"īre",nil,nil,"īminī",nil }, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor", nil,"ītor","ītor",nil,nil,"iuntor" }, }, ["4"] = { inf_act = {"īre","isse"}, inf_pas = {"īrī"}, part_act = {"iēns","ūrus"}, part_pas = {"iendus","us"}, ger = {"iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"iō","īs","it","īmus","ītis","iunt"}, ind_imp = {"iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"iam","iēs","iet","iēmus","iētis","ient"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"ior","īris","ītur","īmur","īminī","iuntur", nil,"īre"}, ind_imp_pas = {"iēbar","iēbāris","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāre"}, ind_fut_pas = {"iar","iēris","iētur","iēmur","iēminī","ientur", nil,"iēre"}, subj_pres = {"iam","iās","iat","iāmus","iātis","iant"}, subj_imp = {"īrem","īrēs","īret","īrēmus","īrētis","īrent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"iar","iāris","iātur","iāmur","iāminī","iantur", nil,"iāre"}, subj_imp_pas = {"īrer","īrēris","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēre"}, imper_pres = {nil,"ī",nil,nil,"īte",nil}, imper_fut = {nil,"ītō","ītō",nil,"ītōte","iuntō"}, imper_pres_pas = {nil,"īre",nil,nil,"īminī",nil}, imper_fut_pas = {nil,"ītor","ītor",nil,nil,"iuntor"}, } } local formas_no_personales = { inf_act = true, inf_pas = true, part_act = true, part_pas = true, ger = true, sup = true, } local formas_personales = { ind_pres = true, ind_imp = true, ind_perf = true, ind_pluperf = true, ind_fut = true, ind_fut_perf = true, ind_fut_sig = true, ind_pres_pas = true, ind_imp_pas = true, ind_fut_pas = true, subj_pres = true, subj_imp = true, subj_perf = true, subj_pluperf = true, subj_aor_sig = true, subj_pres_pas = true, subj_imp_pas = true, imper_pres = true, imper_fut = true, imper_pres_pas = true, imper_fut_pas = true, } local formas = merge(formas_no_personales, formas_personales) local verbos_irregulares = { {"aiō", {"aiō", "aiiō", "aijō", "ajō"}, { desactivar = {"inf_pas","part_pas","ger","sup","ind_pluperf","ind_fut","ind_fut_perf", "ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_perf","subj_pluperf","subj_pres_pas", "subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {"ai"}, nucleoperf = {"a"}, nucleosup = {}, nucleosigm = {}, inf_act = {"aiere"}, ind_pres = {nil,nil,nil,{}}, ind_perf = {{},nil,nil,{},{}}, subj_pres = {nil,nil,nil,{},{}}, subj_imp = {{},{},nil,{},{},{}}, imper_pres = {{},{"ai"},{},{},{},{}}, }}, {"cedo", {"cedo"}, { desactivar = {"inf_act","inf_pas","part_act","part_pas","ger","sup","ind_pluperf","ind_pres","ind_imp","ind_perf", "ind_fut","ind_fut_perf","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres","subj_imp","subj_perf", "subj_pluperf","subj_pres_pas","subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, imper_pres = {nil,{"cedo"},nil,nil,{"cette","cedile"},nil}, }}, {"dīcō", {"dīcō"}, { conj = "3", nucleopres = {"dīc"}, nucleoperf = {"dīx"}, nucleosup = {"dict"}, nucleosigm = {"dīx"}, desactivar = {}, part_pas = {"dīcendus", "dīcundus", "dictus"}, imper_pres = {nil, {"dīc", "dīce"}}, inf_pas = {"dīcī", "dīcier{L}"}, }}, {"dō", {"dō"}, { conj = "1", nucleopres = {"d"}, nucleoperf = {"ded"}, nucleosup = {"dat"}, nucleosigm = {}, desactivar = {}, inf_act = {"dare","dedisse"}, inf_pas = {"darī"}, ind_pres = {nil,nil,nil,{"damus"},{"datis"},nil}, ind_imp = {{"dabam"},{"dabās"},{"dabat"},{"dabāmus"},{"dabātis"},{"dabant"}}, ind_fut = {{"dabō"},{"dabis"},{"dabit"},{"dabimus"},{"dabitis"},{"dabunt"}}, ind_imp_pas = {{"dabar"},{"dabāris","dabāre"},{"dabātur"},{"dabāmur"},{"dabāminī"},{"dabantur"}}, ind_fut_pas = {{"dabor"},{"daberis","dabere"},{"dabitur"},{"dabimur"},{"dabiminī"},{"dabuntur"}}, subj_imp = {{"darem"},{"darēs"},{"daret"},{"darēmus"},{"darētis"},{"darent"}}, subj_imp_pas = {{"darer"},{"darēris","darēre"},{"darētur"},{"darēmur"},{"darēminī"},{"darentur"}}, imper_pres = {nil,nil,nil,nil,{"date"},nil}, imper_fut = {nil,{"datō"},{"datō"},nil,{"datōte"},{"dantō"}}, imper_pres_pas = {nil,{"dare"},nil,nil,{"daminī"},nil}, imper_fut_pas = {nil,{"dator"},{"dator"},nil,nil,{"dator"}}, }}, {"dūcō", {"dūcō"}, { conj = "3", nucleopres = {"dūc"}, nucleoperf = {"dūx"}, nucleosup = {"duct"}, nucleosigm = {}, desactivar = {}, imper_pres = {nil, {"dūc", "dūce"}}, }}, {"edō", {"edō", "ëdō"}, { conj = "3", nucleopres = {"ed"}, nucleoperf = {"ed"}, nucleosup = {""}, nucleosigm = {}, desactivar = {}, inf_act = {"edere","ēsse"}, part_act = {"edēns","ēsūrus","ēssūrus","ēstūrus"}, part_pas = {"edendus","edundus","ēsus","ēssus","ēstus"}, sup = {"ēsum","ēssum","ēstum","ēsū","ēssū","ēstū"}, ind_pres = {nil,{"edis","ēs"},{"edit","ēst"},nil,{"editis","ēstis"},nil}, ind_pres_pas = {nil,{"ederis","edere","ēssis","ēsse"},{"editur","ēstur"}}, subj_pres = {{"edam","edim"},{"edās","edīs"},{"edat","edit","ēst"},{"edāmus","edīmus"},{"edātis","edītis"},{"edant","edint"}}, subj_imp = {{"ederem","ēssem"},{"ederēs","ēssēs"},{"ederet","ēsset"},{"ederēmus","ēssēmus"},{"ederētis","ēssētis"},{"ederent","ēssent"}}, subj_imp_pas = {{"ederer","ēsser"},{"ederēris","ederēre","ēssēris","ēssēre"},{"ederetur","ēssetur"},{"ederēmur","ēssēmur"},{"ederēminī","ēssēminī"},{"ederentur","ēssentur"}}, imper_pres = {nil,{"ede","ēs"},nil,nil,{"edite","ēste"},nil}, imper_fut = {nil,{"editō","ēstō"},{"editō","ēstō"},nil,{"editōte","ēstōte"},{"eduntō"}}, imper_pres_pas = {nil,{"edere","ēsse"},nil,nil,{"ediminī"},nil}, imper_fut_pas = {nil,{"editor","ēstor"},{"editor","ēstor"},nil,nil,{"eduntor"}}, }}, {"eō", {"eō", "ëō"}, { conj = "4", nucleopres = {""}, nucleoperf = {""}, nucleosup = {""}, nucleosigm = {}, desactivar = {"imper_pres_pas"}, inf_act = {"īre","īsse","iisse","īvisse"}, inf_pas = {"īrī","īrier"}, part_act = {"iēns","itūrus"}, part_pas = {"eundum","itum"}, ger = {"eundī","eundō","eundum"}, sup = {"itum","itū"}, ind_pres = {{"eō"},{"īs"},{"it"},{"īmus"},{"ītis"},{"eunt"}}, ind_imp = {{"ībam"},{"ībās"},{"ībat"},{"ībāmus"},{"ībātis"},{"ībant"}}, ind_perf = {{"iī","īvī"},{"īstī","iistī","īvistī"},{"iit","īvit"},{"iimus","īvimus"},{"īstis","iistis","īvistis"},{"iērunt","iēre","īvērunt","īvēre"}}, ind_pluperf = {{"ieram","īveram"},{"ierās","īverās"},{"ierat","īverat"},{"ierāmus","īverāmus"},{"ierātis","īverātis"},{"ierant","īverant"}}, ind_fut = {{"ībō"},{"ībis"},{"ībit"},{"ībimus"},{"ībitis"},{"ībunt"}}, ind_fut_perf = {{"ierō","īverō"},{"ieris","īveris"},{"ierit","īverit"},{"ierimus","īverimus"},{"ieritis","īveritis"},{"ierint","īverint"}}, ind_fut_sig = {nil,nil,nil,nil,nil,nil}, ind_pres_pas = {{},{},{"ītur"},{},{},{}}, ind_imp_pas = {{},{},{"ībātur"},{},{},{}}, ind_fut_pas = {{},{},{"ībitur"},{},{},{}}, subj_pres = {{"eam"},{"eās"},{"eat"},{"eāmus"},{"eātis"},{"eant"}}, subj_imp = {{"īrem"},{"īrēs"},{"īret"},{"īrēmus"},{"īrētis"},{"īrent"}}, subj_perf = {{"ierim","īverim"},{"ierīs","īverīs"},{"ierit","īverit"},{"ierīmus","īverīmus"},{"ierītis","īverītis"},{"ierint","īverint"}}, subj_pluperf = {{"īssem","iissem","īvissem"},{"īssēs","iissēs","īvissēs"},{"īsset","iisset","īvisset"},{"īssēmus","iissēmus","īvissēmus"},{"īssētis","iissētis","īvissētis"},{"īssent","iissent","īvissent"}}, subj_aor_sig = {nil,nil,nil,nil,nil,nil}, subj_pres_pas = {{},{},{"eātur"},{},{},{}}, subj_imp_pas = {{},{},{"īrētur"},{},{},{}}, imper_pres = {nil,nil,nil,nil,nil,nil}, imper_fut = {nil,nil,nil,nil,nil,{"euntō"}}, imper_fut_pas = {nil,{},nil,nil,nil,{}}, }}, {"faciō", {"faciō"}, { conj = "3", I = true, inf_act = {"facere", "fāre{L}", "fēcisse"}, inf_pas = {"fierī"}, part_pas = {"faciendus", "faciundus", "factus"}, nucleopres = {"fac"}, nucleoperf = {"fēc"}, nucleosup = {"fact"}, nucleosigm = {"fax","faxs","facs"}, desactivar = {}, ind_pres_pas = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, ind_imp_pas = {{"fīēbam"},{"fīēbās"},{"fīēbat"},{"fīēbāmus"},{"fīēbātis"},{"fīēbant"}}, ind_fut_pas = {{"fīam"},{"fīēs"},{"fīet"},{"fīēmus"},{"fīētis"},{"fīent"}}, subj_pres_pas = {{"fīam"},{"fīās"},{"fīat"},{"fīāmus"},{"fīātis"},{"fīant"}}, subj_imp_pas = {{"fierem"},{"fierēs"},{"fieret"},{"fierēmus"},{"fierētis"},{"fierent"}}, imper_pres = {nil,{"fac","face"},nil,nil,nil,nil}, imper_pres_pas = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut_pas = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"ferō", {"ferō"}, { conj = "3", nucleopres = {"fer"}, nucleoperf = {"tul", "tetul{†}"}, nucleosup = {"lāt"}, nucleosigm = {}, desactivar = {}, inf_act = {"ferre", "tulisse", "tetulisse{†}"}, inf_pas = {"ferrī"}, ind_pres = {nil,{"fers"},{"fert"},nil,{"fertis"}}, ind_pres_pas = {nil,{"ferris","ferre"}}, subj_imp = {{"ferrem"},{"ferrēs"},{"ferret"},{"ferrēmus"},{"ferrētis"},{"ferrent"}}, subj_imp_pas = {{"ferrer"},{"ferrēris","ferrēre"},{"ferrētur"},{"ferrēmur"},{"ferrēminī"},{"ferrentur"}}, imper_pres = {nil,{"fer"},nil,nil,{"ferte"},nil}, imper_pres_pas = {nil,{"ferre"},nil,nil,nil,nil}, imper_fut = {nil,{"fertō"},{"fertō"},nil,{"fertōte"},{"feruntō"}}, imper_fut_pas = {nil,{"fertor"},{"fertor"},nil,nil,nil}, }}, {"fīō", {"fīō"}, { conj = "3", nucleopres = {"fī"}, nucleoperf = {}, nucleosup = {"fact"}, nucleosigm = {}, semidep = true, desactivar = {}, inf_act = {"fierī"}, ind_pres = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, imper_pres = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"inquam", {"inquam"}, { conj = "3", I = true, nucleopres = {"inqu"}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, nopasivo = true, desactivar = {"inf_act","inf_pas","part_pas","ger"}, ind_pres = {{"inquam"}}, }}, {"possum", {"possum"}, { conj = "3", nucleopres = {"pot"}, nucleoperf = {"pot"}, nucleosup = {}, nucleosigm = {}, pres = "possō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"posse","potesse{†}"}, part_act = {"potēns"}, ind_pres = {{"possum"},{"potes"},{"potest"},{"possumus"},{"potestis"},{"possunt"}}, ind_imp = {{"poteram"},{"poterās"},{"poterat"},{"poterāmus"},{"poterātis"},{"poterant"}}, ind_fut = {{"poterō"},{"poteris","potere"},{"poterit"},{"poterimus"},{"poteritis"},{"poterunt"}}, ind_perf = {{"potuī"},{"potuistī"},{"potuit"},{"potuimus"},{"potuistis"},{"potuērunt","potuēre"}}, ind_pluperf = {{"potueram"},{"potuerās"},{"potuerat"},{"potuerāmus"},{"potuerātis"},{"potuerant"}}, ind_fut_perf = {{"potuerō"},{"potueris"},{"potuerit"},{"potuerimus"},{"potueritis"},{"potuerunt"}}, subj_pres = {{"possem"},{"possēs"},{"possēt"},{"possēmus"},{"possētis"},{"possent"}}, subj_imp = {{"possim"},{"possīs"},{"possit"},{"possīmus"},{"possītis"},{"possint"}}, subj_perf = {{"potuerim"},{"potuerīs"},{"potuerit"},{"potuerīmus"},{"potuerītis"},{"potuerint"}}, subj_pluperf = {{"potuissem"},{"potuissēs"},{"potuisset"},{"potuissēmus"},{"potuissētis"},{"potuissent"}}, }}, {"sum", {"sum"}, { conj = "3", nucleopres = {"s"}, nucleoperf = {"fu"}, nucleosup = {}, nucleosigm = {}, pres = "sō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres_pas","imper_fut_pas"}, inf_act = {"esse"}, part_act = {"futūrus"}, ind_pres = {{"sum"},{"es"},{"est"},{"sumus"},{"estis"},{"sunt"}}, ind_imp = {{"eram"},{"erās"},{"erat"},{"erāmus"},{"erātis"},{"erant"}}, ind_fut = {{"erō"},{"eris","ere"},{"erit"},{"erimus"},{"eritis"},{"erunt"}}, subj_pres = {{"sim","siem","fuam{†}"},{"sīs","siēs","fuās{†}"},{"sit","siet","fuat{†}"},{"sīmus","siēmus","fuāmus{†}"},{"sītis","siētis","fuātis{†}"},{"sint","sient","fuant{†}"}}, subj_imp = {{"essem","forem"},{"essēs","forēs"},{"esset","foret"},{"essēmus","forēmus"},{"essētis","forētis"},{"essent","forent"}}, imper_pres = {nil,{"es"},nil,nil,{"este"},nil}, imper_fut = {nil,{"estō"},{"estō"},nil,{"estōte"},nil}, }}, {"mālō", {"mālō"}, { conj = "3", nucleopres = {"māl"}, nucleoperf = {"mālu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"mālle","māluisse"}, ind_pres = {{"mālō"},{"māvīs"},{"māvult"},{"mālumus"},{"māvultis"},{"mālunt"}}, subj_pres = {{"mālim"},{"mālīs"},{"mālit"},{"mālīmus"},{"mālītis"},{"mālint"}}, subj_imp = {{"māllem"},{"māllēs"},{"māllet"},{"māllēmus"},{"māllētis"},{"māllent"}}, }}, {"nōlō", {"nōlō"}, { conj = "3", nucleopres = {"nōl"}, nucleoperf = {"nōlu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"nōlle","nōluisse"}, ind_pres = {{"nōlō"},{"nōn vīs","nevīs{†}"},{"nōn vult","nōn volt","nevolt{†}"},{"nōlumus"},{"nōn vultis","nōn voltis","nōltis{†}"},{"nōlunt"}}, subj_pres = {{"nōlim"},{"nōlīs"},{"nōlit"},{"nōlīmus"},{"nōlītis"},{"nōlint"}}, subj_imp = {{"nōllem"},{"nōllēs"},{"nōllet"},{"nōllēmus"},{"nōllētis"},{"nōllent"}}, }}, {"volō", {"volō"}, { conj = "3", nucleopres = {"vol"}, nucleoperf = {"volu"}, nucleosup = {"volit"}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"velle","voluisse"}, ind_pres = {{"volō"},{"vīs"},{"vult","volt{†}"},{"volumus"},{"vultis","voltis{†}"},{"volunt"}}, subj_pres = {{"velim","volim{†}"},{"velīs","volīs{†}"},{"velit","volit{†}"},{"velīmus","volīmus{†}"},{"velītis","volītis{†}"},{"velint","volint{†}"}}, subj_imp = {{"vellem"},{"vellēs"},{"vellet"},{"vellēmus"},{"vellētis"},{"vellent"}}, }}, } local function combinar_prefijo_nucleosufijo(prefijo, nucleosufijo) return prefijo..nucleosufijo end local function combinar_nucleo_sufijo(nucleo, sufijo, agregar_i) if agregar_i and (not find(sufijo, "^[iī]")) and (sufijo ~= "e") and (not find(sufijo, "^er")) then return nucleo.."~i~"..sufijo end return nucleo..sufijo end local function agregar_forma(conjugado, conjinfo, forma) conjinfo[forma] = conjinfo[forma] or {} local sufijos_ = sufijos[conjinfo.conj][forma] local nucleos local prefijo if forma == "sup" then nucleos = conjinfo.nucleosup prefijo = conjinfo.prefijosup or conjinfo.prefijo elseif find(forma, "sig") then nucleos = conjinfo.nucleosigm prefijo = conjinfo.prefijosigm or conjinfo.prefijo elseif find(forma, "perf") then nucleos = conjinfo.nucleoperf prefijo = conjinfo.prefijoperf or conjinfo.prefijo else nucleos = conjinfo.nucleopres prefijo = conjinfo.prefijo end if formas_no_personales[forma] then if conjinfo[forma][1] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma]) do insert_if_not(conjugado[forma], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else for _, sufijo in ipairs(sufijos_) do local nucleos_ = nucleos if forma == "inf_act" and sufijo == "isse" then nucleos_ = conjinfo.nucleoperf elseif forma == "part_act" and sufijo == "ūrus" then nucleos_ = conjinfo.nucleosup elseif forma == "part_pas" and sufijo == "us" then nucleos_ = conjinfo.nucleosup end local agregar_i = conjinfo.I and nucleos_ == conjinfo.nucleopres for _,nucleo in ipairs(nucleos_) do insert_if_not(conjugado[forma], combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(nucleo, sufijo, agregar_i))) end end end return end for i = EGO, EI do local p = tostr[i] if conjinfo[forma][i] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma][i]) do insert_if_not(conjugado[forma..p], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else local k = i while sufijos_[k] do local agregar_i = conjinfo.I and nucleos == conjinfo.nucleopres for j, n in ipairs(nucleos) do local x = combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(n, sufijos_[k], agregar_i)) if conjinfo.always_sync_perf and (forma == "ind_perf" or forma == "ind_pluperf" or forma == "ind_fut_perf" or forma == "subj_perf" or forma == "subj_pluperf") then x = x:gsub("īvī", "iī") x = x:gsub("īvi", "ī") x = x:gsub("īve", "ī") x = x:gsub("īvē", "ē") end insert_if_not(conjugado[forma..p], x) end k = k + 6 end end end end local function get_subtype_by_ending(pres, conjinfo, specs) for _, spec in ipairs(specs) do local base = extract_base(pres, spec[1]) if base then for _,s in ipairs(spec[2]) do if conjinfo[s] == nil then conjinfo[s] = true end end return base end end error("Unrecognized ending for conjugation " .. conjinfo["conj"]) end local function detect_v_type_and_subtypes(conjinfo) local pres = conjinfo["v"] local conj_arg = conjinfo["conj"] pres = toNFC(pres) local base_conj_arg, auto_perf_supine = conj_arg:match("^([124]/?4?)(%+%+?)$") if base_conj_arg then if auto_perf_supine == "++" and base_conj_arg ~= "4" then error("Conjugation types 1++ and 2++ not allowed") end conj_arg = base_conj_arg end conjinfo.conj = conj_arg if conj_arg == "1" then local base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"at", {"impers"}}, {"ātur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "āv" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "āt" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "āss" end end elseif conj_arg == "2" then local base = get_subtype_by_ending(pres, conjinfo, { {"eō", {}}, {"eor", {"dep"}}, {"et", {"impers"}}, {"ētur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "u" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "it" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3" then local base if conjinfo.I == false then -- si explícitamente se indicó que no es del tipo -io, hay que excluir sufijos base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) else base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) end if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end assert(conjinfo["nucleoperf"][1], "especifique todos los núcleos para verbos de la tercera conjugación") assert(conjinfo["nucleosup"][1], "especifique todos los núcleos para verbos de la tercera conjugación") if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3/4" then local base base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "4" then local base = get_subtype_by_ending(pres, conjinfo, { {"iō", {}}, {"ior", {"dep"}}, {"it", {"impers"}}, {"ītur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "irreg" then for _,p in ipairs(verbos_irregulares) do for _,rx in ipairs(p[2]) do local pref, verb = match(conjinfo.v, "^(.*)("..rx..")$") if verb then conjinfo.v = verb conjinfo.prefijo = pref if conjinfo.nucleoperf[1] and conjinfo.nucleoperf[1] ~= "-" then -- [[ecfero]] conjinfo.prefijoperf = conjinfo.nucleoperf[1] conjinfo.nucleoperf = {} end if conjinfo.nucleosup[1] and conjinfo.nucleosup[1] ~= "-" then conjinfo.prefijosup = conjinfo.nucleosup[1] conjinfo.nucleosup = {} end if conjinfo.nucleosigm[1] and conjinfo.nucleosigm[1] ~= "-" then conjinfo.prefijosigm = conjinfo.nucleosigm[1] conjinfo.nucleosigm = {} end conjinfo.irreg = true conjinfo.conj = p[3].conj for k,val in pairs(p[3]) do if not conjinfo[k] or (type(conjinfo[k]) == "table" and not conjinfo[k][1]) then conjinfo[k] = deep_copy(val) end end return conjinfo end end end error("Unrecognized conjugation '" .. conj_arg .. "'") else error("Unrecognized conjugation '" .. conj_arg .. "'") end return conjinfo end function export.v(frame) local title_ = mw.title.getCurrentTitle() local tit = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {alias_de = "conj"}, [2] = {alias_de = "pres"}, [3] = {alias_de = "nucleoperf"}, [4] = {alias_de = "nucleosup"}, [5] = {alias_de = "nucleosigm"}, ["impers"] = {}, -- pas para formas pasivas solamente ["impersonal"] = {alias_de = "impers"}, ["dep"] = {tipo="bool"}, ["depon"] = {alias_de="dep"}, ["deponente"] = {alias_de="dep"}, ["semidep"] = {tipo="bool"}, ["semidepon"] = {alias_de="semidep"}, ["semideponente"] = {alias_de="semidep"}, ["sigm"] = {tipo="bool"}, ["nopasivo"] = {tipo="bool"}, ["soloperf"] = {tipo="bool"}, ["I"] = {tipo="bool"}, ["p3inf"] = {tipo="bool"}, -- sin uso ["poet_sync_perf"] = {tipo="bool"}, -- sin uso ["always_sync_perf"] = {tipo="bool"}, -- solo en [[saevio]] ["conj"] = {requerido=true}, ["pres"] = {requerido=true}, ["nucleopres"] = {lista = true}, ["nucleoperf"] = {lista = true}, ["nucleosup"] = {lista = true}, ["nucleosigm"] = {lista = true}, ["núcleopres"] = {alias_de="nucleopres"}, ["núcleoperf"] = {alias_de="nucleoperf"}, ["núcleosup"] = {alias_de="nucleosup"}, ["paradigma"] = {lista = true}, ["desactivarnucleos"] = {tipo="bool", por_defecto=true}, -- para [[-o]] ["nota"] = {}, } local conjugado = {} for forma,_ in pairs(formas_no_personales) do params[forma] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma] = {} end for forma,_ in pairs(formas_personales) do for i,s in ipairs(tostr) do params[forma..s] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma..s] = {} if i == 1 then params[forma] = {alias_de=forma..s} end end end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) assert(not find(tit, " "), "locuciones no soportadas aún") assert(not (args["dep"] and args["semidep"]), "un verbo no puede ser deponente y semideponente a la vez") local conjinfo = { conj = args.conj, prefijo="", v=args.pres, desactivar = {}, dep=args.dep, semidep=args.semidep, sigm=args.sigm, impers=args.impers, nopasivo=args.nopasivo, soloperf=args.soloperf, I=args.I, p3inf=args.p3inf, poet_sync_perf=args.poet_sync_perf, -- sin uso always_sync_perf=args.always_sync_perf, nucleopres = deep_copy(args.nucleopres), nucleoperf = deep_copy(args.nucleoperf), nucleosup = deep_copy(args.nucleosup), nucleosigm = deep_copy(args.nucleosigm) } conjinfo = detect_v_type_and_subtypes(conjinfo) conjinfo.conj = conjinfo.conj if conjinfo.impers == true then conjinfo.impers = "3" end -- no puede ir conjinfo acá abajo porque si es un sufijo va a quedar "-" en la raíz, lo que anularía todas las formas conjugadas, tiene que venir directo de args if args.desactivarnucleos then if args.nucleopres[1] == "-" then conjinfo.nucleopres = {} end if args.nucleoperf[1] == "-" then conjinfo.nucleoperf = {} end if args.nucleosup[1] == "-" then conjinfo.nucleosup = {} end if args.nucleosigm[1] == "-" then conjinfo.nucleosigm = {} end end local es_irregular = conjinfo.irreg for _,d in ipairs(conjinfo.desactivar) do if formas_no_personales[d] then args[d] = {"no"} else args[d.."2"] = {"no"} end end for forma,_ in pairs(formas) do agregar_forma(conjugado, conjinfo, forma) end local resultante = sobreescribir_formas(conjugado, args) local mostrar_fut_sig = #resultante["ind_fut_sig1"] > 0 local mostrar_aor_sig = #resultante["subj_aor_sig1"] > 0 local defectivo = comprobar_defectivo(resultante, {"^imper", "_sig"}, tostr) local defect2 resultante, defect2 = desactivar_formas(resultante, function (form) return (conjinfo.nopasivo and form:find("_pas")) or (conjinfo.soloperf and not form:find("perf")) or (conjinfo.impers == "pas" and form:find("_pas[^3]")) or (conjinfo.impers == "pas3" and form:find("_pas[^3]")) or (conjinfo.impers == "pas36" and form:find("_pas[^36]")) end ) if defect2 then defectivo = true end -- por ahora innecesario -- local part_no_adj = {} -- for _,e in ipairs(resultante.part) do -- if (find(e, 'PART') or not find(e, 'ADJ')) and not find(e, "†") then -- insert(part_no_adj, gsub1(e, '%b{}', '')) -- end -- end local tit_pres = f(resultante["ind_pres1"][1] or "―") local tit_inf = f(resultante["inf_act"][1] or "―") local tit_perf = f(resultante["ind_perf1"][1] or "―") local tit_sup = f(resultante["sup"][1] or "―") resultante = agregar_enlaces(resultante, tit, normalizar_enlace) local es_impersonal = conjinfo.impers resultante = formatear_formas(resultante, function (x) return obtener_pronombre(x, es_impersonal) end) local impers = conjinfo.impers local cs, cs1, cs2, fila_pronombres_ind, fila_pronombres_subj, fila_pronombres_imper, mostrar_imper if impers == "3" then fila_pronombres_ind = {"", "(id)", color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", "(quod id)", color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", "(id)", color=COLOR_IMPER, header=true, class="pc"} cs = 2 elseif impers == "36" then error("no soportado actualmente") cs = 3 else fila_pronombres_ind = {"", PRONOMBRES[1], PRONOMBRES[2], PRONOMBRES[3], PRONOMBRES[4], PRONOMBRES[5], PRONOMBRES[6], color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", PRONOMBRES_SUBJ[1], PRONOMBRES_SUBJ[2], PRONOMBRES_SUBJ[3], PRONOMBRES_SUBJ[4], PRONOMBRES_SUBJ[5], PRONOMBRES_SUBJ[6], color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", PRONOMBRES_IMP[1], PRONOMBRES_IMP[2], PRONOMBRES_IMP[3], PRONOMBRES_IMP[4], PRONOMBRES_IMP[5], PRONOMBRES_IMP[6], color=COLOR_IMPER, header=true, class="pc"} cs = 7 mostrar_imper = true end cs1 = cs -- math.floor(cs / 2) -- cs2 = cs - cs1 local t = {} insert(t, {{"Formas no personales (verboides)", colspan=cs}, color=COLOR_H, header=true}) if impers == "3" then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else resultante.inf_act.colspan = cs1-1 resultante.inf_pas.colspan = cs1-1 resultante.part_act.colspan = cs1-1 resultante.part_pas.colspan = cs1-1 resultante.ger.colspan = cs1-1 resultante.sup.colspan = cs1-1 if conjinfo.dep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) elseif conjinfo.semidep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) end end local function ic(tiempo) if impers == "3" then return resultante[tiempo.."3"] elseif impers == "36" then return resultante[tiempo.."3"], resultante[tiempo.."6"] end return resultante[tiempo.."1"], resultante[tiempo.."2"], resultante[tiempo.."3"], resultante[tiempo.."4"], resultante[tiempo.."5"], resultante[tiempo.."6"] end insert(t, {{"Formas personales", colspan=cs}, color=COLOR_H, header=true}) insert(t, {{"Modo indicativo", colspan=cs}, color=COLOR_IND, header=true}) insert(t, fila_pronombres_ind) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end else insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) insert(t, {{"Pretérito perfecto", color=COLOR_IND, header=true}, ic("ind_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_IND, header=true}, ic("ind_pluperf")}) insert(t, {{"Futuro perfecto", color=COLOR_IND, header=true}, ic("ind_fut_perf")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) end insert(t, {{"Modo subjuntivo", colspan=cs}, color=COLOR_SUBJ, header=true}) insert(t, fila_pronombres_subj) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end else insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) insert(t, {{"Pretérito perfecto", color=COLOR_SUBJ, header=true}, ic("subj_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_SUBJ, header=true}, ic("subj_pluperf")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) end insert(t, {{"Modo imperativo", colspan=cs}, color=COLOR_IMPER, header=true}) insert(t, fila_pronombres_imper) if mostrar_imper then if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) else insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) insert(t, {{"Presente pasivo", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) end else insert(t, {{"Como verbo "..(impers == "3" and "impersonal" or "terciopersonal")..", ''"..tit.."'' CARECE de imperativo", color=COLOR_IMPER, header=true, colspan=cs}}) end insert(t, {{f("Leyenda: † arcaico, x no normativo, ~■~ cambio ortográfico, #■# irregularidad"), colspan=cs}}) args["nota"] = args["nota"] or "" if conjinfo.impers == "utc3" then args["nota"] = args["nota"].." NOTA: se usa también como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "umc3" then args["nota"] = args["nota"].." NOTA: se usa más como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "utc36" then args["nota"] = args["nota"].." NOTA: se usa también como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "umc36" then args["nota"] = args["nota"].." NOTA: se usa más como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "pas" or conjinfo.imeprs == "pas3" then args["nota"] = args["nota"].." NOTA: impersonal para las formas pasivas" end if conjinfo.impers == "pas36" then args["nota"] = args["nota"].." NOTA: formas pasivas terciopersonales (solamente tercera persona singular y plural)" end if conjinfo.soloperf then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas del perfecto y pluscuamperfecto con valor de presente, imperfecto o futuro" end if conjinfo.nopasivo then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas activas" end insert(t, {{args["nota"] and args["nota"] or "", colspan=cs}}) local cats = {} local subtits = {} local conj_str if conjinfo.conj == "1" then conj_str = "primera conjugación" elseif conjinfo.conj == "2" then conj_str = "segunda conjugación" elseif conjinfo.conj == "3" then conj_str = "tercera conjugación" elseif conjinfo.conj == "3/4" then conj_str = "tercera/cuarta conjugación" else conj_str = "cuarta conjugación" end insert(cats, "LA:Verbos de la "..conj_str) insert(subtits, conj_str) impers = impers or "" if impers == "3" or find(impers, "^u[tm]c3$") then insert(subtits, "impersonal") insert(cats, "LA:Verbos impersonales") end if defectivo then insert(subtits, "defectivo") insert(cats, "LA:Verbos defectivos") end if conjinfo.dep then insert(subtits, "deponente") insert(cats, "LA:Verbos deponentes") end if conjinfo.semidep then insert(subtits, "semideponente") insert(cats, "LA:Verbos semideponentes") end if es_irregular then insert(subtits, "irregular") insert(cats, "LA:Verbos irregulares") else insert(subtits, "regular") insert(cats, "LA:Verbos regulares") end return renderizar_tabla( frame, "'''Conjugación de ''"..tit_pres..", "..tit_inf..", "..tit_perf..", "..tit_sup.."'''''&emsp;&emsp;("..concat(subtits, ", ")..")", t, ns == 0 and cats or {}) end function export.adv(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { ["n"] = {}, ["nota"] = {alias_de = "n"}, ["comp"] = {lista = true}, ["comparativo"] = {alias_de = "comp"}, ["compnota"] = {lista = true}, ["sup"] = {lista = true}, ["superlativo"] = {alias_de = "sup"}, ["supnota"] = {lista = true}, } local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local head = args[1] local modo = args[2] local enc local cats = {} local cat_pref = "LA:Adverbios" if modo == "-" then enc = "sin comparativo ni superlativo" insert(cats, cat_pref.." incomparables") return renderizar_encabezado( frame, head, enc, args["n"], {}, ns == 0 and cats or {}, normalizar_enlace ) end local flex = {comp={},sup={}} local stem for _, suff in ipairs{"iter", "nter", "ter", "er", "iē", "ē", "rā", "im", "ō"} do stem = match(head, "^(.*)" .. suff .. "$") if stem ~= nil then local comp_suff, sup_suff = "ius", "issimē" if suff == "nter" then stem = stem .. "nt" end if suff == "rā" then comp_suff = "er" .. comp_suff sup_suff = "imē" end insert(flex.comp, stem .. comp_suff) insert(flex.sup, stem .. sup_suff) break end end if not stem and not args.comp[1] and not args.sup[1] then error("Unrecognized adverb type, recognized types are “-ē”, “-er”, “-ter”, “-iter”, “-im”, or “-ō”, “-ra” or specify irregular forms or “-” if incomparable.") end local formas, irr = sobreescribir_formas(flex, args) if args["comp"][1] == "no" then enc = "sin comparativo" insert(cats, cat_pref.." sin comparativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) elseif args["sup"][1] == "no" then enc = "sin superlativo" insert(cats, cat_pref.." sin superlativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end if irr then enc = f("#irregular#") insert(cats, cat_pref.." irregulares") end return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}, {"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end return export awvamvqbbkgxz6h3fhouz8i6l0ge6j1 6123555 6123513 2026-07-25T05:16:03Z Tmagc 158167 6123555 Scribunto text/plain -- FLEXIÓN DEL LATÍN -- Adaptado desde en.wikt por Tmagc local export = {} local unpack = unpack or table.unpack local insert = table.insert local concat = table.concat local m_table = require("Módulo:tabla") local keys_to_list = m_table.keysToList local insert_if_not = m_table.insertIfNot local deep_copy = m_table.deepCopy local contains = m_table.contains local merge = m_table.merge local m_str = require("Módulo:string") local u = m_str.char local match = m_str.match local sub = m_str.sub local gsub = m_str.gsub local split = m_str.split local gsplit = m_str.gsplit local find = m_str.find local m_str_avanzado = require("Módulo:string/avanzado") local toNFD = m_str_avanzado.toNFD local toNFC = m_str_avanzado.toNFC local m_flex = require("Módulo:flex") local f = m_flex.f local f_links = m_flex.f_links local parsear_arreglo = m_flex.parsear_arreglo local separar_palabras = m_flex.separar_palabras local combinar_copulativa = m_flex.combinar_copulativa local sobreescribir_formas = m_flex.sobreescribir_formas local desactivar_formas = m_flex.desactivar_formas local agregar_enlaces = m_flex.agregar_enlaces local formatear_formas = m_flex.formatear_formas local comprobar_defectivo = m_flex.comprobar_defectivo local renderizar_tabla = m_flex.renderizar_tabla local renderizar_encabezado = m_flex.renderizar_encabezado local COLOR_H = m_flex.COLOR_H local COLOR_NP = m_flex.COLOR_NP local COLOR_IND = m_flex.COLOR_IND local COLOR_SUBJ = m_flex.COLOR_SUBJ local COLOR_IMPER = m_flex.COLOR_IMPER local MACRON = u(0x304) local BREVE = u(0x306) local DIAER = u(0x308) local DBREVE = u(0x361) local ACCENT = "[" .. MACRON .. BREVE .. DIAER .. DBREVE .. "]" local VOWEL = "[aæeioœuyAÆEIOŒUY]" local cons_to_vowel = { ["j"] = "i", ["J"] = "I", ["v"] = "u", ["V"] = "U", } local function normalizar_enlace(x) x = toNFD(x) x = gsub(x, ACCENT, "") return toNFC(x) end local function join(a, b) a, b = toNFD(a), toNFD(b) -- If the first part ends in "j" or "v", convert it to "i" or "u" unless -- the second part begins with a vowel. if not match(b, "^" .. VOWEL) then a = gsub(a, "[jvJV]$", cons_to_vowel) end return toNFC(a..b) end local function add_form(decl, slot, stem, suf) if type(slot) == "string" then slot = {slot} end for _,slt in ipairs(slot) do if type(decl[slt]) == "nil" or decl[slt] == "" then decl[slt] = {} elseif type(decl[slt]) == "string" then decl[slt] = {decl[slt]} end insert_if_not(decl[slt], join(stem, suf)) end end local function remove_forms(decl, forms) for form,_ in pairs(decl) do for _,rx in ipairs(forms) do if form:find(rx) then forms[form] = {} break end end end end local function merge_forms(forms, forms2, keys) keys = keys or forms2 for key,arr in pairs(keys) do if not forms[key] then forms[key] = {} end if type(forms2[key]) == "string" then insert_if_not(forms[key], forms2[key]) elseif type(forms2[key]) == "table" then for _,a in ipairs(forms2[key]) do insert_if_not(forms[key], a) end end end end local noun_decl = {} noun_decl["0"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = stem forms["dat_sg"] = stem forms["acc_sg"] = stem forms["abl_sg"] = stem forms["voc_sg"] = stem forms["nom_pl"] = stem forms["gen_pl"] = stem forms["dat_pl"] = stem forms["acc_pl"] = stem forms["abl_pl"] = stem forms["voc_pl"] = stem -- with locative if data.loc then forms["loc_sg"] = stem forms["loc_pl"] = stem end end local function alt_gen_pl_in_um(stem, forms, types, subtitles, i_stem) if types.genplum then add_form(forms, "gen_pl", stem, (i_stem and "i" or "") .. "um") elseif types.not_genplum then -- FIXME: not a contraction. -- insert_if_not(subtitles, "uncontracted genitive plural") end end noun_decl["1"] = function(data, args) local forms, types, loc, subtitles = data.forms, data.types, data.loc, data.subtitles local stem = args[1] -- normal 1st local nom_sg = "a" local gen_loc_sg = "ae" local dat_sg = "ae" local acc_sg = "am" local abl_sg = "ā" local voc_sg = "a" local nom_voc_pl = "ae" local gen_pl = "ārum" local dat_abl_loc_pl = "īs" local acc_pl = "ās" insert_if_not(data.title, "primera declinación") insert_if_not(data.categories, "LA:Sustantivos de la primera declinación") -- ām if types.am then nom_sg = "ām" acc_sg = "ām" abl_sg = {"ām", "ā"} voc_sg = "ām" -- all Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") --Greek Ma if types.Ma then nom_sg = "ās" acc_sg = "ān" voc_sg = "ā" -- Greek Me elseif types.Me then nom_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" -- Greek else nom_sg = "ē" gen_loc_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" end end -- ābus if types.abus then dat_abl_loc_pl = "ābus" end add_form(forms, "nom_sg", stem, nom_sg) add_form(forms, "gen_sg", stem, gen_loc_sg) add_form(forms, "dat_sg", stem, dat_sg) add_form(forms, "acc_sg", stem, acc_sg) add_form(forms, "abl_sg", stem, abl_sg) add_form(forms, "voc_sg", stem, voc_sg) add_form(forms, {"nom_pl", "voc_pl"}, stem, nom_voc_pl) add_form(forms, "gen_pl", stem, gen_pl) add_form(forms, {"dat_pl", "abl_pl"}, stem, dat_abl_loc_pl) add_form(forms, "acc_pl", stem, acc_pl) -- with locative if loc then add_form(forms, "loc_sg", stem, gen_loc_sg) add_form(forms, "loc_pl", stem, dat_abl_loc_pl) end end noun_decl["2"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "segunda declinación") insert_if_not(data.categories, "LA:Sustantivos de la segunda declinación") -- normal 2nd forms["nom_sg"] = stem1 .. "us" forms["gen_sg"] = stem1 .. "ī" forms["dat_sg"] = stem1 .. "ō" forms["acc_sg"] = stem1 .. "um" forms["abl_sg"] = stem1 .. "ō" forms["voc_sg"] = stem1 .. "e" forms["nom_pl"] = stem1 .. "ī" forms["gen_pl"] = stem1 .. "ōrum" forms["dat_pl"] = stem1 .. "īs" forms["acc_pl"] = stem1 .. "ōs" forms["abl_pl"] = stem1 .. "īs" forms["voc_pl"] = stem1 .. "ī" -- all neuter if types.N then forms["nom_sg"] = stem1 .. "um" forms["voc_sg"] = stem1 .. "um" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- neuter ium if types.ium then forms["nom_sg"] = stem1 .. "ium" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" forms["voc_sg"] = stem1 .. "ium" forms["nom_pl"] = stem1 .. "ia" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "ia" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "ia" -- neuter us, plural a elseif types.a then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- -vom (aevom, etc.) elseif types.vom then forms["nom_sg"] = stem1 .. "om" forms["acc_sg"] = stem1 .. "om" forms["voc_sg"] = stem1 .. "om" -- neuter Greek in -os (cētos) elseif types.Greek and types.us then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "os" forms["voc_sg"] = stem1 .. "os" forms["nom_pl"] = stem1 .. "ē" forms["gen_pl"] = stem1 .. "ōn" forms["acc_pl"] = stem1 .. "ē" forms["voc_pl"] = stem1 .. "ē" -- neuter Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "on" forms["acc_sg"] = stem1 .. "on" forms["voc_sg"] = stem1 .. "on" -- neuter us elseif types.us then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "ī" forms["acc_pl"] = stem1 .. "ōs" forms["voc_pl"] = stem1 .. "ī" end -- er elseif types.er then forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "ī" forms["dat_sg"] = stem2 .. "ō" forms["acc_sg"] = stem2 .. "um" forms["abl_sg"] = stem2 .. "ō" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ī" forms["gen_pl"] = stem2 .. "ōrum" forms["dat_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "ōs" forms["abl_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "ī" -- ius elseif types.ius then forms["nom_sg"] = stem1 .. "ius" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" if types.voci then -- Only for proper names and fīlius, genius forms["voc_sg"] = stem1 .. "ī" else forms["voc_sg"] = stem1 .. "ie" end forms["nom_pl"] = stem1 .. "iī" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "iōs" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "iī" -- -vos (servos, etc.) elseif types.vos then forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "om" -- Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "on" if data.num == "pl" then forms["nom_pl"] = stem1 .. "oe" forms["voc_pl"] = stem1 .. "oe" else forms["nom_pl"] = {stem1 .. "ī", stem1 .. "oe"} forms["voc_pl"] = {stem1 .. "ī", stem1 .. "oe"} end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- with -um genitive plural alt_gen_pl_in_um(stem2, forms, types, subtitles, types.ius or types.ium) -- with locative if data.loc then if types.ius or types.ium then forms["loc_sg"] = stem2 .. "iī" forms["loc_pl"] = stem2 .. "iīs" else forms["loc_sg"] = stem2 .. "ī" forms["loc_pl"] = stem2 .. "īs" end end end local acc_sg_i_stem_subtypes = { acc_im = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [abl -ī]; -- cannabis, senapis, sinapis [abl -e, -ī] acc_sg = {"im"}, title = {"accusative singular in ''-im''"}, }, acc_im_in = { -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [abl -ī]; -- Baetis, Tigris [acc -e, -ī] acc_sg = {"im", "in"}, title = {"accusative singular in ''-im'' or ''-in''"}, }, acc_im_in_em = { -- e.g. tigris, river Līris acc_sg = {"im", "in", "em"}, title = {"accusative singular in ''-im'', ''-in'' or ''-em''"}, }, acc_im_em = { acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or ''-em''"}, }, acc_im_occ_em = { -- febris, pelvis, puppis, restis, securis, turris [abl -ī, -e] acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or occasionally ''-em''"}, }, acc_em_im = { -- aqualis, clavis, lens, navis [abl -e, -ī]; -- cutis, restis [abl -e] acc_sg = {"em", "im"}, title = {"accusative singular in ''-em'' or ''-im''"}, }, } local abl_sg_i_stem_subtypes = { abl_i = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [acc -im]; -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [acc -im or -in]; -- canalis "water pipe", months in -is or -er, nouns originally i-stem adjectives such as aedilis, affinis, bipennis, familiaris, sodalis, volucris, etc. [acc -em] abl_sg = {"ī"}, title = {"ablative singular in ''-ī''"}, }, abl_i_e = { -- febris, pelvis, puppis, restis, securis, turris [acc -im, -em] abl_sg = {"ī", "e"}, title = {"ablative singular in ''-ī'' or ''-e''"}, }, abl_e_i = { -- cannabis, senapis, sinapis [acc -im]; -- Baetis, Tigris [acc -im, -in]; -- aqualis, clavis, lens, navis [acc -em, -im]; -- finis, mugilis, occiput, pugil, rus, supellex, vectis [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or ''-ī''"}, }, abl_e_occ_i = { -- amnis, anguis, avis, civis, classis, fustis, ignis, imber, orbis, pars, postis, sors, unguis, vesper [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or occasionally ''-ī''"}, }, } local function extract_stem(form, ending) local base = match(form, "^(.*)" .. ending .. "$") if not base then error("Form " .. form .. " should end in -" .. ending) end return base end local function count_vowels(stem) return select(2, toNFD(stem):gsub("[aeiouyAEIOUY]", "")) end noun_decl["3"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] -- local function non_i_stem_type() -- return (count_vowels(stem1) > count_vowels(stem2) and "parisyllabic" or "imparisyllabic") .. " non-i-stem" -- end insert_if_not(data.title, "tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") --normal 3rd forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "is" forms["dat_sg"] = stem2 .. "ī" forms["acc_sg"] = stem2 .. "em" forms["abl_sg"] = stem2 .. "e" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ēs" forms["gen_pl"] = stem2 .. "um" forms["dat_pl"] = stem2 .. "ibus" forms["acc_pl"] = stem2 .. "ēs" forms["abl_pl"] = stem2 .. "ibus" forms["voc_pl"] = stem2 .. "ēs" local acc_sg_i_stem_subtype = false local not_acc_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if acc_sg_i_stem_subtypes[subtype] then acc_sg_i_stem_subtype = true break end end for acc_sg_subtype, _ in pairs(acc_sg_i_stem_subtypes) do if types["not_" .. acc_sg_subtype] then not_acc_sg_i_stem_subtype = true break end end local abl_sg_i_stem_subtype = false local not_abl_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if abl_sg_i_stem_subtypes[subtype] then abl_sg_i_stem_subtype = true break end end for abl_sg_subtype, _ in pairs(abl_sg_i_stem_subtypes) do if types["not_" .. abl_sg_subtype] then not_abl_sg_i_stem_subtype = true break end end -- all Greek if types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") -- Greek er if types.er then stem1 = extract_stem(stem1, "ēr") forms["nom_sg"] = stem1 .. "ēr" forms["gen_sg"] = stem1 .. "eris" forms["dat_sg"] = stem1 .. "erī" forms["acc_sg"] = {stem1 .. "era", stem1 .. "erem"} forms["abl_sg"] = stem1 .. "ere" forms["voc_sg"] = stem1 .. "ēr" forms["nom_pl"] = stem1 .. "erēs" forms["gen_pl"] = stem1 .. "erum" forms["dat_pl"] = stem1 .. "eribus" forms["acc_pl"] = stem1 .. "erēs" forms["abl_pl"] = stem1 .. "eribus" forms["voc_pl"] = stem1 .. "erēs" -- Greek on elseif types.on then stem1 = extract_stem(stem1, "ōn") forms["nom_sg"] = stem1 .. "ōn" forms["gen_sg"] = {stem1 .. "ontis", stem1 .. "ontos"} forms["dat_sg"] = stem1 .. "ontī" forms["acc_sg"] = stem1 .. "onta" forms["abl_sg"] = stem1 .. "onte" forms["voc_sg"] = stem1 .. "ōn" forms["nom_pl"] = stem1 .. "ontēs" forms["gen_pl"] = {stem1 .. "ontum", stem1 .. "ontium"} forms["dat_pl"] = stem1 .. "ontibus" forms["acc_pl"] = {stem1 .. "ontēs", stem1 .. "ontās"} forms["abl_pl"] = stem1 .. "ontibus" forms["voc_pl"] = stem1 .. "ontēs" -- Greek i-stem elseif types.I then forms["gen_sg"] = {stem2 .. "is", stem2 .. "eōs", stem2 .. "ios"} forms["acc_sg"] = {stem2 .. "im", stem2 .. "in", stem2 .. "em{MED}"} forms["abl_sg"] = {stem2 .. "ī", stem2 .. "e{MED}"} forms["voc_sg"] = {stem2 .. "is", stem2 .. "i"} forms["nom_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["gen_pl"] = {stem2 .. "ium", stem2 .. "eōn"} forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["voc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} if types.poetic_esi then forms["dat_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} forms["abl_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} end -- normal Greek else forms["gen_sg"] = stem2 .. "os" if match(toNFD(stem2), "[yY]" .. ACCENT .. "*$") then forms["acc_sg"] = stem2 .. "n" else forms["acc_sg"] = stem2 .. "a" end forms["nom_pl"] = stem2 .. "es" forms["acc_pl"] = stem2 .. "as" forms["voc_pl"] = stem2 .. "es" if match(toNFD(stem1), "[iyIY]" .. ACCENT .. "*s$") then -- Per Hiley, words in -is and -ys have a poetic vocative -- without the -s, but otherwise the vocative is the same -- as the nominative. forms["voc_sg"] = {stem1, (stem1:gsub("s$", "")).."{L}"} end end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- polis if types.polis then stem1 = extract_stem(stem1, "polis") insert_if_not(data.title, "parcialmente griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "polis" forms["gen_sg"] = stem1 .. "polis" forms["dat_sg"] = stem1 .. "polī" forms["acc_sg"] = {stem1 .. "polim", stem1 .. "polin"} forms["abl_sg"] = stem1 .. "polī" forms["voc_sg"] = {stem1 .. "polis", stem1 .. "polī"} end -- all neuter if types.N then forms["acc_sg"] = stem1 -- neuter I stem if types.I then -- pure variety if types.pure then forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "ia" forms["gen_pl"] = stem2 .. "ium" forms["acc_pl"] = stem2 .. "ia" forms["voc_pl"] = stem2 .. "ia" -- non-pure variety (rare) else forms["nom_pl"] = stem2 .. "a" forms["gen_pl"] = {stem2 .. "ium", stem2 .. "um"} forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- normal neuter else forms["nom_pl"] = stem2 .. "a" forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- I stem elseif types.I or acc_sg_i_stem_subtype or abl_sg_i_stem_subtype then forms["gen_pl"] = stem2 .. "ium" -- Per Allen and Greenough, Hiley and others, the acc_pl in -īs -- applied originally to all i-stem nouns, and was current as an -- alternative form up through Caesar. forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "īs"} -- pure variety if types.pure then forms["acc_sg"] = stem2 .. "im" forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "īs" end local num = data.num for subtype, _ in pairs(types) do local acc_sg_i_stem_props = acc_sg_i_stem_subtypes[subtype] if acc_sg_i_stem_props then forms["acc_sg"] = {} for _, ending in ipairs(acc_sg_i_stem_props.acc_sg) do insert_if_not(forms["acc_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(acc_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end -- FIXME: needs to be done for neuter nouns as well. for subtype, _ in pairs(types) do local abl_sg_i_stem_props = abl_sg_i_stem_subtypes[subtype] if abl_sg_i_stem_props then forms["abl_sg"] = {} for _, ending in ipairs(abl_sg_i_stem_props.abl_sg) do insert_if_not(forms["abl_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(abl_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end end -- with locative if data.loc then -- As far as I can tell, in general both dative singular and -- ablative singular could be used for the third-declension locative, -- with different time periods preferring different forms. -- http://dcc.dickinson.edu/grammar/latin/3rd-declension-locative-case -- mentions rūrī along with either Carthāginī or Carthāgine. -- Wikipedia in https://en.wikipedia.org/wiki/Locative_case#Latin -- says this: -- -- In archaic times, the locative singular of third declension nouns -- was still interchangeable between ablative and dative forms, but in -- the Augustan Period the use of the ablative form became fixed. -- Therefore, both forms "rūrī" and "rūre" may be encountered. -- -- Lewis and Short confirm this. local loc_sg = forms["dat_sg"] if type(loc_sg) == "table" then loc_sg = deep_copy(loc_sg) else loc_sg = {loc_sg} end local abl_sg = forms["abl_sg"] if type(abl_sg) == "table" then for _, form in ipairs(abl_sg) do insert_if_not(loc_sg, deep_copy(form)) end else insert_if_not(loc_sg, abl_sg) end forms["loc_sg"] = loc_sg forms["loc_pl"] = deep_copy(forms["abl_pl"]) --The following is what we used to have, but I simply cannot believe it. --if types.Greek and not types.s then -- forms["loc_pl"] = stem2 .. "ēs" --end end end noun_decl["4"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "cuarta declinación") insert_if_not(data.categories, "LA:Sustantivos de la cuarta declinación") -- normal 4th forms["nom_sg"] = stem .. "us" forms["gen_sg"] = stem .. "ūs" forms["dat_sg"] = stem .. "uī" forms["acc_sg"] = stem .. "um" forms["abl_sg"] = stem .. "ū" forms["voc_sg"] = stem .. "us" forms["nom_pl"] = stem .. "ūs" forms["gen_pl"] = stem .. "uum" forms["dat_pl"] = stem .. "ibus" forms["acc_pl"] = stem .. "ūs" forms["abl_pl"] = stem .. "ibus" forms["voc_pl"] = stem .. "ūs" if types.echo then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end add_form(forms, "acc_sg", stem, "ōn") elseif types.Callisto then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end end -- neuter if types.N then forms["nom_sg"] = stem .. "ū̆{?}" forms["gen_sg"] = {stem .. "ūs{C}", stem .. "ū{S}"} forms["dat_sg"] = {stem .. "uī{C}", stem .. "ū{S}"} forms["acc_sg"] = stem .. "ū̆{?}" forms["voc_sg"] = stem .. "ū̆{?}" forms["nom_pl"] = stem .. "ua" forms["acc_pl"] = stem .. "ua" forms["voc_pl"] = stem .. "ua" end -- ubus if types.ubus then forms["dat_pl"] = stem .. "ubus" forms["abl_pl"] = stem .. "ubus" end -- with locative if data.loc then forms["loc_sg"] = forms["abl_sg"] forms["loc_pl"] = forms["abl_pl"] end end noun_decl["5"] = function(data, args) local forms, types = data.forms, data.types local stem = args[1] insert_if_not(data.title, "quinta declinación") insert_if_not(data.categories, "LA:Sustantivos de la quinta declinación") -- ies if types.i then stem = stem .. "i" end forms["nom_sg"] = stem .. "ēs" forms["gen_sg"] = stem .. "eī" forms["dat_sg"] = stem .. "eī" forms["acc_sg"] = stem .. "em" forms["abl_sg"] = stem .. "ē" forms["voc_sg"] = stem .. "ēs" forms["nom_pl"] = stem .. "ēs" forms["gen_pl"] = stem .. "ērum" forms["dat_pl"] = stem .. "ēbus" forms["acc_pl"] = stem .. "ēs" forms["abl_pl"] = stem .. "ēbus" forms["voc_pl"] = stem .. "ēs" -- ies if types.i then forms["gen_sg"] = stem .. "ēī" forms["dat_sg"] = stem .. "ēī" end --with locative if data.loc then forms["loc_sg"] = stem .. "ē" forms["loc_pl"] = stem .. "ēbus" end end noun_decl["sgpl"] = function(data, args) local forms = data.forms local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem1 forms["gen_sg"] = stem1 forms["dat_sg"] = stem1 forms["acc_sg"] = stem1 forms["abl_sg"] = stem1 forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 forms["gen_pl"] = stem2 forms["dat_pl"] = stem2 forms["acc_pl"] = stem2 forms["abl_pl"] = stem2 forms["voc_pl"] = stem2 -- with locative if data.loc then forms["loc_sg"] = stem1 forms["loc_pl"] = stem2 end end noun_decl["indecl"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = stem forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} -- with locative (for multiword terms) if data.loc then forms["loc_sg"] = {} forms["loc_pl"] = {} end data.num = "sg" end noun_decl["irreg"] = function(data, args) local forms, subtitles, notes = data.forms, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "irregular") insert_if_not(data.categories, "LA:Sustantivos irregulares") forms["nom_sg"] = {} forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = {} forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} if stem == "bōs" then data.decl = "3" local stem1, stem2 = "bōs", "bov" noun_decl["3"](data, {stem1, stem2}) add_form(forms, "abl_sg", stem2, "īd{†}") add_form(forms, "gen_pl", "bo", "um") add_form(forms, "gen_pl", stem2, "erum") add_form(forms, "dat_pl", "", "bōbus") add_form(forms, "dat_pl", "", "būbus") add_form(forms, "abl_pl", "", "bōbus") add_form(forms, "abl_pl", "", "būbus") elseif stem:match("^[dD]eus$") then data.decl = "2" local dD = stem:sub(1, 1) forms["nom_sg"] = dD .. "eus" forms["gen_sg"] = dD .. "eī" forms["dat_sg"] = dD .. "eō" forms["acc_sg"] = dD .. "eum" forms["abl_sg"] = dD .. "eō" forms["voc_sg"] = {dD .. "eus", dD .. "ee"} if stem == "deus" then forms["nom_pl"] = {"dī", "diī", "deī"} forms["gen_pl"] = {"deōrum", "deum"} forms["dat_pl"] = {"dīs", "diīs", "deīs"} forms["acc_pl"] = "deōs" forms["abl_pl"] = {"dīs", "diīs", "deīs"} forms["voc_pl"] = {"dī", "diī", "deī"} end elseif stem == "domus" then data.decl = "4,2" insert_if_not(data.title, "cuarta/segunda declinación") forms["nom_sg"] = "domus" forms["gen_sg"] = {"domūs", "domī"} forms["dat_sg"] = {"domuī", "domō", "domū"} forms["acc_sg"] = "domum" forms["abl_sg"] = {"domū", "domō"} forms["voc_sg"] = "domus" forms["loc_sg"] = "domī" forms["nom_pl"] = "domūs" forms["gen_pl"] = {"domuum", "domōrum"} forms["dat_pl"] = "domibus" forms["acc_pl"] = {"domūs", "domōs"} forms["abl_pl"] = "domibus" forms["voc_pl"] = "domūs" forms["loc_pl"] = {} data.loc = true elseif match(stem, "^[IÏJ]ēs[uū]" .. BREVE .. "?s$") then local ij = sub(stem, 1, 1) local uu = match(stem, "[uū]" .. BREVE .. "?") forms["nom_sg"] = stem forms["gen_sg"] = ij .. "ēsū" forms["dat_sg"] = ij .. "ēsū" forms["acc_sg"] = ij .. "ēs" .. uu .. "m" forms["abl_sg"] = ij .. "ēsū" forms["voc_sg"] = ij .. "ēsū" data.num = "sg" elseif stem == "Mōsēs" or stem == "Moesēs" or match(stem, "^M[oō]" .. BREVE .. "?[īȳ]sēs$") then local mos = sub(stem, 1, -3) forms["nom_sg"] = stem forms["gen_sg"] = {mos .. "ī", mos .. "ēī", mos .. "is", mos .. "ēn", mos .. "eōs"} forms["dat_sg"] = mos .. "ī" forms["acc_sg"] = {mos .. "ēn", mos .. "em"} forms["abl_sg"] = {mos .. "e", mos .. "ēn", mos .. "ī"} forms["voc_sg"] = {mos .. "ēs", mos .. "ē"} data.num = "sg" elseif stem:match("^[ij]ūgerum$") then data.decl = "2,3" local ij = stem:sub(1, 1) insert_if_not(data.title, "segunda/tercera declinación híbrido") forms["nom_sg"] = ij .. "ūgerum" forms["gen_sg"] = ij .. "ūgerī" forms["dat_sg"] = ij .. "ūgerō" forms["acc_sg"] = ij .. "ūgerum" forms["abl_sg"] = ij .. "ūgerō" forms["voc_sg"] = ij .. "ūgerum" forms["nom_pl"] = ij .. "ūgera" forms["gen_pl"] = ij .. "ūgerum" forms["dat_pl"] = ij .. "ūgeribus" forms["acc_pl"] = ij .. "ūgera" forms["abl_pl"] = {ij .. "ūgeribus", ij .. "ūgerīs{†}"} forms["voc_pl"] = ij .. "ūgera" elseif stem == "sūs" then data.decl = "3" forms["nom_sg"] = "sūs" forms["gen_sg"] = "suis" forms["dat_sg"] = "suī" forms["acc_sg"] = "suem" forms["abl_sg"] = "sue" forms["voc_sg"] = "sūs" forms["nom_pl"] = "suēs" forms["gen_pl"] = "suum" forms["dat_pl"] = {"suibus", "sūbus", "subus"} forms["acc_pl"] = "suēs" forms["abl_pl"] = {"suibus", "sūbus", "subus"} forms["voc_pl"] = "suēs" elseif stem == "ēthos" then data.decl = "3" insert_if_not(data.title, "tercera declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "ēthos" forms["gen_sg"] = "ētheos" forms["acc_sg"] = "ēthos" forms["voc_sg"] = "ēthos" forms["nom_pl"] = {"ēthea", "ēthē"} forms["dat_pl"] = {"ēthesi", "ēthesin"} forms["acc_pl"] = {"ēthea", "ēthē"} forms["abl_pl"] = {"ēthesi", "ēthesin"} forms["voc_pl"] = {"ēthea", "ēthē"} elseif stem == "Athōs" then data.decl = "2" insert_if_not(data.title, "segunda declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "Athōs" forms["gen_sg"] = "Athō" forms["dat_sg"] = "Athō" forms["acc_sg"] = {"Athō", "Athōn"} forms["abl_sg"] = "Athō" forms["voc_sg"] = "Athōs" data.num = "sg" elseif stem:match("^[uv]ēnum$") then data.decl = "4,2" local uv = stem:sub(1, 1) insert_if_not(data.title, "cuarta/segunda declinación, defectivo") forms["dat_sg"] = {uv .. "ēnuī", uv .. "ēnō"} forms["acc_sg"] = uv .. "ēnum" data.num = "sg" elseif stem:match("^[uv]īs$") then data.decl = "3" local uv = stem:sub(1, 1) insert_if_not(data.title, "defectivo") forms["nom_sg"] = uv .. "īs" forms["gen_sg"] = uv .. "īs" forms["dat_sg"] = uv .. "ī" forms["acc_sg"] = uv .. "im" forms["abl_sg"] = uv .. "ī" forms["voc_sg"] = uv .. "īs" forms["nom_pl"] = uv .. "īrēs" forms["gen_pl"] = uv .. "īrium" forms["dat_pl"] = uv .. "īribus" forms["acc_pl"] = {uv .. "īrēs", uv .. "īrīs"} forms["abl_pl"] = uv .. "īribus" forms["voc_pl"] = uv .. "īrēs" else error("Stem " .. stem .. " not recognized.") end end local adj_decl = {} adj_decl["0+"] = function(data, args) local forms, categories = data.forms, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = stem forms["gen_sg_m"] = stem forms["gen_pl_m"] = stem forms["dat_sg_m"] = stem forms["dat_pl_m"] = stem forms["acc_sg_m"] = stem forms["acc_pl_m"] = stem forms["abl_sg_m"] = stem forms["abl_pl_m"] = stem forms["voc_sg_m"] = stem forms["voc_pl_m"] = stem forms["loc_sg_m"] = stem forms["loc_pl_m"] = stem end adj_decl["1&2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera y segunda declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local original if types.er then local final2 = stem:sub(-2) if final2 == "er" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") elseif final2 == "ur" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") else error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem) end stem, original = args[2], stem end local us = "us" local a_sf = "a" local um = "um" local ae_gsf = "ae" local am = "am" local a_macron = "ā" local i_pl = stem .. "ī" if types.greekA or types.greekE then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") if types.greekA then us = "os" um = "on" am = "ān" else us = "os" a_sf = "ē" um = "on" ae_gsf = "ēs" am = "ēn" a_macron = "ē" end i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = original or (stem .. us) forms["nom_sg_f"] = stem .. a_sf forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_f"] = stem .. ae_gsf forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_f"] = stem .. "ae" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_f"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_f"] = stem .. am forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_f"] = stem .. a_macron forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_f"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = original or (stem .. "e") forms["voc_sg_f"] = stem .. a_sf forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" if types.ius then insert_if_not(data.title, "pronominal") --insert_if_not(subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''") forms["gen_sg_m"] = stem .. "ī̆us" forms["gen_sg_f"] = stem .. "ī̆us" forms["gen_sg_n"] = stem .. "ī̆us" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_f"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" elseif types.not_ius then insert_if_not(data.title, "no pronominal") --insert_if_not(subtitles, "with normal genitive and dative singular") end if stem == "me" then forms["voc_sg_m"] = "mī" end if types.ic then --insert_if_not(subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''") local oc = "oc" local oc_macron = "ōc" if stem == "ill" then oc = "uc" oc_macron = "ūc" end forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = stem .. oc forms["nom_pl_n"] = stem .. "aec" forms["gen_sg_m"] = stem .. "uius" forms["gen_sg_f"] = stem .. "uius" forms["gen_sg_n"] = stem .. "uius" forms["dat_sg_m"] = stem .. "uic" forms["dat_sg_f"] = stem .. "uic" forms["dat_sg_n"] = stem .. "uic" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = stem .. oc forms["acc_pl_n"] = stem .. "aec" forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. oc_macron forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} end if types.distr then if stem:sub(-1) == "n" then forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum{R}"} forms["gen_pl_f"] = {stem .. "um", stem .. "ārum{R}"} forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum{R}"} else error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem) end end forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["1-1+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") forms["nom_sg_m"] = stem .. "a" forms["nom_pl_m"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ae" forms["gen_pl_m"] = stem .. "ārum" forms["dat_sg_m"] = stem .. "ae" forms["dat_pl_m"] = stem .. "īs" forms["acc_sg_m"] = stem .. "am" forms["acc_sg_n"] = stem .. "a" forms["acc_pl_m"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ā" forms["abl_pl_m"] = stem .. "īs" forms["voc_sg_m"] = stem .. "a" forms["voc_pl_m"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["2-2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "segunda declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local us = "us" local um = "um" local i_pl = stem .. "ī" if types.greek then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") us = "os" um = "on" i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = stem .. us forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = stem .. "e" forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end local function abl_i_e(...) local function update_slot(forms, slot, f, do_copy) if not forms[slot] then return do_copy elseif do_copy then f = deep_copy(f) end forms[slot] = f return true end function abl_i_e(stem, forms, types) local f, do_copy if types["abl_e_i"] then f = {stem .. "e", stem .. "ī"} elseif types["abl_i_e"] then f = {stem .. "ī", stem .. "e"} else return end do_copy = update_slot(forms, "abl_sg_m", f, do_copy) do_copy = update_slot(forms, "abl_sg_f", f, do_copy) -- Neuter doesn't take -e with i-stems. if not types.I then update_slot(forms, "abl_sg_n", f, do_copy) end end return abl_i_e(...) end adj_decl["3-1+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) if types.par then forms["nom_pl_n"] = stem2 .. "a" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["abl_sg_m"] = stem2 .. "e" forms["abl_sg_n"] = stem2 .. "e" forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"} -- Really? forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"} -- Why does this happen? forms["acc_pl_n"] = stem2 .. "a" forms["voc_pl_n"] = stem2 .. "a" end local es_base = stem1:match("^(.-)ēs$") if es_base and es_base == stem2 then if types.greek then forms["nom_sg_n"] = {stem2 .. "ē̆s{?}"} forms["acc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_m"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["nom_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["acc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["voc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["abl_sg_m"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["abl_sg_n"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["gen_pl_m"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} forms["gen_pl_n"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Adjetivos griegos") elseif types.not_greek then insert_if_not(data.title, "no griego") end end end adj_decl["3-def+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, defectivo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = stem2 .. "ēs" forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" if types.tor then insert_if_not(data.title, "tercera declinación, solo en masculino") insert_if_not(categories, "LA:Adjetivos solo en masculino") remove_forms(forms, {"_f$", "_n$"}) forms["nom_sg_m"] = stem1 forms["gen_sg_m"] = stem2 .. "is" forms["dat_sg_m"] = stem2 .. "ī" forms["acc_sg_m"] = stem2 .. "em" forms["abl_sg_m"] = stem2 .. "e" forms["voc_sg_m"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["gen_pl_m"] = stem2 .. "um" forms["dat_pl_m"] = stem2 .. "ibus" forms["acc_pl_m"] = stem2 .. "ēs" forms["abl_pl_m"] = stem2 .. "ibus" forms["voc_pl_m"] = stem2 .. "ēs" end if types.trix then insert_if_not(data.title, "tercera declinación, solo en femenino o en neutro plural") insert_if_not(categories, "LA:Adjetivos solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en neutro") remove_forms(forms, {"_m$", "sg_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.trixf then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.idis then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = {stem2 .. "is", stem2 .. "os"} forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = {stem2 .. "em", stem2 .. "a"} forms["abl_sg_f"] = stem2 .. "e" forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} forms["gen_pl_f"] = stem2 .. "um" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = {stem2 .. "ēs", stem2 .. "as"} forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} end forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-C+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1 = args[1] local stem2 = stem1 .. "ōr" insert_if_not(data.title, "tercera declinación, comparativo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos comparativos") forms["nom_sg_m"] = stem1 .. "or" forms["nom_sg_n"] = stem1 .. "us" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "a" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 .. "us" forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} forms["acc_pl_n"] = stem2 .. "a" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 .. "or" forms["voc_sg_n"] = stem1 .. "us" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "a" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-P+"] = function(data, args) local forms, notes = data.forms, data.notes local stem2 = args[2] adj_decl["3-1+"](data, args) insert_if_not(data.title, "tercera declinación, participio") insert_if_not(data.categories, "LA:Adjetivos de la tercera declinación") forms["abl_sg_m"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["abl_sg_n"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} end adj_decl["3-2+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem = args[1] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem .. "is" forms["nom_sg_n"] = stem .. "e" forms["nom_pl_m"] = stem .. "ēs" forms["nom_pl_n"] = stem .. "ia" forms["gen_sg_m"] = stem .. "is" forms["gen_sg_n"] = stem .. "is" forms["gen_pl_m"] = stem .. "ium" forms["gen_pl_n"] = stem .. "ium" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" forms["dat_pl_m"] = stem .. "ibus" forms["dat_pl_n"] = stem .. "ibus" forms["acc_sg_m"] = stem .. "em" forms["acc_sg_n"] = stem .. "e" forms["acc_pl_m"] = {stem .. "īs", stem .. "ēs"} forms["acc_pl_n"] = stem .. "ia" forms["abl_sg_m"] = stem .. "ī" forms["abl_sg_n"] = stem .. "ī" forms["abl_pl_m"] = stem .. "ibus" forms["abl_pl_n"] = stem .. "ibus" -- abl_i_e(stem, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem .. "is" forms["voc_sg_n"] = stem .. "e" forms["voc_pl_m"] = stem .. "ēs" forms["voc_pl_n"] = stem .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-3+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con tres terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_f"] = stem2 .. "is" forms["nom_sg_n"] = stem2 .. "e" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_f"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_f"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_f"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_f"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_f"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_f"] = stem2 .. "em" forms["acc_sg_n"] = stem2 .. "e" forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_f"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_f"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_f"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" -- abl_i_e(stem2, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem1 forms["voc_sg_f"] = stem2 .. "is" forms["voc_sg_n"] = stem2 .. "e" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_f"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["indecl+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = {} forms["gen_sg_m"] = {} forms["gen_pl_m"] = {} forms["dat_sg_m"] = {} forms["dat_pl_m"] = {} forms["acc_sg_m"] = stem forms["acc_pl_m"] = {} forms["abl_sg_m"] = {} forms["abl_pl_m"] = {} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["irreg+"] = function(data,args) local forms, types, pos, notes, categories = data.forms, data.types, data.pos, data.notes, data.categories local arg1 = args[1] insert_if_not(data.title, "irregular") insert_if_not(categories, "LA:Adjetivos irregulares") if arg1 == "duo" or arg1 == "ambō" then local stem = sub(arg1, 1, -2) -- data.title = stem == "amb" and "irregular adjective" or "numeral" data.num = "pl" local stem_with_o = stem .. (stem == "amb" and "ō" or "o") forms["nom_pl_m"] = stem_with_o forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem_with_o forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_pl_m"] = stem .. "ōbus" forms["dat_pl_f"] = stem .. "ābus" forms["dat_pl_n"] = stem .. "ōbus" forms["acc_pl_m"] = {stem .. "ōs", stem_with_o} forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem_with_o forms["abl_pl_m"] = stem .. "ōbus" forms["abl_pl_f"] = stem .. "ābus" forms["abl_pl_n"] = stem .. "ōbus" forms["voc_pl_m"] = stem_with_o forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem_with_o if stem == "du" then forms["gen_pl_m"] = {forms["gen_pl_m"], "duum", "duom{†}"} forms["gen_pl_n"] = {forms["gen_pl_n"], "duum", "duom{†}"} end elseif arg1:sub(-6) == "mīlle" then insert_if_not(data.title, "numeral semiindeclinable") local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "le" forms["nom_pl_m"] = {stem .. "ia", stem .. "lia"} forms["gen_sg_m"] = stem .. "le" forms["gen_pl_m"] = {stem .. "ium", stem .. "lium"} forms["dat_sg_m"] = stem .. "le" forms["dat_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["acc_sg_m"] = stem .. "le" forms["acc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["abl_sg_m"] = stem .. "le" forms["abl_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["voc_sg_m"] = stem .. "le" forms["voc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) elseif arg1 == "ille" or arg1 == "iste" or arg1 == "ipse" or arg1 == "olle" then local stem = arg1:sub(1, -2) types.ius = true adj_decl["1&2+"](data, {stem}) insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) forms["nom_sg_m"] = arg1 if arg1 == "ipse" then add_form(forms, "nom_sg_n", stem, "ud{MED}") add_form(forms, "acc_sg_n", stem, "ud{MED}") else forms["nom_sg_n"] = stem .. "ud" forms["acc_sg_n"] = stem .. "ud" end forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} elseif arg1 == "illic" or arg1 == "istic" or arg1 == "isthic" then insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["gen_sg_m"] = stem .. "ī̆usce" forms["gen_sg_f"] = stem .. "ī̆usce" forms["gen_sg_n"] = stem .. "ī̆usce" forms["dat_sg_m"] = stem .. "īc" forms["dat_sg_f"] = stem .. "īc" forms["dat_sg_n"] = stem .. "īc" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. "ōc" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["nom_pl_m"] = stem .. "īsce" forms["nom_pl_f"] = stem .. "aec" forms["nom_pl_n"] = stem .. "aec" forms["gen_pl_m"] = stem .. "ōrunc{?}" forms["gen_pl_f"] = stem .. "ārunc{?}" forms["gen_ok_n"] = stem .. "ōrunc{?}" forms["dat_pl_m"] = stem .. "īsce" forms["dat_pl_f"] = stem .. "īsce" forms["dat_pl_n"] = stem .. "īsce" forms["acc_pl_m"] = stem .. "ōsce" forms["acc_pl_f"] = stem .. "āsce" forms["acc_pl_n"] = stem .. "aec" forms["abl_pl_m"] = stem .. "īsce" forms["abl_pl_f"] = stem .. "īsce" forms["abl_pl_n"] = stem .. "īsce" forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "hice" then insert_if_not(data.title, "demostrativo") -- .. " pronoun" forms["nom_sg_m"] = "hice" forms["nom_sg_f"] = "haece" forms["nom_sg_n"] = "hoce" forms["nom_pl_m"] = "hīce" forms["nom_pl_f"] = "haece" forms["nom_pl_n"] = "haece" forms["gen_sg_m"] = "huiusce" forms["gen_sg_f"] = "huiusce" forms["gen_sg_n"] = "huiusce" forms["gen_pl_m"] = {"hōrunce", "hōrumce"} forms["gen_pl_f"] = {"hārunce", "hārumce"} forms["gen_pl_n"] = {"hōrunce", "hōrumce"} forms["dat_sg_m"] = "huīce" forms["dat_sg_f"] = "huīce" forms["dat_sg_n"] = "huīce" forms["dat_pl_m"] = "hīsce" forms["dat_pl_f"] = "hīsce" forms["dat_pl_n"] = "hīsce" forms["acc_sg_m"] = "hunce" forms["acc_sg_f"] = "hance" forms["acc_sg_n"] = "hoce" forms["acc_pl_m"] = "hōsce" forms["acc_pl_f"] = "hāsce" forms["acc_pl_n"] = "haece" forms["abl_sg_m"] = "hōce" forms["abl_sg_f"] = "hāce" forms["abl_sg_n"] = "hōce" forms["abl_pl_m"] = "hīsce" forms["abl_pl_f"] = "hīsce" forms["abl_pl_n"] = "hīsce" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "plūs" then insert_if_not(data.title, "comparativo") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación con una terminación") data.note = "Ninguna de las formas en singular se usaron en latín clásico" forms["nom_sg_n"] = "plūs" forms["nom_pl_m"] = "plūrēs" forms["nom_pl_n"] = "plūra" forms["gen_sg_m"] = "plūris" forms["gen_sg_n"] = "plūris" forms["gen_pl_m"] = "plūrium" forms["gen_pl_n"] = "plūrium" forms["dat_sg_m"] = "plūrī" forms["dat_sg_n"] = "plūrī" forms["dat_pl_m"] = "plūribus" forms["dat_pl_n"] = "plūribus" forms["acc_sg_m"] = "plūrem" forms["acc_sg_f"] = "plūrem" forms["acc_sg_n"] = "plūs" forms["acc_pl_m"] = {"plūrēs", "plūrīs"} forms["acc_pl_n"] = "plūra" forms["abl_sg_m"] = {"plūrī", "plūre"} forms["abl_sg_f"] = {"plūrī", "plūre"} forms["abl_sg_n"] = {"plūrī", "plūre"} forms["abl_pl_m"] = "plūribus" forms["abl_pl_n"] = "plūribus" forms["voc_sg_n"] = "plūs" forms["voc_pl_m"] = "plūrēs" forms["voc_pl_n"] = "plūra" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif match(arg1, "^egō̆?$") or arg1 == "nōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "nōs" forms["gen_sg_m"] = "meī" forms["gen_pl_m"] = {"nostrī", "nostrum"} forms["dat_sg_m"] = "mihī̆" forms["dat_pl_m"] = "nōbīs" forms["acc_sg_m"] = {"mē", "mēmē"} forms["acc_pl_m"] = "nōs" forms["abl_sg_m"] = {"mē", "mēmē"} forms["abl_pl_m"] = "nōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "nōs" elseif arg1 == "tū" or arg1 == "vōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "vōs" forms["gen_sg_m"] = "tuī" forms["gen_pl_m"] = {"vestrī", "vestrum"} forms["dat_sg_m"] = "tibī̆" forms["dat_pl_m"] = "vōbīs" forms["acc_sg_m"] = {"tē", "tētē"} forms["acc_pl_m"] = "vōs" forms["abl_sg_m"] = {"tē", "tētē"} forms["abl_pl_m"] = "vōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "vōs" elseif arg1 == "suī" then insert_if_not(data.title, "pronombre reflexivo") forms["nom_sg_m"] = {} forms["nom_pl_m"] = {} forms["gen_sg_m"] = arg1 forms["gen_pl_m"] = forms["gen_sg_m"] forms["dat_sg_m"] = "sibī̆" forms["dat_pl_m"] = forms["dat_sg_m"] forms["acc_sg_m"] = {"sē", "sēsē"} forms["acc_pl_m"] = {"sē", "sēsē"} forms["abl_sg_m"] = {"sē", "sēsē"} forms["abl_pl_m"] = {"sē", "sēsē"} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} elseif arg1 == "is" or arg1 == "īdem" then insert_if_not(data.title, "pronombre demostrativo") forms["nom_sg_m"] = "is" forms["nom_sg_f"] = "ea" forms["nom_sg_n"] = "id" forms["nom_pl_m"] = {"iī", "eī", "ī"} forms["nom_pl_f"] = "eae" forms["nom_pl_n"] = "ea" forms["gen_sg_m"] = {"eius", "ejus"} forms["gen_sg_f"] = {"eius", "ejus"} forms["gen_sg_n"] = {"eius", "ejus"} forms["gen_pl_m"] = {"eōrum", "eum"} forms["gen_pl_f"] = "eārum" forms["gen_pl_n"] = {"eōrum", "eum"} forms["dat_sg_m"] = {"eī", "e͡i", "ēī"} forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"} forms["dat_sg_n"] = {"eī", "e͡i", "ēī"} forms["dat_pl_m"] = {"iīs", "eīs", "īs"} forms["dat_pl_f"] = {"iīs", "eīs", "īs", "eābus"} forms["dat_pl_n"] = {"iīs", "eīs", "īs"} forms["acc_sg_m"] = "eum" forms["acc_sg_f"] = "eam" forms["acc_sg_n"] = "id" forms["acc_pl_m"] = "eōs" forms["acc_pl_f"] = "eās" forms["acc_pl_n"] = "ea" forms["abl_sg_m"] = "eō" forms["abl_sg_f"] = "eā" forms["abl_sg_n"] = "eō" forms["abl_pl_m"] = {"iīs", "eīs", "īs"} forms["abl_pl_f"] = {"iīs", "eīs", "īs"} forms["abl_pl_n"] = {"iīs", "eīs", "īs"} if arg1 == "īdem" then forms["nom_sg_m"] = "ī" forms["nom_sg_n"] = "i" forms["acc_sg_n"] = "i" end elseif arg1 == "quis" or arg1 == "quī" then data.note = "La forma ''qua'' es preferida frente a ''quae'' cuando se usa como indefinido" local id = "id" if arg1 == "quī" then insert_if_not(data.title, "determinante relativo/interrogativo") id = "od" forms["nom_sg_m"] = {"quī", "quis", "quei{†}"} forms["nom_sg_f"] = {"quae", "qua"} forms["acc_sg_f"] = "quam" forms["abl_sg_m"] = "quō" forms["abl_sg_f"] = "quā" forms["abl_sg_n"] = "quō" else insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = {"quis", "quī"} forms["nom_sg_f"] = {"quae", "qua", "quis{†}"} forms["acc_sg_f"] = {"quam", "quem{†}"} forms["abl_sg_m"] = {"quō", "quī"} forms["abl_sg_f"] = {"quā", "quī"} forms["abl_sg_n"] = {"quō", "quī"} end forms["nom_sg_n"] = "qu"..id forms["nom_pl_m"] = {"quī", "quei{†}"} forms["nom_pl_f"] = "quae" forms["nom_pl_n"] = {"quae", "qua"} forms["gen_sg_m"] = {"cuius", "quoius{†}"} forms["gen_sg_f"] = {"cuius", "quoius{†}"} forms["gen_sg_n"] = {"cuius", "quoius{†}"} forms["gen_pl_m"] = "quōrum" forms["gen_pl_f"] = "quārum" forms["gen_pl_n"] = "quōrum" forms["dat_sg_m"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_f"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_n"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_n"] = {"quibus", "quīs", "queis{†}"} forms["acc_sg_m"] = "quem" forms["acc_sg_n"] = "qu"..id forms["acc_pl_m"] = "quōs" forms["acc_pl_f"] = "quās" forms["acc_pl_n"] = {"quae", "qua"} forms["abl_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_n"] = {"quibus", "quīs", "queis{†}"} elseif arg1 == "aliquī" then insert_if_not(data.title, "determinante indefinido") forms["nom_sg_m"] = {"aliquī{DET/ADJ}", "aliquis{PRON/SUST}"} forms["nom_sg_f"] = {"aliqua", "aliquae{R}"} forms["nom_sg_n"] = "aliquod" forms["nom_pl_m"] = "aliquī" forms["nom_pl_f"] = "aliquae" forms["nom_pl_n"] = "aliqua" forms["gen_sg_m"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_f"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_n"] = {"alicuius", "aliquoius{†}"} forms["gen_pl_m"] = "aliquōrum" forms["gen_pl_f"] = "aliquārum" forms["gen_pl_n"] = "aliquōrum" forms["dat_sg_m"] = {"alicui", "aliquoi{†}"} forms["dat_sg_f"] = {"alicui", "aliquoi{†}"} forms["dat_sg_n"] = {"alicui", "aliquoi{†}"} forms["dat_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["acc_sg_m"] = "aliquem" forms["acc_sg_f"] = "aliquam" forms["acc_sg_n"] = "aliquod" forms["acc_pl_m"] = "aliquōs" forms["acc_pl_f"] = "aliquās" forms["acc_pl_n"] = "aliqua" forms["abl_sg_m"] = "aliquō" forms["abl_sg_f"] = "aliquā" forms["abl_sg_n"] = "aliquō" forms["abl_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} elseif arg1 == "quisquam" then insert_if_not(data.title, "determinante indefinido, concordancia en negativo") data.note = "En latín clásico, era preferidas las formas de ''ūllus'' en lugar de las esta voz para el femenino y el neutro." forms["nom_sg_m"] = "quisquam" forms["nom_sg_f"] = {"quaequam", "quisquam{†}"} forms["nom_sg_n"] = "quodquam" forms["nom_pl_m"] = "quīquam" forms["nom_pl_f"] = "quaequam" forms["nom_pl_n"] = "quaequam" forms["gen_sg_m"] = "cuiusquam" forms["gen_sg_f"] = "cuiusquam" forms["gen_sg_n"] = "cuiusquam" forms["gen_pl_m"] = "quōrumquam" forms["gen_pl_f"] = "quārumquam" forms["gen_pl_n"] = "quōrumquam" forms["dat_sg_m"] = "cuiquam" forms["dat_sg_f"] = "cuiquam" forms["dat_sg_n"] = "cuiquam" forms["dat_pl_m"] = "quibusquam" forms["dat_pl_f"] = "quibusquam" forms["dat_pl_n"] = "quibusquam" forms["acc_sg_m"] = "quemquam" forms["acc_sg_f"] = {"quamquam", "quemquam{†}"} forms["acc_sg_n"] = "quodquam" forms["acc_pl_m"] = "quōsquam" forms["acc_pl_f"] = "quāsquam" forms["acc_pl_n"] = "quaequam" forms["abl_sg_m"] = {"quōquam", "quīquam{†}"} forms["abl_sg_f"] = "quāquam" forms["abl_sg_n"] = "quōquam" forms["abl_pl_m"] = "quibusquam" forms["abl_pl_f"] = "quibusquam" forms["abl_pl_n"] = "quibusquam" forms["voc_sg_m"] = "quisquam" forms["voc_sg_f"] = "quaequam" forms["voc_sg_n"] = "quodquam" forms["voc_pl_m"] = "quīquam" forms["voc_pl_f"] = "quaequam" forms["voc_pl_n"] = "quaequam" elseif arg1 == "quisquis" then insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = "quisquis" forms["nom_sg_f"] = "quisquis" forms["nom_sg_n"] = {"quidquid", "quicquid"} forms["nom_pl_m"] = "quīquī" forms["nom_pl_f"] = "quaequae" forms["nom_pl_n"] = "quaequae" forms["gen_sg_m"] = "cuiuscuius" forms["gen_sg_f"] = "cuiuscuius" forms["gen_sg_n"] = "cuiuscuius" forms["gen_pl_m"] = "quōrumquōrum" forms["gen_pl_f"] = "quārumquārum" forms["gen_pl_n"] = "quōrumquōrum" forms["dat_sg_m"] = "cuicui" forms["dat_sg_f"] = "cuicui" forms["dat_sg_n"] = "cuicui" forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"} forms["acc_sg_m"] = "quemquem" forms["acc_sg_f"] = "quamquam" forms["acc_sg_n"] = {"quidquid", "quicquid"} forms["acc_pl_m"] = "quōsquōs" forms["acc_pl_f"] = "quāsquās" forms["acc_pl_n"] = "quaequae" forms["abl_sg_m"] = "quōquō" forms["abl_sg_f"] = "quāquā" forms["abl_sg_n"] = "quōquō" forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"} forms["voc_sg_m"] = "quisquis" forms["voc_sg_f"] = "quisquis" forms["voc_sg_n"] = {"quidquid", "quicquid"} forms["voc_pl_m"] = "quīquī" forms["voc_pl_f"] = "quaequae" forms["voc_pl_n"] = "quaequae" elseif arg1 == "ecquis" then insert_if_not(data.title, "pronombre interrogativo") forms["nom_sg_m"] = {"ecquis", "ecquī"} forms["nom_sg_f"] = {"ecqua", "ecquae"} forms["nom_sg_n"] = "ecquid" forms["nom_pl_m"] = "ecquī" forms["nom_pl_f"] = "ecquae" forms["nom_pl_n"] = {"ecqua", "ecquae"} forms["gen_sg_m"] = "eccuius" forms["gen_sg_f"] = "eccuius" forms["gen_sg_n"] = "eccuius" forms["dat_sg_m"] = "eccui" forms["dat_sg_f"] = "eccui" forms["dat_sg_n"] = "eccui" forms["acc_sg_m"] = "ecquem" forms["acc_sg_f"] = "ecquam" forms["acc_sg_n"] = "ecquod" forms["acc_pl_m"] = "ecquōs" forms["acc_pl_f"] = "ecquās" forms["acc_pl_n"] = {"ecqua", "ecquae"} forms["abl_sg_m"] = {"ecquō", "ecquī"} forms["abl_sg_f"] = {"ecquā", "ecquī"} forms["abl_sg_n"] = {"ecquō", "ecquī"} elseif arg1 == "quīdam" then insert_if_not(data.title, "pronombre indefinido") forms["nom_sg_m"] = "quīdam" forms["nom_sg_f"] = "quaedam" forms["nom_sg_n"] = "quiddam" forms["nom_pl_m"] = {"quīdam", "quēsdam{†}"} forms["nom_pl_f"] = "quaedam" forms["nom_pl_n"] = "quaedam" forms["gen_sg_m"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_f"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_n"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_pl_m"] = {"quōrundam", "quōrumdam"} forms["gen_pl_f"] = {"quārundam", "quārumdam"} forms["gen_pl_n"] = {"quōrundam", "quōrumdam"} forms["dat_sg_m"] = {"cuidam", "quoidam{†}"} forms["dat_sg_f"] = {"cuidam", "quoidam{†}"} forms["dat_sg_n"] = {"cuidam", "quoidam{†}"} forms["dat_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_n"] = {"quibusdam", "quīsdam{†}"} forms["acc_sg_m"] = {"quendam", "quemdam"} forms["acc_sg_f"] = {"quandam", "quamdam"} forms["acc_sg_n"] = "quiddam" forms["acc_pl_m"] = {"quōsdam", "quēsdam{†}"} forms["acc_pl_f"] = "quāsdam" forms["acc_pl_n"] = "quaedam" forms["abl_sg_m"] = "quōdam" forms["abl_sg_f"] = "quādam" forms["abl_sg_n"] = "quōdam" forms["abl_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_n"] = {"quibusdam", "quīsdam{†}"} elseif arg1 == "nēmō" then insert_if_not(data.title, "Determinante y pronombre, concordancia en negativo") forms["nom_sg_m"] = "nēmō" forms["nom_sg_f"] = "nēmō" forms["gen_sg_m"] = {"nūllī̆us", "nēminis{R}"} forms["gen_sg_f"] = {"nūllī̆us", "nēminis{R}"} forms["dat_sg_m"] = "nēminī" forms["dat_sg_f"] = "nēminī" forms["acc_sg_m"] = "nēminem" forms["acc_sg_f"] = "nēminem" forms["abl_sg_m"] = {"nūllō", "nēmine{R}"} forms["abl_sg_f"] = {"nūllā", "nēmine{R}"} else error('adjective ' .. arg1 .. ' not recognized') end end local function extract_base(lemma, ending) if ending:find("(", nil, true) then return match(lemma, ending) end return match(lemma, "^(.*)" .. ending .. "$") end local function get_noun_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local subtypes = ending_and_subtypes[2] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. -- In addition, M or F as a subtype is canceled by N, and -- vice-versa, but M doesn't cancel F or vice-versa; instead, -- we simply ignore the conflicting gender specification when -- constructing the combination of specified and inferred subtypes. -- The reason for this is that neuters have distinct declensions -- from masculines and feminines, but masculines and feminines have -- the same declension, and various nouns in Latin that are -- normally masculine are exceptionally feminine and vice-versa -- (nauta, agricola, fraxinus, malus "apple tree", manus, rēs, -- etc.). -- -- In addition, sg as a subtype is canceled by pl and vice-versa. -- It's also possible to specify both, which will override sg but -- not cancel it (in the sense that it won't prevent the relevant -- rule from matching). For example, there's a rule specifying that -- lemmas beginning with a capital letter and ending in -ius take -- the ius.voci.sg subtypes. Specifying such a lemma with the -- subtype both will result in the ius.voci.both subtypes, whereas -- specifying such a lemma with the subtype pl will cause this rule -- not to match, and it will fall through to a less specific rule -- that returns just the ius subtype, which will be combined with -- the explicitly specified pl subtype to produce ius.pl. if specified_subtypes["-" .. subtype] or subtype == "N" and (specified_subtypes.M or specified_subtypes.F) or (subtype == "M" or subtype == "F") and specified_subtypes.N or subtype == "sg" and specified_subtypes.pl or subtype == "pl" and specified_subtypes.sg then not_this_subtype = true break end end end if not not_this_subtype then if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] local base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending == stem2 then return base, stem2, subtypes end else local base = extract_base(lemma, ending) if base then return base, stem2, subtypes end end end end if decltype then error("Unrecognized ending for declension-" .. decltype .. " noun: " .. lemma) end return lemma, stem2, keys_to_list(specified_subtypes) end local patterns = { {"[mM]a", "%0t"}, {"e", ""}, {"([aoAO])([lr])", "%1" .. MACRON .. "%2"}, {"[eE]l", "%0l"}, {"([mM])en", "%1in"}, {"([tT]ūd)ō", "%1in"}, {"([gG])ō", "%1in"}, {"[ōŌ]", "%1n"}, {"er", "r"}, {"[ēi]s", ""}, {"([āēīōūȳĀĒĪŌŪȲ]n)s", function(v) return (gsub(toNFD(v), MACRON, "") .. "t") end}, {"([cC])eps", "%1ipit"}, {"([bp])s", "%1"}, {"us", "or"}, {"s", "t"}, {"ex", "ic"}, {"x", "c"}, } local function make_stem2(stem) local n for _, pattern in ipairs(patterns) do local key = pattern[1] stem, n = gsub(stem, key .. "$", pattern[2]) if n > 0 then -- debug_track("la-utilities/" .. key) REVISAR return toNFC(stem) end end -- debug_track("la-utilities") REVISAR return stem end local function detect_noun_subtype(lemma, stem2, typ, subtypes) local base, _ if typ == "1" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ām", {"F", "am"}}, {"ās", {"M", "Greek", "Ma"}}, {"ēs", {"M", "Greek", "Me"}}, {"ē", {"F", "Greek"}}, {"ae", {"F", "pl"}}, {"a", {"F"}}, }) elseif typ == "2" then local detected_subtypes lemma, stem2, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(.*r)$", {"M", "er"}}, {"^(.*v)os$", {"M", "vos"}}, {"^(.*v)om$", {"N", "vom"}}, -- If the lemma ends in -os and the user said N or -M, then the -- following won't apply, and the second (neuter) -os will applly. {"os", {"M", "Greek"}}, {"os", {"N", "Greek", "us"}}, {"on", {"N", "Greek"}}, -- -ius beginning with a capital letter is assumed a proper name, -- and takes the voci subtype (vocative in -ī) along with the ius -- subtype and sg-only. Other nouns in -ius just take the ius -- subtype. Explicitly specify "sg" so that if .pl is given, -- this rule won't apply. {"^(%u.*)ius$", {"M", "ius", "voci", "sg"}}, {"ius", {"M", "ius"}}, {"ium", {"N", "ium"}}, -- If the lemma ends in -us and the user said N or -M, then the -- following won't apply, and the second (neuter) -us will applly. {"us", {"M"}}, {"us", {"N", "us"}}, {"um", {"N"}}, {"iī", {"M", "ius", "pl"}}, {"ia", {"N", "ium", "pl"}}, -- If the lemma ends in -ī and the user said N or -M, then the -- following won't apply, and the second (neuter) -ī will applly. {"ī", {"M", "pl"}}, {"ī", {"N", "us", "pl"}}, {"oe", {"M", "Greek", "pl"}}, {"a", {"N", "pl"}}, }) stem2 = stem2 or lemma return lemma, stem2, detected_subtypes elseif typ == "3" then if subtypes.pl then if subtypes.Greek then base = lemma:match("^(.*)erēs$") if base then return base .. "ēr", base .. "er", {"er"} end base = lemma:match("^(.*)ontēs$") if base then return base .. "ōn", base .. "ont", {"on"} end base = lemma:match("^(.*)es$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural Greek noun: " .. lemma) end base = lemma:match("^(.*)ia$") if base then return base, stem2 or base, {"N", "I", "pure"} end base = lemma:match("^(.*)a$") if base then return base, stem2 or base, {"N"} end base = lemma:match("^(.*)ēs$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural noun: " .. lemma) end stem2 = stem2 or make_stem2(lemma) local detected_subtypes if subtypes.Greek then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"is", ""}, {"I"}}, {"ēr", {"er"}}, {"ōn", {"on"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} end if not subtypes.N then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"^(%u.*pol)is$", ""}, {"F", "polis", "sg", "loc"}}, {{"tūdō", "tūdin"}, {"F"}}, {{"tās", "tāt"}, {"F"}}, {{"tūs", "tūt"}, {"F"}}, {{"tiō", "tiōn"}, {"F"}}, {{"siō", "siōn"}, {"F"}}, {{"xiō", "xiōn"}, {"F"}}, {{"gō", "gin"}, {"F"}}, {{"or", "ōr"}, {"M"}}, {{"tr[iī]x", "trīc"}, {"F"}}, {{"is", ""}, {"I"}}, {{"^(%l.*)ēs$", ""}, {"I"}}, }) if base then return lemma, stem2, detected_subtypes end end base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"us", "or"}, {"N"}}, {{"us", "er"}, {"N"}}, {{"ma", "mat"}, {"N"}}, {{"men", "min"}, {"N"}}, {{"^(%u.*)e$", ""}, {"N", "sg"}}, {{"e", ""}, {"N", "I", "pure"}}, {{"al", "āl"}, {"N", "I", "pure"}}, {{"ar", "ār"}, {"N", "I", "pure"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} elseif typ == "4" then if subtypes.echo or subtypes.Callisto then base = lemma:match("^(.*)ō$") if not base then error("Declension-4 noun of subtype .echo or .Callisto should end in -ō: " .. lemma) end if subtypes.Callisto then return base, nil, {"F", "sg"} else return base, nil, {"F"} end end return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", {"M"}}, {"ū̆", {"N"}}, {"ūs", {"M", "pl"}}, {"ua", {"N", "pl"}}, }) elseif typ == "5" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"iēs", {"F", "i"}}, {"iēs", {"F", "i", "pl"}}, {"ēs", {"F"}}, {"ēs", {"F", "pl"}}, }) elseif typ == "sgpl" then return lemma, stem2, {} elseif typ == "irreg" and lemma == "domus" then -- [[domus]] auto-sets data.loc = true, but we need to know this -- before declining the noun so we can propagate it to other segments. return lemma, nil, {"loc"} elseif typ == "indecl" or typ == "irreg" and ( lemma == "Deus" or match(lemma, "^[IJ]ēs[uū]s$") or lemma == "Athōs" or lemma == "vēnum" ) then -- Indeclinable nouns, and certain irregular nouns, set data.num = "sg", -- but we need to know this before declining the noun so we can -- propagate it to other segments. return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", {"both"}}, {"", {"sg"}}, {"", {"pl"}}, }) elseif typ == "indecl" or typ == "irreg" then return lemma, nil, {} else return nil, nil, {} end end -- Given ENDINGS_AND_SUBTYPES (a list of four-tuples of ENDING, RETTYPE, -- SUBTYPES, PROCESS_RETVAL), check each ENDING in turn against LEMMA and -- STEM2. If it matches, return a four-tuple BASE, STEM2, RETTYPE, NEW_SUBTYPES -- where BASE is normally the remainder of LEMMA minus the ending, STEM2 is -- as passed in, RETTYPE is as passed in, and NEW_SUBTYPES is the same as -- SUBTYPES minus any subtypes beginning with a hyphen. If no endings match, -- throw an error if DECLTYPPE is non-nil, mentioning the DECLTYPE -- (user-specified declension); but if DECLTYPE is nil, just return the tuple -- nil, nil, nil, nil. -- -- In order for a given entry to match, ENDING must match and also the subtypes -- in SUBTYPES (a list) must not be incompatible with the passed-in -- user-specified subtypes SPECIFIED_SUBTYPES (a set, i.e. a table where the -- keys are strings and the value is always true). "Incompatible" means that -- a given SUBTYPE is specified in either one and -SUBTYPE in the other, or -- that "pl" is found in SPECIFIED_SUBTYPES and not in SUBTYPES. -- -- The ending spec in ENDINGS_AND_SUBTYPES is one of the following: -- -- 1. A simple string, e.g. "tūdō", specifying an ending. -- 2. A regex that should match the entire lemma (it should be anchored at -- the beginning with ^ and at the end with $), and contains a single -- capturing group to match the base. -- 3. A pair {SIMPLE_STRING_OR_REGEX, STEM2_ENDING} where -- SIMPLE_STRING_OR_REGEX is one of the previous two possibilities and -- STEM2_ENDING is a string specifying the corresponding ending that must -- be present in STEM2. If this form is used, the combination of -- base + STEM2_ENDING must exactly match STEM2 in order for this entry -- to be considered a match. An example is {"is", ""}, which will match -- lemma == "follis", stem2 == "foll", but not lemma == "lapis", -- stem2 == "lapid". -- -- If PROCESS_STEM2 is given and the returned STEM2 would be nil, call -- process_stem2(BASE) to get the STEM2 to return. local function get_adj_type_and_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes, process_stem2) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local rettype = ending_and_subtypes[2] local subtypes = ending_and_subtypes[3] local process_retval = ending_and_subtypes[4] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. if specified_subtypes["-" .. subtype] then not_this_subtype = true break end -- A subtype is canceled if the user specified SUBTYPE and -- -SUBTYPE is given in the to-be-returned subtypes. local must_not_be_present = subtype:match("^%-(.*)$") if must_not_be_present and specified_subtypes[must_not_be_present] then not_this_subtype = true break end end end if not not_this_subtype then local base if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending ~= stem2 then base = nil end else base = extract_base(lemma, ending) end if base then -- Remove subtypes of the form -SUBTYPE from the subtypes -- to be returned. local new_subtypes = {} for _, subtype in ipairs(subtypes) do if subtype:sub(1, 1) ~= "-" then insert(new_subtypes, subtype) end end if process_retval then base, stem2 = process_retval(base, stem2) end if process_stem2 then stem2 = stem2 or process_stem2(base) end return base, stem2, rettype, new_subtypes end end end if not decltype then return lemma, stem2, nil, keys_to_list(specified_subtypes) elseif decltype == "" then error("Unrecognized ending for adjective: " .. lemma) else error("Unrecognized ending for declension-" .. decltype .. " adjective: " .. lemma) end end -- Autodetect the type and subtype of an adjective given all the information -- specified by the user: lemma, stem2, declension type and specified subtypes. -- Four values are returned: the lemma base (i.e. the stem of the lemma, as -- required by the declension functions), the value of stem2 to pass to the -- declension function, the declension type and the autodetected subtypes. -- Note that this will not detect a given subtype if -SUBTYPE is specified for -- any subtype that would be returned, or if SUBTYPE is specified and -SUBTYPE -- is among the subtypes that would be returned (such subtypes are filtered out -- of the returned subtypes). local function detect_adj_type_and_subtype(lemma, stem2, typ, subtypes) local function base_as_stem2(base, stem2) return base, base end local function constant_base(baseval) return function(base, stem2) return baseval, nil end end local function decl12_stem2(base) return base end local function decl3_stem2(base) return make_stem2(base) end local decl12_entries = { {"us", "1&2+", {}}, {"a", "1&2+", {}}, {"um", "1&2+", {}}, {"ī", "1&2+", {"pl"}}, {"ae", "1&2+", {"pl"}}, {"a", "1&2+", {"pl"}}, -- Nearly all -os adjectives are greekA {"os", "1&2+", {"greekA", "-greekE"}}, {"os", "1&2+", {"greekE", "-greekA"}}, {"ē", "1&2+", {"greekE", "-greekA"}}, {"on", "1&2+", {"greekA", "-greekE"}}, {"on", "1&2+", {"greekE", "-greekA"}}, {"^(.*er)$", "1&2+", {"er"}}, {"^(.*ur)$", "1&2+", {"er"}}, {"^(h)ic$", "1&2+", {"ic"}}, } local decl3_entries = { {"^(.*er)$", "3-3+", {"I"}}, {"^(.*er)$", "3-3+", {}}, {"is", "3-2+", {"I"}}, {"is", "3-2+", {}}, {"e", "3-2+", {"I"}}, {"e", "3-2+", {}}, {"^(.*[ij])or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(.*[ij])or$", "3-C+", {}}, {"^(min)or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(min)or$", "3-C+", {}}, {"^(.*trīx)$", "3-def+", {"trix", "abl_i_e", "-abl_e_i"}}, {"^(.*trīx)$", "3-def+", {"trix"}}, {"^(.*tor)$", "3-def+", {"tor", "abl_i_e", "-abl_e_i"}}, {"^(.*tor)$", "3-def+", {"tor"}}, -- Detect -ēs as 3-1 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like quadripēs, volucripēs). -- Essentially, for declension-3 adjectives, we require that -- .pl is given if the lemma is plural. -- -- Most 3-1 adjectives are i-stem (e.g. audāx) so we require -I -- to be given with non-i-stem adjectives. The first entry below -- will apply when -I isn't given, the second when it is given. {"^(.*ēs)$", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"I"}}, {"^(.*ēs)$", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"par"}}, {"^(.*[ij])ōrēs$", "3-C+", {"pl"}}, {"^(min)ōrēs$", "3-C+", {"pl"}}, -- If .pl with -ēs, we don't know if the adjective is 3-1, 3-2 -- or 3-3. Since 3-2 is probably the most common, we infer it -- (as well as the fact that these adjectives *are* in a sense -- 3-2 since they have a distinct neuter in -(i)a. Note that -- we have two entries here; the first one will apply unless -- -I is given, and will infer an i-stem adjective; the second -- one will apply otherwise (and infer a non-i-stem 3-1 adjective). {"ēs", "3-2+", {"pl", "I"}, base_as_stem2}, {"ēs", "3-1+", {"pl", "par"}, base_as_stem2}, -- Same for neuters. {"ia", "3-2+", {"pl", "I"}, base_as_stem2}, {"a", "3-1+", {"pl", "par"}, base_as_stem2}, -- As above for -ēs but for miscellaneous singulars. {"", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"I"}}, {"", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"par"}}, } local function get_subtypes_and_endings(typ, f) local subtypes_and_endings = {} for _, v in ipairs(decl3_entries) do if f(v) then v = deep_copy(v) v[2] = typ insert(subtypes_and_endings, v) end end return subtypes_and_endings end local function compare(spec) return spec[2] == typ end if typ == "+" then local base, new_stem2, rettype, new_subtypes = get_adj_type_and_subtype_by_ending(lemma, stem2, nil, subtypes, decl12_entries, decl12_stem2) if rettype then return base, new_stem2, rettype, new_subtypes else return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) end elseif typ == "3+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) elseif typ == "1&2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl12_entries, decl12_stem2) elseif typ == "1-1+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"a", typ, {}}, {"ae", typ, {"pl"}}, }) elseif typ == "2-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", typ, {}}, {"um", typ, {}}, {"ī", typ, {"pl"}}, {"a", typ, {"pl"}}, {"os", typ, {"greek"}}, {"on", typ, {"greek"}}, {"oe", typ, {"greek", "pl"}}, }) elseif typ == "3-1+" then -- Use the specs from `decl3_entries`, but add the two i-stem 3-2+ specs when plural-only, as they're the same when 3-1+. local subtypes_and_endings = get_subtypes_and_endings(typ, function(spec) local spec1, spec2 = spec[1], spec[2] return spec2 == typ or (spec2 == "3-2+" and spec1 == "ēs" or spec1 == "ia") end) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-def+" then -- Like 3-1+ but defective in gender local subtypes_and_endings = get_subtypes_and_endings(typ, compare) insert(subtypes_and_endings, {"", typ, {"I"}}) insert(subtypes_and_endings, {"", typ, {"par"}}) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"is", typ, {}}, {"e", typ, {}}, -- Detect -ēs as 3-2 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like isoscelēs). Essentially, -- for declension-3 adjectives, we require that .pl is given -- if the lemma is plural. {"ēs", typ, {}}, {"ēs", typ, {"pl"}}, {"ia", typ, {"pl"}}, }, decl3_stem2) elseif typ == "3-3+" or typ == "3-P+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ēs", typ, {"pl"}, base_as_stem2}, {"ia", typ, {"pl"}, base_as_stem2}, {"", typ, {}}, }, decl3_stem2) elseif typ == "3-C+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, get_subtypes_and_endings(typ, compare), decl3_stem2) elseif typ == "irreg+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(duo)$", typ, {"pl"}}, {"^(ambō)$", typ, {"pl"}}, {"^(mīll?ia)$", typ, {"N", "pl"}, constant_base("mīlle")}, -- match ea {"^(ea)$", typ, {}, constant_base("is")}, -- match id {"^(id)$", typ, {}, constant_base("is")}, -- match plural eī, iī {"^([ei]ī)$", typ, {"pl"}, constant_base("is")}, -- match plural ea, eae {"^(eae?)$", typ, {"pl"}, constant_base("is")}, -- match eadem {"^(eadem)$", typ, {}, constant_base("īdem")}, -- match īdem, idem {"^([īi]dem)$", typ, {}, constant_base("īdem")}, -- match plural īdem {"^(īdem)$", typ, {"pl"}}, -- match plural eadem, eaedem {"^(eae?dem)$", typ, {"pl"}, constant_base("īdem")}, -- match illa, ipsa, ista; it doesn't matter if we overmatch because -- we'll get an error as we use the stem itself in the returned base {"^(i[lps][lst])a$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match illud, istud; as above, it doesn't matter if we overmatch {"^(i[ls][lt])ud$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match ipsum {"^(ipsum)$", typ, {}, constant_base("ipse")}, -- match plural illī, ipsī, istī; as above, it doesn't matter if we -- overmatch {"^(i[lps][lst])ī$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- match plural illa, illae, ipsa, ipsae, ista, istae; as above, it -- doesn't matter if we overmatch {"^(i[lps][lst])ae?$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- Detect quī as non-plural unless .pl specified. {"^(quī)$", typ, {}}, -- Otherwise detect quī as plural. {"^(quī)$", typ, {"pl"}}, -- Same for quae. {"^(quae)$", typ, {}, constant_base("quī")}, {"^(quae)$", typ, {"pl"}, constant_base("quī")}, {"^(quid)$", typ, {}, constant_base("quis")}, {"^(quod)$", typ, {}, constant_base("quī")}, {"^(qui[cd]quid)$", typ, {}, constant_base("quisquis")}, {"^(quīquī)$", typ, {"pl"}, constant_base("quisquis")}, {"^(quaequae)$", typ, {"pl"}, constant_base("quisquis")}, -- match all remaining lemmas in lemma form {"", typ, {}}, }) elseif typ == "indecl+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", typ, {"both"}}, {"", typ, {"sg"}}, {"", typ, {"pl"}}, }) else -- 0+ return lemma, nil, typ, {} end end local noun_lb = { nom_sg = "sg.", gen_sg = "sg.", dat_sg = "sg.", acc_sg = "sg.", abl_sg = "sg.", voc_sg = "sg.", loc_sg = "sg.", nom_pl = "pl.", gen_pl = "pl.", dat_pl = "pl.", acc_pl = "pl.", abl_pl = "pl.", voc_pl = "pl.", loc_pl = "pl." } function export.sust(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de = "num"}, ["nota"] = {}, } for form,_ in pairs(noun_lb) do params[form] = {lista=true} end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local genero local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, detected_subtypes = detect_noun_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end if not genero then if types.M then genero = "m" end if types.N then genero = "n" end if types.F then genero = "f" end end local es_adj if not r1 and genero then local typ r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) if r1 then c = typ es_adj = true end end assert(r1, "forma no reconocida: "..r[1]) local cb = es_adj and adj_decl[c] or noun_decl[c] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) if es_adj then local forms_ = {} for form,arr in pairs(data.forms) do local f1, f2 = form:match("^(.*)(_"..genero..")$") if f1 then forms_[f1] = arr end end data.forms = forms_ end if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, noun_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if declinfo["loc_sg"] and #declinfo["loc_sg"] == 0 then declinfo["loc_sg"] = nil end if declinfo["loc_pl"] and #declinfo["loc_pl"] == 0 then declinfo["loc_pl"] = nil end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local forms = sobreescribir_formas(declinfo, args, false, {}) comprobar_defectivo(forms, {}) forms = desactivar_formas(forms, function (form) return (form:find("pl$") and nopl) or (form:find("sg$") and nosg) end ) local raiz_nom = f(forms["nom_sg"][1] or forms["nom_pl"][1] or "?") local raiz_gen = f(forms["gen_sg"][1] or forms["gen_pl"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, noun_lb) local t = {} insert(t, {{""}, {"Singular"}, {"Plural"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg"], forms["nom_pl"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg"], forms["gen_pl"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg"], forms["dat_pl"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg"], forms["acc_pl"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg"], forms["abl_pl"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg"], forms["voc_pl"]}) if (forms["loc_sg"] and forms["loc_sg"][1]) or (forms["loc_pl"] and forms["loc_pl"][1]) then insert(t, {{"Locativo", header=true, color=COLOR_H}, forms["loc_sg"], forms["loc_pl"]}) end insert(t, {{args["nota"] or "", colspan=3}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_nom..", "..raiz_gen.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local adj_lb = { nom_sg_m = "m.", nom_sg_n = "n.", nom_sg_f = "f.", nom_pl_m = "m.", nom_pl_n = "n.", nom_pl_f = "f.", gen_sg_m = "m.", gen_sg_n = "n.", gen_sg_f = "f.", gen_pl_m = "m.", gen_pl_n = "n.", gen_pl_f = "f.", dat_sg_m = "m.", dat_sg_n = "n.", dat_sg_f = "f.", dat_pl_m = "m.", dat_pl_n = "n.", dat_pl_f = "f.", acc_sg_m = "m.", acc_sg_n = "n.", acc_sg_f = "f.", acc_pl_m = "m.", acc_pl_n = "n.", acc_pl_f = "f.", abl_sg_m = "m.", abl_sg_n = "n.", abl_sg_f = "f.", abl_pl_m = "m.", abl_pl_n = "n.", abl_pl_f = "f.", voc_sg_m = "m.", voc_sg_n = "n.", voc_sg_f = "f.", voc_pl_m = "m.", voc_pl_n = "n.", voc_pl_f = "f.", } function export.adj(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de="num"}, ["gen"] = {por_defecto="mfn"}, ["nota"] = {}, } for form,_ in pairs(adj_lb) do params[form] = {lista=true} end params["dat_pl"] = {lista=true} params["abl_pl"] = {lista=true} params["loc_pl"] = {lista=true} local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) if args["dat_pl"][1] then args["dat_pl_m"] = deep_copy(args["dat_pl"]) args["dat_pl_n"] = deep_copy(args["dat_pl"]) args["dat_pl_f"] = deep_copy(args["dat_pl"]) end if args["abl_pl"][1] then args["abl_pl_m"] = deep_copy(args["abl_pl"]) args["abl_pl_n"] = deep_copy(args["abl_pl"]) args["abl_pl_f"] = deep_copy(args["abl_pl"]) end if args["loc_pl"][1] then args["loc_pl_m"] = deep_copy(args["loc_pl"]) args["loc_pl_n"] = deep_copy(args["loc_pl"]) args["loc_pl_f"] = deep_copy(args["loc_pl"]) end args["dat_pl"] = nil args["abl_pl"] = nil args["loc_pl"] = nil assert(not find(title, " "), "locuciones no soportadas aún") -- REVISAR local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") a = a or subarg b = b or "+" local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end local cb = adj_decl[typ] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) local formas_ = {} -- necesario crear otro arreglo para no modificar las claves durante la iteración for form,arr in pairs(data.forms) do local pref = match(form, "^(.*)_m$") if pref and not data.forms[pref.."_f"] then formas_[pref.."_f"] = deep_copy(arr) end if pref and not data.forms[pref.."_n"] then formas_[pref.."_n"] = deep_copy(arr) end formas_[form] = arr end data.forms = formas_ if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, adj_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local m = find(args["gen"], "m") local fem = find(args["gen"], "f") local n = find(args["gen"], "n") local forms = sobreescribir_formas(declinfo, args, false, {}, adj_lb) comprobar_defectivo(forms) forms = desactivar_formas(forms, function (form) return (form:find("pl") and nopl) or (form:find("sg") and nosg) or (form:find("m$") and not m) or (form:find("f$") and not fem) or (form:find("n$") and not n) end ) local raiz_m = f(forms["nom_sg_m"][1] or forms["nom_pl_m"][1] or "?") local raiz_f = f(forms["nom_sg_f"][1] or forms["nom_pl_f"][1] or "?") local raiz_n = f(forms["nom_sg_n"][1] or forms["nom_pl_n"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, adj_lb) local t = {} insert(t, {{"Singular", colspan=4}, header=true, color=COLOR_H}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg_m"], forms["nom_sg_f"], forms["nom_sg_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg_m"], forms["gen_sg_f"], forms["gen_sg_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg_m"], forms["dat_sg_f"], forms["dat_sg_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg_m"], forms["acc_sg_f"], forms["acc_sg_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg_m"], forms["abl_sg_f"], forms["abl_sg_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg_m"], forms["voc_sg_f"], forms["voc_sg_n"]}) insert(t, {{"Plural", colspan=4, header=true, color=COLOR_H}}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_pl_m"], forms["nom_pl_f"], forms["nom_pl_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_pl_m"], forms["gen_pl_f"], forms["gen_pl_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_pl_m"], forms["dat_pl_f"], forms["dat_pl_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_pl_m"], forms["acc_pl_f"], forms["acc_pl_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_pl_m"], forms["abl_pl_f"], forms["abl_pl_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_pl_m"], forms["voc_pl_f"], forms["voc_pl_n"]}) insert(t, {{args["nota"] or "", colspan=4}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_m..", "..raiz_f..", "..raiz_n.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local EGO, TU, IS, NOS, VOS, EI = 1, 2, 3, 4, 5, 6 local tostr = {"1", "2", "3", "4", "5", "6"} local PRONOMBRES = {"ego", "tū", "is, ea, id", "nōs", "vōs", "eī, eae, ea"} local PRONOMBRES_SUBJ = {"ut ego", "ut tū", "ut is, ut ea, ut id", "ut nōs", "ut vōs", "ut eī, ut eae, ut ea"} local PRONOMBRES_IMP = {"―", "(tū)", "(is, ea, id)", "―", "(vōs)", "(eī, eae, ea)"} local IMPERSONALES = {"", "", "(id)", "", "", ""} local function obtener_pronombre(forma, impers) local conj, p = match(forma, "^(.*)(%d)$") if not p then return nil end p = tonumber(p) if impers then return IMPERSONALES[p] else if find(conj, "^subj") then return PRONOMBRES_SUBJ[p] end if find(conj, "^imper") then return PRONOMBRES_IMP[p] end return PRONOMBRES[p] end end local sufijos = { ["1"] = { inf_act = {"āre","isse"}, inf_pas = {"ārī"}, part_act = {"āns","ūrus"}, part_pas = {"andus","us"}, ger = {"andī","andō","andum"}, sup = {"um","ū"}, ind_pres = {"ō","ās","at","āmus","ātis","ant"}, ind_imp = {"ābam","ābās","ābat","ābāmus","ābātis","ābant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ābō","ābis","ābit","ābimus","ābitis","ābunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","āris","ātur","āmur","āminī","antur", nil,"āre"}, ind_imp_pas = {"ābar","ābāris","ābātur","ābāmur","ābāminī","ābantur", nil,"ābāre"}, ind_fut_pas = {"ābor","āberis","ābitur","ābimur","ābiminī","ābuntur", nil,"ābere"}, subj_pres = {"em","ēs","et","ēmus","ētis","ent"}, subj_imp = {"ārem","ārēs","āret","ārēmus","ārētis","ārent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"er","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_imp_pas = {"ārer","ārēris","ārētur","ārēmur","ārēminī","ārentur", nil,"ārēre"}, imper_pres = {nil,"ā",nil,nil,"āte",nil}, imper_fut = {nil,"ātō","ātō",nil,"ātōte","antō"}, imper_pres_pas = {nil,"āre",nil,nil,"āminī",nil}, imper_fut_pas = {nil,"ātor","ātor",nil,nil,"antor"}, }, ["2"] = { inf_act = {"ēre","isse"}, inf_pas = {"ērī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"eō","ēs","et","ēmus","ētis","ent"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ēbō","ēbis","ēbit","ēbimus","ēbitis","ēbunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"eor","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ēbor","ēberis","ēbitur","ēbimur","ēbiminī","ēbuntur", nil,"ēbere"}, subj_pres = {"eam","eās","eat","eāmus","eātis","eant"}, subj_imp = {"ērem","ērēs","ēret","ērēmus","ērētis","ērent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ear","eāris","eātur","eāmur","eāminī","eantur", nil,"eāre"}, subj_imp_pas = {"ērer","ērēris","ērētur","ērēmur","ērēminī","ērentur", nil,"ērēre"}, imper_pres = {nil,"ē",nil,nil,"ēte",nil}, imper_fut = {nil,"ētō","ētō",nil,"ētōte","entō"}, imper_pres_pas = {nil,"ēre",nil,nil,"ēminī",nil}, imper_fut_pas = {nil,"ētor","ētor",nil,nil,"entor"}, }, ["3"] = { -- 3 (comparar [[capio]] con [[lego]], las raíces con capi- y leg- pero hay que eliminar la doble ii) inf_act = {"ere","isse"}, inf_pas = {"ī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", nil,"ere"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_pres = {"am","ās","at","āmus","ātis","ant"}, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", nil,"āre"}, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", nil,"erēre"}, imper_pres = {nil,"e",nil,nil,"ite",nil}, imper_fut = {nil,"itō","itō",nil,"itōte","untō"}, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil}, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor"}, }, ["3/4"] = { inf_act = {"ere","isse","īre","isse"}, inf_pas = {"ī","īrī"}, part_act = {"ēns","iēns","ūrus"}, part_pas = {"endus","iendus","us"}, ger = {"endī","endō","endum","iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt", "iō","īs",nil,"īmus","ītis","iunt" }, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant", "iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant" }, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent", "iam","iēs","iet","iēmus","iētis","ient" }, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", "ior","ere","ītur","īmur","īminī","iuntur", nil,"īris",nil,nil,nil,nil, nil,"īre" }, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", "iēbar","ēbāre","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāris",nil,nil,nil,nil, nil,"iēbāre" }, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", "iar","ēre","iētur","iēmur","iēminī","ientur", nil,"iēris",nil,nil,nil,nil, nil,"iēre" }, subj_pres = {"am","ās","at","āmus","ātis","ant", "iam","iās","iat","iāmus","iātis","iant", }, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent", "īrem","īrēs","īret","īrēmus","īrētis","īrent" }, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", "iar","āre","iātur","iāmur","iāminī","iantur", nil,"iāris",nil,nil,nil,nil, nil,"iāre" }, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", "īrer","erēre","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēris",nil,nil,nil,nil, nil,"īrēre" }, imper_pres = {nil,"e",nil,nil,"ite",nil, nil,"ī",nil,nil,"īte",nil }, imper_fut = {nil,"itō","itō",nil,"itōte","untō", nil,"ītō","ītō",nil,"ītōte","iuntō" }, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil, nil,"īre",nil,nil,"īminī",nil }, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor", nil,"ītor","ītor",nil,nil,"iuntor" }, }, ["4"] = { inf_act = {"īre","isse"}, inf_pas = {"īrī"}, part_act = {"iēns","ūrus"}, part_pas = {"iendus","us"}, ger = {"iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"iō","īs","it","īmus","ītis","iunt"}, ind_imp = {"iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"iam","iēs","iet","iēmus","iētis","ient"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"ior","īris","ītur","īmur","īminī","iuntur", nil,"īre"}, ind_imp_pas = {"iēbar","iēbāris","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāre"}, ind_fut_pas = {"iar","iēris","iētur","iēmur","iēminī","ientur", nil,"iēre"}, subj_pres = {"iam","iās","iat","iāmus","iātis","iant"}, subj_imp = {"īrem","īrēs","īret","īrēmus","īrētis","īrent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"iar","iāris","iātur","iāmur","iāminī","iantur", nil,"iāre"}, subj_imp_pas = {"īrer","īrēris","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēre"}, imper_pres = {nil,"ī",nil,nil,"īte",nil}, imper_fut = {nil,"ītō","ītō",nil,"ītōte","iuntō"}, imper_pres_pas = {nil,"īre",nil,nil,"īminī",nil}, imper_fut_pas = {nil,"ītor","ītor",nil,nil,"iuntor"}, } } local formas_no_personales = { inf_act = true, inf_pas = true, part_act = true, part_pas = true, ger = true, sup = true, } local formas_personales = { ind_pres = true, ind_imp = true, ind_perf = true, ind_pluperf = true, ind_fut = true, ind_fut_perf = true, ind_fut_sig = true, ind_pres_pas = true, ind_imp_pas = true, ind_fut_pas = true, subj_pres = true, subj_imp = true, subj_perf = true, subj_pluperf = true, subj_aor_sig = true, subj_pres_pas = true, subj_imp_pas = true, imper_pres = true, imper_fut = true, imper_pres_pas = true, imper_fut_pas = true, } local formas = merge(formas_no_personales, formas_personales) local verbos_irregulares = { {"aiō", {"aiō", "aiiō", "aijō", "ajō"}, { desactivar = {"inf_pas","part_pas","ger","sup","ind_pluperf","ind_fut","ind_fut_perf", "ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_perf","subj_pluperf","subj_pres_pas", "subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {"ai"}, nucleoperf = {"a"}, nucleosup = {}, nucleosigm = {}, inf_act = {"aiere"}, ind_pres = {nil,nil,nil,{}}, ind_perf = {{},nil,nil,{},{}}, subj_pres = {nil,nil,nil,{},{}}, subj_imp = {{},{},nil,{},{},{}}, imper_pres = {{},{"ai"},{},{},{},{}}, }}, {"cedo", {"cedo"}, { desactivar = {"inf_act","inf_pas","part_act","part_pas","ger","sup","ind_pluperf","ind_pres","ind_imp","ind_perf", "ind_fut","ind_fut_perf","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres","subj_imp","subj_perf", "subj_pluperf","subj_pres_pas","subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, imper_pres = {nil,{"cedo"},nil,nil,{"cette","cedile"},nil}, }}, {"dīcō", {"dīcō"}, { conj = "3", nucleopres = {"dīc"}, nucleoperf = {"dīx"}, nucleosup = {"dict"}, nucleosigm = {"dīx"}, desactivar = {}, part_pas = {"dīcendus", "dīcundus", "dictus"}, imper_pres = {nil, {"dīc", "dīce"}}, inf_pas = {"dīcī", "dīcier{L}"}, }}, {"dō", {"dō"}, { conj = "1", nucleopres = {"d"}, nucleoperf = {"ded"}, nucleosup = {"dat"}, nucleosigm = {}, desactivar = {}, inf_act = {"dare","dedisse"}, inf_pas = {"darī"}, ind_pres = {nil,nil,nil,{"damus"},{"datis"},nil}, ind_imp = {{"dabam"},{"dabās"},{"dabat"},{"dabāmus"},{"dabātis"},{"dabant"}}, ind_fut = {{"dabō"},{"dabis"},{"dabit"},{"dabimus"},{"dabitis"},{"dabunt"}}, ind_imp_pas = {{"dabar"},{"dabāris","dabāre"},{"dabātur"},{"dabāmur"},{"dabāminī"},{"dabantur"}}, ind_fut_pas = {{"dabor"},{"daberis","dabere"},{"dabitur"},{"dabimur"},{"dabiminī"},{"dabuntur"}}, subj_imp = {{"darem"},{"darēs"},{"daret"},{"darēmus"},{"darētis"},{"darent"}}, subj_imp_pas = {{"darer"},{"darēris","darēre"},{"darētur"},{"darēmur"},{"darēminī"},{"darentur"}}, imper_pres = {nil,nil,nil,nil,{"date"},nil}, imper_fut = {nil,{"datō"},{"datō"},nil,{"datōte"},{"dantō"}}, imper_pres_pas = {nil,{"dare"},nil,nil,{"daminī"},nil}, imper_fut_pas = {nil,{"dator"},{"dator"},nil,nil,{"dator"}}, }}, {"dūcō", {"dūcō"}, { conj = "3", nucleopres = {"dūc"}, nucleoperf = {"dūx"}, nucleosup = {"duct"}, nucleosigm = {}, desactivar = {}, imper_pres = {nil, {"dūc", "dūce"}}, }}, {"edō", {"edō", "ëdō"}, { conj = "3", nucleopres = {"ed"}, nucleoperf = {"ed"}, nucleosup = {""}, nucleosigm = {}, desactivar = {}, inf_act = {"edere","ēsse"}, part_act = {"edēns","ēsūrus","ēssūrus","ēstūrus"}, part_pas = {"edendus","edundus","ēsus","ēssus","ēstus"}, sup = {"ēsum","ēssum","ēstum","ēsū","ēssū","ēstū"}, ind_pres = {nil,{"edis","ēs"},{"edit","ēst"},nil,{"editis","ēstis"},nil}, ind_pres_pas = {nil,{"ederis","edere","ēssis","ēsse"},{"editur","ēstur"}}, subj_pres = {{"edam","edim"},{"edās","edīs"},{"edat","edit","ēst"},{"edāmus","edīmus"},{"edātis","edītis"},{"edant","edint"}}, subj_imp = {{"ederem","ēssem"},{"ederēs","ēssēs"},{"ederet","ēsset"},{"ederēmus","ēssēmus"},{"ederētis","ēssētis"},{"ederent","ēssent"}}, subj_imp_pas = {{"ederer","ēsser"},{"ederēris","ederēre","ēssēris","ēssēre"},{"ederetur","ēssetur"},{"ederēmur","ēssēmur"},{"ederēminī","ēssēminī"},{"ederentur","ēssentur"}}, imper_pres = {nil,{"ede","ēs"},nil,nil,{"edite","ēste"},nil}, imper_fut = {nil,{"editō","ēstō"},{"editō","ēstō"},nil,{"editōte","ēstōte"},{"eduntō"}}, imper_pres_pas = {nil,{"edere","ēsse"},nil,nil,{"ediminī"},nil}, imper_fut_pas = {nil,{"editor","ēstor"},{"editor","ēstor"},nil,nil,{"eduntor"}}, }}, {"eō", {"eō", "ëō"}, { conj = "4", nucleopres = {""}, nucleoperf = {""}, nucleosup = {""}, nucleosigm = {}, desactivar = {"imper_pres_pas"}, inf_act = {"īre","īsse","iisse","īvisse"}, inf_pas = {"īrī","īrier"}, part_act = {"iēns","itūrus"}, part_pas = {"eundum","itum"}, ger = {"eundī","eundō","eundum"}, sup = {"itum","itū"}, ind_pres = {{"eō"},{"īs"},{"it"},{"īmus"},{"ītis"},{"eunt"}}, ind_imp = {{"ībam"},{"ībās"},{"ībat"},{"ībāmus"},{"ībātis"},{"ībant"}}, ind_perf = {{"iī","īvī"},{"īstī","iistī","īvistī"},{"iit","īvit"},{"iimus","īvimus"},{"īstis","iistis","īvistis"},{"iērunt","iēre","īvērunt","īvēre"}}, ind_pluperf = {{"ieram","īveram"},{"ierās","īverās"},{"ierat","īverat"},{"ierāmus","īverāmus"},{"ierātis","īverātis"},{"ierant","īverant"}}, ind_fut = {{"ībō"},{"ībis"},{"ībit"},{"ībimus"},{"ībitis"},{"ībunt"}}, ind_fut_perf = {{"ierō","īverō"},{"ieris","īveris"},{"ierit","īverit"},{"ierimus","īverimus"},{"ieritis","īveritis"},{"ierint","īverint"}}, ind_fut_sig = {nil,nil,nil,nil,nil,nil}, ind_pres_pas = {{},{},{"ītur"},{},{},{}}, ind_imp_pas = {{},{},{"ībātur"},{},{},{}}, ind_fut_pas = {{},{},{"ībitur"},{},{},{}}, subj_pres = {{"eam"},{"eās"},{"eat"},{"eāmus"},{"eātis"},{"eant"}}, subj_imp = {{"īrem"},{"īrēs"},{"īret"},{"īrēmus"},{"īrētis"},{"īrent"}}, subj_perf = {{"ierim","īverim"},{"ierīs","īverīs"},{"ierit","īverit"},{"ierīmus","īverīmus"},{"ierītis","īverītis"},{"ierint","īverint"}}, subj_pluperf = {{"īssem","iissem","īvissem"},{"īssēs","iissēs","īvissēs"},{"īsset","iisset","īvisset"},{"īssēmus","iissēmus","īvissēmus"},{"īssētis","iissētis","īvissētis"},{"īssent","iissent","īvissent"}}, subj_aor_sig = {nil,nil,nil,nil,nil,nil}, subj_pres_pas = {{},{},{"eātur"},{},{},{}}, subj_imp_pas = {{},{},{"īrētur"},{},{},{}}, imper_pres = {nil,nil,nil,nil,nil,nil}, imper_fut = {nil,nil,nil,nil,nil,{"euntō"}}, imper_fut_pas = {nil,{},nil,nil,nil,{}}, }}, {"faciō", {"faciō"}, { conj = "3", I = true, inf_act = {"facere", "fāre{L}", "fēcisse"}, inf_pas = {"fierī"}, part_pas = {"faciendus", "faciundus", "factus"}, nucleopres = {"fac"}, nucleoperf = {"fēc"}, nucleosup = {"fact"}, nucleosigm = {"fax","faxs","facs"}, desactivar = {}, ind_pres_pas = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, ind_imp_pas = {{"fīēbam"},{"fīēbās"},{"fīēbat"},{"fīēbāmus"},{"fīēbātis"},{"fīēbant"}}, ind_fut_pas = {{"fīam"},{"fīēs"},{"fīet"},{"fīēmus"},{"fīētis"},{"fīent"}}, subj_pres_pas = {{"fīam"},{"fīās"},{"fīat"},{"fīāmus"},{"fīātis"},{"fīant"}}, subj_imp_pas = {{"fierem"},{"fierēs"},{"fieret"},{"fierēmus"},{"fierētis"},{"fierent"}}, imper_pres = {nil,{"fac","face"},nil,nil,nil,nil}, imper_pres_pas = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut_pas = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"ferō", {"ferō"}, { conj = "3", nucleopres = {"fer"}, nucleoperf = {"tul", "tetul{†}"}, nucleosup = {"lāt"}, nucleosigm = {}, desactivar = {}, inf_act = {"ferre", "tulisse", "tetulisse{†}"}, inf_pas = {"ferrī"}, ind_pres = {nil,{"fers"},{"fert"},nil,{"fertis"}}, ind_pres_pas = {nil,{"ferris","ferre"}}, subj_imp = {{"ferrem"},{"ferrēs"},{"ferret"},{"ferrēmus"},{"ferrētis"},{"ferrent"}}, subj_imp_pas = {{"ferrer"},{"ferrēris","ferrēre"},{"ferrētur"},{"ferrēmur"},{"ferrēminī"},{"ferrentur"}}, imper_pres = {nil,{"fer"},nil,nil,{"ferte"},nil}, imper_pres_pas = {nil,{"ferre"},nil,nil,nil,nil}, imper_fut = {nil,{"fertō"},{"fertō"},nil,{"fertōte"},{"feruntō"}}, imper_fut_pas = {nil,{"fertor"},{"fertor"},nil,nil,nil}, }}, {"fīō", {"fīō"}, { conj = "3", nucleopres = {"fī"}, nucleoperf = {}, nucleosup = {"fact"}, nucleosigm = {}, semidep = true, desactivar = {}, inf_act = {"fierī"}, ind_pres = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, imper_pres = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"inquam", {"inquam"}, { conj = "3", I = true, nucleopres = {"inqu"}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, nopasivo = true, desactivar = {"inf_act","inf_pas","part_pas","ger"}, ind_pres = {{"inquam"}}, }}, {"possum", {"possum"}, { conj = "3", nucleopres = {"pot"}, nucleoperf = {"pot"}, nucleosup = {}, nucleosigm = {}, pres = "possō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"posse","potesse{†}"}, part_act = {"potēns"}, ind_pres = {{"possum"},{"potes"},{"potest"},{"possumus"},{"potestis"},{"possunt"}}, ind_imp = {{"poteram"},{"poterās"},{"poterat"},{"poterāmus"},{"poterātis"},{"poterant"}}, ind_fut = {{"poterō"},{"poteris","potere"},{"poterit"},{"poterimus"},{"poteritis"},{"poterunt"}}, ind_perf = {{"potuī"},{"potuistī"},{"potuit"},{"potuimus"},{"potuistis"},{"potuērunt","potuēre"}}, ind_pluperf = {{"potueram"},{"potuerās"},{"potuerat"},{"potuerāmus"},{"potuerātis"},{"potuerant"}}, ind_fut_perf = {{"potuerō"},{"potueris"},{"potuerit"},{"potuerimus"},{"potueritis"},{"potuerunt"}}, subj_pres = {{"possem"},{"possēs"},{"possēt"},{"possēmus"},{"possētis"},{"possent"}}, subj_imp = {{"possim"},{"possīs"},{"possit"},{"possīmus"},{"possītis"},{"possint"}}, subj_perf = {{"potuerim"},{"potuerīs"},{"potuerit"},{"potuerīmus"},{"potuerītis"},{"potuerint"}}, subj_pluperf = {{"potuissem"},{"potuissēs"},{"potuisset"},{"potuissēmus"},{"potuissētis"},{"potuissent"}}, }}, {"sum", {"sum"}, { conj = "3", nucleopres = {"s"}, nucleoperf = {"fu"}, nucleosup = {}, nucleosigm = {}, pres = "sō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres_pas","imper_fut_pas"}, inf_act = {"esse"}, part_act = {"futūrus"}, ind_pres = {{"sum"},{"es"},{"est"},{"sumus"},{"estis"},{"sunt"}}, ind_imp = {{"eram"},{"erās"},{"erat"},{"erāmus"},{"erātis"},{"erant"}}, ind_fut = {{"erō"},{"eris","ere"},{"erit"},{"erimus"},{"eritis"},{"erunt"}}, subj_pres = {{"sim","siem","fuam{†}"},{"sīs","siēs","fuās{†}"},{"sit","siet","fuat{†}"},{"sīmus","siēmus","fuāmus{†}"},{"sītis","siētis","fuātis{†}"},{"sint","sient","fuant{†}"}}, subj_imp = {{"essem","forem"},{"essēs","forēs"},{"esset","foret"},{"essēmus","forēmus"},{"essētis","forētis"},{"essent","forent"}}, imper_pres = {nil,{"es"},nil,nil,{"este"},nil}, imper_fut = {nil,{"estō"},{"estō"},nil,{"estōte"},nil}, }}, {"mālō", {"mālō"}, { conj = "3", nucleopres = {"māl"}, nucleoperf = {"mālu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"mālle","māluisse"}, ind_pres = {{"mālō"},{"māvīs"},{"māvult"},{"mālumus"},{"māvultis"},{"mālunt"}}, subj_pres = {{"mālim"},{"mālīs"},{"mālit"},{"mālīmus"},{"mālītis"},{"mālint"}}, subj_imp = {{"māllem"},{"māllēs"},{"māllet"},{"māllēmus"},{"māllētis"},{"māllent"}}, }}, {"nōlō", {"nōlō"}, { conj = "3", nucleopres = {"nōl"}, nucleoperf = {"nōlu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"nōlle","nōluisse"}, ind_pres = {{"nōlō"},{"nōn vīs","nevīs{†}"},{"nōn vult","nōn volt","nevolt{†}"},{"nōlumus"},{"nōn vultis","nōn voltis","nōltis{†}"},{"nōlunt"}}, subj_pres = {{"nōlim"},{"nōlīs"},{"nōlit"},{"nōlīmus"},{"nōlītis"},{"nōlint"}}, subj_imp = {{"nōllem"},{"nōllēs"},{"nōllet"},{"nōllēmus"},{"nōllētis"},{"nōllent"}}, }}, {"volō", {"volō"}, { conj = "3", nucleopres = {"vol"}, nucleoperf = {"volu"}, nucleosup = {"volit"}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"velle","voluisse"}, ind_pres = {{"volō"},{"vīs"},{"vult","volt{†}"},{"volumus"},{"vultis","voltis{†}"},{"volunt"}}, subj_pres = {{"velim","volim{†}"},{"velīs","volīs{†}"},{"velit","volit{†}"},{"velīmus","volīmus{†}"},{"velītis","volītis{†}"},{"velint","volint{†}"}}, subj_imp = {{"vellem"},{"vellēs"},{"vellet"},{"vellēmus"},{"vellētis"},{"vellent"}}, }}, } local function combinar_prefijo_nucleosufijo(prefijo, nucleosufijo) return prefijo..nucleosufijo end local function combinar_nucleo_sufijo(nucleo, sufijo, agregar_i) if agregar_i and (not find(sufijo, "^[iī]")) and (sufijo ~= "e") and (not find(sufijo, "^er")) then return nucleo.."~i~"..sufijo end return nucleo..sufijo end local function agregar_forma(conjugado, conjinfo, forma) conjinfo[forma] = conjinfo[forma] or {} local sufijos_ = sufijos[conjinfo.conj][forma] local nucleos local prefijo if forma == "sup" then nucleos = conjinfo.nucleosup prefijo = conjinfo.prefijosup or conjinfo.prefijo elseif find(forma, "sig") then nucleos = conjinfo.nucleosigm prefijo = conjinfo.prefijosigm or conjinfo.prefijo elseif find(forma, "perf") then nucleos = conjinfo.nucleoperf prefijo = conjinfo.prefijoperf or conjinfo.prefijo else nucleos = conjinfo.nucleopres prefijo = conjinfo.prefijo end if formas_no_personales[forma] then if conjinfo[forma][1] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma]) do insert_if_not(conjugado[forma], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else for _, sufijo in ipairs(sufijos_) do local nucleos_ = nucleos if forma == "inf_act" and sufijo == "isse" then nucleos_ = conjinfo.nucleoperf elseif forma == "part_act" and sufijo == "ūrus" then nucleos_ = conjinfo.nucleosup elseif forma == "part_pas" and sufijo == "us" then nucleos_ = conjinfo.nucleosup end local agregar_i = conjinfo.I and nucleos_ == conjinfo.nucleopres for _,nucleo in ipairs(nucleos_) do insert_if_not(conjugado[forma], combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(nucleo, sufijo, agregar_i))) end end end return end for i = EGO, EI do local p = tostr[i] if conjinfo[forma][i] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma][i]) do insert_if_not(conjugado[forma..p], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else local k = i while sufijos_[k] do local agregar_i = conjinfo.I and nucleos == conjinfo.nucleopres for j, n in ipairs(nucleos) do local x = combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(n, sufijos_[k], agregar_i)) if conjinfo.always_sync_perf and (forma == "ind_perf" or forma == "ind_pluperf" or forma == "ind_fut_perf" or forma == "subj_perf" or forma == "subj_pluperf") then x = x:gsub("īvī", "iī") x = x:gsub("īvi", "ī") x = x:gsub("īve", "ī") x = x:gsub("īvē", "ē") end insert_if_not(conjugado[forma..p], x) end k = k + 6 end end end end local function get_subtype_by_ending(pres, conjinfo, specs) for _, spec in ipairs(specs) do local base = extract_base(pres, spec[1]) if base then for _,s in ipairs(spec[2]) do if conjinfo[s] == nil then conjinfo[s] = true end end return base end end error("Unrecognized ending for conjugation " .. conjinfo["conj"]) end local function detect_v_type_and_subtypes(conjinfo) local pres = conjinfo["v"] local conj_arg = conjinfo["conj"] pres = toNFC(pres) local base_conj_arg, auto_perf_supine = conj_arg:match("^([124]/?4?)(%+%+?)$") if base_conj_arg then if auto_perf_supine == "++" and base_conj_arg ~= "4" then error("Conjugation types 1++ and 2++ not allowed") end conj_arg = base_conj_arg end conjinfo.conj = conj_arg if conj_arg == "1" then local base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"at", {"impers"}}, {"ātur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "āv" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "āt" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "āss" end end elseif conj_arg == "2" then local base = get_subtype_by_ending(pres, conjinfo, { {"eō", {}}, {"eor", {"dep"}}, {"et", {"impers"}}, {"ētur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "u" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "it" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3" then local base if conjinfo.I == false then -- si explícitamente se indicó que no es del tipo -io, hay que excluir sufijos base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) else base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) end if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end assert(conjinfo["nucleoperf"][1], "especifique todos los núcleos para verbos de la tercera conjugación") assert(conjinfo["nucleosup"][1], "especifique todos los núcleos para verbos de la tercera conjugación") if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3/4" then local base base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "4" then local base = get_subtype_by_ending(pres, conjinfo, { {"iō", {}}, {"ior", {"dep"}}, {"it", {"impers"}}, {"ītur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "irreg" then for _,p in ipairs(verbos_irregulares) do for _,rx in ipairs(p[2]) do local pref, verb = match(conjinfo.v, "^(.*)("..rx..")$") if verb then conjinfo.v = verb conjinfo.prefijo = pref if conjinfo.nucleoperf[1] and conjinfo.nucleoperf[1] ~= "-" then -- [[ecfero]] conjinfo.prefijoperf = conjinfo.nucleoperf[1] conjinfo.nucleoperf = {} end if conjinfo.nucleosup[1] and conjinfo.nucleosup[1] ~= "-" then conjinfo.prefijosup = conjinfo.nucleosup[1] conjinfo.nucleosup = {} end if conjinfo.nucleosigm[1] and conjinfo.nucleosigm[1] ~= "-" then conjinfo.prefijosigm = conjinfo.nucleosigm[1] conjinfo.nucleosigm = {} end conjinfo.irreg = true conjinfo.conj = p[3].conj for k,val in pairs(p[3]) do if not conjinfo[k] or (type(conjinfo[k]) == "table" and not conjinfo[k][1]) then conjinfo[k] = deep_copy(val) end end return conjinfo end end end error("Unrecognized conjugation '" .. conj_arg .. "'") else error("Unrecognized conjugation '" .. conj_arg .. "'") end return conjinfo end function export.v(frame) local title_ = mw.title.getCurrentTitle() local tit = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {alias_de = "conj"}, [2] = {alias_de = "pres"}, [3] = {alias_de = "nucleoperf"}, [4] = {alias_de = "nucleosup"}, [5] = {alias_de = "nucleosigm"}, ["impers"] = {}, -- pas para formas pasivas solamente ["impersonal"] = {alias_de = "impers"}, ["dep"] = {tipo="bool"}, ["depon"] = {alias_de="dep"}, ["deponente"] = {alias_de="dep"}, ["semidep"] = {tipo="bool"}, ["semidepon"] = {alias_de="semidep"}, ["semideponente"] = {alias_de="semidep"}, ["sigm"] = {tipo="bool"}, ["nopasivo"] = {tipo="bool"}, ["soloperf"] = {tipo="bool"}, ["I"] = {tipo="bool"}, ["p3inf"] = {tipo="bool"}, -- sin uso ["poet_sync_perf"] = {tipo="bool"}, -- sin uso ["always_sync_perf"] = {tipo="bool"}, -- solo en [[saevio]] ["conj"] = {requerido=true}, ["pres"] = {requerido=true}, ["nucleopres"] = {lista = true}, ["nucleoperf"] = {lista = true}, ["nucleosup"] = {lista = true}, ["nucleosigm"] = {lista = true}, ["núcleopres"] = {alias_de="nucleopres"}, ["núcleoperf"] = {alias_de="nucleoperf"}, ["núcleosup"] = {alias_de="nucleosup"}, ["paradigma"] = {lista = true}, ["desactivarnucleos"] = {tipo="bool", por_defecto=true}, -- para [[-o]] ["nota"] = {}, } local conjugado = {} for forma,_ in pairs(formas_no_personales) do params[forma] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma] = {} end for forma,_ in pairs(formas_personales) do for i,s in ipairs(tostr) do params[forma..s] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma..s] = {} if i == 1 then params[forma] = {alias_de=forma..s} end end end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) assert(not find(tit, " "), "locuciones no soportadas aún") assert(not (args["dep"] and args["semidep"]), "un verbo no puede ser deponente y semideponente a la vez") local conjinfo = { conj = args.conj, prefijo="", v=args.pres, desactivar = {}, dep=args.dep, semidep=args.semidep, sigm=args.sigm, impers=args.impers, nopasivo=args.nopasivo, soloperf=args.soloperf, I=args.I, p3inf=args.p3inf, poet_sync_perf=args.poet_sync_perf, -- sin uso always_sync_perf=args.always_sync_perf, nucleopres = deep_copy(args.nucleopres), nucleoperf = deep_copy(args.nucleoperf), nucleosup = deep_copy(args.nucleosup), nucleosigm = deep_copy(args.nucleosigm) } conjinfo = detect_v_type_and_subtypes(conjinfo) error(conjinfo.conj) if conjinfo.impers == true then conjinfo.impers = "3" end -- no puede ir conjinfo acá abajo porque si es un sufijo va a quedar "-" en la raíz, lo que anularía todas las formas conjugadas, tiene que venir directo de args if args.desactivarnucleos then if args.nucleopres[1] == "-" then conjinfo.nucleopres = {} end if args.nucleoperf[1] == "-" then conjinfo.nucleoperf = {} end if args.nucleosup[1] == "-" then conjinfo.nucleosup = {} end if args.nucleosigm[1] == "-" then conjinfo.nucleosigm = {} end end local es_irregular = conjinfo.irreg for _,d in ipairs(conjinfo.desactivar) do if formas_no_personales[d] then args[d] = {"no"} else args[d.."2"] = {"no"} end end for forma,_ in pairs(formas) do agregar_forma(conjugado, conjinfo, forma) end local resultante = sobreescribir_formas(conjugado, args) local mostrar_fut_sig = #resultante["ind_fut_sig1"] > 0 local mostrar_aor_sig = #resultante["subj_aor_sig1"] > 0 local defectivo = comprobar_defectivo(resultante, {"^imper", "_sig"}, tostr) local defect2 resultante, defect2 = desactivar_formas(resultante, function (form) return (conjinfo.nopasivo and form:find("_pas")) or (conjinfo.soloperf and not form:find("perf")) or (conjinfo.impers == "pas" and form:find("_pas[^3]")) or (conjinfo.impers == "pas3" and form:find("_pas[^3]")) or (conjinfo.impers == "pas36" and form:find("_pas[^36]")) end ) if defect2 then defectivo = true end -- por ahora innecesario -- local part_no_adj = {} -- for _,e in ipairs(resultante.part) do -- if (find(e, 'PART') or not find(e, 'ADJ')) and not find(e, "†") then -- insert(part_no_adj, gsub1(e, '%b{}', '')) -- end -- end local tit_pres = f(resultante["ind_pres1"][1] or "―") local tit_inf = f(resultante["inf_act"][1] or "―") local tit_perf = f(resultante["ind_perf1"][1] or "―") local tit_sup = f(resultante["sup"][1] or "―") resultante = agregar_enlaces(resultante, tit, normalizar_enlace) local es_impersonal = conjinfo.impers resultante = formatear_formas(resultante, function (x) return obtener_pronombre(x, es_impersonal) end) local impers = conjinfo.impers local cs, cs1, cs2, fila_pronombres_ind, fila_pronombres_subj, fila_pronombres_imper, mostrar_imper if impers == "3" then fila_pronombres_ind = {"", "(id)", color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", "(quod id)", color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", "(id)", color=COLOR_IMPER, header=true, class="pc"} cs = 2 elseif impers == "36" then error("no soportado actualmente") cs = 3 else fila_pronombres_ind = {"", PRONOMBRES[1], PRONOMBRES[2], PRONOMBRES[3], PRONOMBRES[4], PRONOMBRES[5], PRONOMBRES[6], color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", PRONOMBRES_SUBJ[1], PRONOMBRES_SUBJ[2], PRONOMBRES_SUBJ[3], PRONOMBRES_SUBJ[4], PRONOMBRES_SUBJ[5], PRONOMBRES_SUBJ[6], color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", PRONOMBRES_IMP[1], PRONOMBRES_IMP[2], PRONOMBRES_IMP[3], PRONOMBRES_IMP[4], PRONOMBRES_IMP[5], PRONOMBRES_IMP[6], color=COLOR_IMPER, header=true, class="pc"} cs = 7 mostrar_imper = true end cs1 = cs -- math.floor(cs / 2) -- cs2 = cs - cs1 local t = {} insert(t, {{"Formas no personales (verboides)", colspan=cs}, color=COLOR_H, header=true}) if impers == "3" then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else resultante.inf_act.colspan = cs1-1 resultante.inf_pas.colspan = cs1-1 resultante.part_act.colspan = cs1-1 resultante.part_pas.colspan = cs1-1 resultante.ger.colspan = cs1-1 resultante.sup.colspan = cs1-1 if conjinfo.dep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) elseif conjinfo.semidep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) end end local function ic(tiempo) if impers == "3" then return resultante[tiempo.."3"] elseif impers == "36" then return resultante[tiempo.."3"], resultante[tiempo.."6"] end return resultante[tiempo.."1"], resultante[tiempo.."2"], resultante[tiempo.."3"], resultante[tiempo.."4"], resultante[tiempo.."5"], resultante[tiempo.."6"] end insert(t, {{"Formas personales", colspan=cs}, color=COLOR_H, header=true}) insert(t, {{"Modo indicativo", colspan=cs}, color=COLOR_IND, header=true}) insert(t, fila_pronombres_ind) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end else insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) insert(t, {{"Pretérito perfecto", color=COLOR_IND, header=true}, ic("ind_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_IND, header=true}, ic("ind_pluperf")}) insert(t, {{"Futuro perfecto", color=COLOR_IND, header=true}, ic("ind_fut_perf")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) end insert(t, {{"Modo subjuntivo", colspan=cs}, color=COLOR_SUBJ, header=true}) insert(t, fila_pronombres_subj) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end else insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) insert(t, {{"Pretérito perfecto", color=COLOR_SUBJ, header=true}, ic("subj_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_SUBJ, header=true}, ic("subj_pluperf")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) end insert(t, {{"Modo imperativo", colspan=cs}, color=COLOR_IMPER, header=true}) insert(t, fila_pronombres_imper) if mostrar_imper then if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) else insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) insert(t, {{"Presente pasivo", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) end else insert(t, {{"Como verbo "..(impers == "3" and "impersonal" or "terciopersonal")..", ''"..tit.."'' CARECE de imperativo", color=COLOR_IMPER, header=true, colspan=cs}}) end insert(t, {{f("Leyenda: † arcaico, x no normativo, ~■~ cambio ortográfico, #■# irregularidad"), colspan=cs}}) args["nota"] = args["nota"] or "" if conjinfo.impers == "utc3" then args["nota"] = args["nota"].." NOTA: se usa también como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "umc3" then args["nota"] = args["nota"].." NOTA: se usa más como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "utc36" then args["nota"] = args["nota"].." NOTA: se usa también como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "umc36" then args["nota"] = args["nota"].." NOTA: se usa más como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "pas" or conjinfo.imeprs == "pas3" then args["nota"] = args["nota"].." NOTA: impersonal para las formas pasivas" end if conjinfo.impers == "pas36" then args["nota"] = args["nota"].." NOTA: formas pasivas terciopersonales (solamente tercera persona singular y plural)" end if conjinfo.soloperf then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas del perfecto y pluscuamperfecto con valor de presente, imperfecto o futuro" end if conjinfo.nopasivo then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas activas" end insert(t, {{args["nota"] and args["nota"] or "", colspan=cs}}) local cats = {} local subtits = {} local conj_str if conjinfo.conj == "1" then conj_str = "primera conjugación" elseif conjinfo.conj == "2" then conj_str = "segunda conjugación" elseif conjinfo.conj == "3" then conj_str = "tercera conjugación" elseif conjinfo.conj == "3/4" then conj_str = "tercera/cuarta conjugación" else conj_str = "cuarta conjugación" end insert(cats, "LA:Verbos de la "..conj_str) insert(subtits, conj_str) impers = impers or "" if impers == "3" or find(impers, "^u[tm]c3$") then insert(subtits, "impersonal") insert(cats, "LA:Verbos impersonales") end if defectivo then insert(subtits, "defectivo") insert(cats, "LA:Verbos defectivos") end if conjinfo.dep then insert(subtits, "deponente") insert(cats, "LA:Verbos deponentes") end if conjinfo.semidep then insert(subtits, "semideponente") insert(cats, "LA:Verbos semideponentes") end if es_irregular then insert(subtits, "irregular") insert(cats, "LA:Verbos irregulares") else insert(subtits, "regular") insert(cats, "LA:Verbos regulares") end return renderizar_tabla( frame, "'''Conjugación de ''"..tit_pres..", "..tit_inf..", "..tit_perf..", "..tit_sup.."'''''&emsp;&emsp;("..concat(subtits, ", ")..")", t, ns == 0 and cats or {}) end function export.adv(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { ["n"] = {}, ["nota"] = {alias_de = "n"}, ["comp"] = {lista = true}, ["comparativo"] = {alias_de = "comp"}, ["compnota"] = {lista = true}, ["sup"] = {lista = true}, ["superlativo"] = {alias_de = "sup"}, ["supnota"] = {lista = true}, } local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local head = args[1] local modo = args[2] local enc local cats = {} local cat_pref = "LA:Adverbios" if modo == "-" then enc = "sin comparativo ni superlativo" insert(cats, cat_pref.." incomparables") return renderizar_encabezado( frame, head, enc, args["n"], {}, ns == 0 and cats or {}, normalizar_enlace ) end local flex = {comp={},sup={}} local stem for _, suff in ipairs{"iter", "nter", "ter", "er", "iē", "ē", "rā", "im", "ō"} do stem = match(head, "^(.*)" .. suff .. "$") if stem ~= nil then local comp_suff, sup_suff = "ius", "issimē" if suff == "nter" then stem = stem .. "nt" end if suff == "rā" then comp_suff = "er" .. comp_suff sup_suff = "imē" end insert(flex.comp, stem .. comp_suff) insert(flex.sup, stem .. sup_suff) break end end if not stem and not args.comp[1] and not args.sup[1] then error("Unrecognized adverb type, recognized types are “-ē”, “-er”, “-ter”, “-iter”, “-im”, or “-ō”, “-ra” or specify irregular forms or “-” if incomparable.") end local formas, irr = sobreescribir_formas(flex, args) if args["comp"][1] == "no" then enc = "sin comparativo" insert(cats, cat_pref.." sin comparativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) elseif args["sup"][1] == "no" then enc = "sin superlativo" insert(cats, cat_pref.." sin superlativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end if irr then enc = f("#irregular#") insert(cats, cat_pref.." irregulares") end return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}, {"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end return export 9u3ava7sifz613yqoo67t4x67gcsemi 6123556 6123555 2026-07-25T05:18:28Z Tmagc 158167 6123556 Scribunto text/plain -- FLEXIÓN DEL LATÍN -- Adaptado desde en.wikt por Tmagc local export = {} local unpack = unpack or table.unpack local insert = table.insert local concat = table.concat local m_table = require("Módulo:tabla") local keys_to_list = m_table.keysToList local insert_if_not = m_table.insertIfNot local deep_copy = m_table.deepCopy local contains = m_table.contains local merge = m_table.merge local m_str = require("Módulo:string") local u = m_str.char local match = m_str.match local sub = m_str.sub local gsub = m_str.gsub local split = m_str.split local gsplit = m_str.gsplit local find = m_str.find local m_str_avanzado = require("Módulo:string/avanzado") local toNFD = m_str_avanzado.toNFD local toNFC = m_str_avanzado.toNFC local m_flex = require("Módulo:flex") local f = m_flex.f local f_links = m_flex.f_links local parsear_arreglo = m_flex.parsear_arreglo local separar_palabras = m_flex.separar_palabras local combinar_copulativa = m_flex.combinar_copulativa local sobreescribir_formas = m_flex.sobreescribir_formas local desactivar_formas = m_flex.desactivar_formas local agregar_enlaces = m_flex.agregar_enlaces local formatear_formas = m_flex.formatear_formas local comprobar_defectivo = m_flex.comprobar_defectivo local renderizar_tabla = m_flex.renderizar_tabla local renderizar_encabezado = m_flex.renderizar_encabezado local COLOR_H = m_flex.COLOR_H local COLOR_NP = m_flex.COLOR_NP local COLOR_IND = m_flex.COLOR_IND local COLOR_SUBJ = m_flex.COLOR_SUBJ local COLOR_IMPER = m_flex.COLOR_IMPER local MACRON = u(0x304) local BREVE = u(0x306) local DIAER = u(0x308) local DBREVE = u(0x361) local ACCENT = "[" .. MACRON .. BREVE .. DIAER .. DBREVE .. "]" local VOWEL = "[aæeioœuyAÆEIOŒUY]" local cons_to_vowel = { ["j"] = "i", ["J"] = "I", ["v"] = "u", ["V"] = "U", } local function normalizar_enlace(x) x = toNFD(x) x = gsub(x, ACCENT, "") return toNFC(x) end local function join(a, b) a, b = toNFD(a), toNFD(b) -- If the first part ends in "j" or "v", convert it to "i" or "u" unless -- the second part begins with a vowel. if not match(b, "^" .. VOWEL) then a = gsub(a, "[jvJV]$", cons_to_vowel) end return toNFC(a..b) end local function add_form(decl, slot, stem, suf) if type(slot) == "string" then slot = {slot} end for _,slt in ipairs(slot) do if type(decl[slt]) == "nil" or decl[slt] == "" then decl[slt] = {} elseif type(decl[slt]) == "string" then decl[slt] = {decl[slt]} end insert_if_not(decl[slt], join(stem, suf)) end end local function remove_forms(decl, forms) for form,_ in pairs(decl) do for _,rx in ipairs(forms) do if form:find(rx) then forms[form] = {} break end end end end local function merge_forms(forms, forms2, keys) keys = keys or forms2 for key,arr in pairs(keys) do if not forms[key] then forms[key] = {} end if type(forms2[key]) == "string" then insert_if_not(forms[key], forms2[key]) elseif type(forms2[key]) == "table" then for _,a in ipairs(forms2[key]) do insert_if_not(forms[key], a) end end end end local noun_decl = {} noun_decl["0"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = stem forms["dat_sg"] = stem forms["acc_sg"] = stem forms["abl_sg"] = stem forms["voc_sg"] = stem forms["nom_pl"] = stem forms["gen_pl"] = stem forms["dat_pl"] = stem forms["acc_pl"] = stem forms["abl_pl"] = stem forms["voc_pl"] = stem -- with locative if data.loc then forms["loc_sg"] = stem forms["loc_pl"] = stem end end local function alt_gen_pl_in_um(stem, forms, types, subtitles, i_stem) if types.genplum then add_form(forms, "gen_pl", stem, (i_stem and "i" or "") .. "um") elseif types.not_genplum then -- FIXME: not a contraction. -- insert_if_not(subtitles, "uncontracted genitive plural") end end noun_decl["1"] = function(data, args) local forms, types, loc, subtitles = data.forms, data.types, data.loc, data.subtitles local stem = args[1] -- normal 1st local nom_sg = "a" local gen_loc_sg = "ae" local dat_sg = "ae" local acc_sg = "am" local abl_sg = "ā" local voc_sg = "a" local nom_voc_pl = "ae" local gen_pl = "ārum" local dat_abl_loc_pl = "īs" local acc_pl = "ās" insert_if_not(data.title, "primera declinación") insert_if_not(data.categories, "LA:Sustantivos de la primera declinación") -- ām if types.am then nom_sg = "ām" acc_sg = "ām" abl_sg = {"ām", "ā"} voc_sg = "ām" -- all Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") --Greek Ma if types.Ma then nom_sg = "ās" acc_sg = "ān" voc_sg = "ā" -- Greek Me elseif types.Me then nom_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" -- Greek else nom_sg = "ē" gen_loc_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" end end -- ābus if types.abus then dat_abl_loc_pl = "ābus" end add_form(forms, "nom_sg", stem, nom_sg) add_form(forms, "gen_sg", stem, gen_loc_sg) add_form(forms, "dat_sg", stem, dat_sg) add_form(forms, "acc_sg", stem, acc_sg) add_form(forms, "abl_sg", stem, abl_sg) add_form(forms, "voc_sg", stem, voc_sg) add_form(forms, {"nom_pl", "voc_pl"}, stem, nom_voc_pl) add_form(forms, "gen_pl", stem, gen_pl) add_form(forms, {"dat_pl", "abl_pl"}, stem, dat_abl_loc_pl) add_form(forms, "acc_pl", stem, acc_pl) -- with locative if loc then add_form(forms, "loc_sg", stem, gen_loc_sg) add_form(forms, "loc_pl", stem, dat_abl_loc_pl) end end noun_decl["2"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "segunda declinación") insert_if_not(data.categories, "LA:Sustantivos de la segunda declinación") -- normal 2nd forms["nom_sg"] = stem1 .. "us" forms["gen_sg"] = stem1 .. "ī" forms["dat_sg"] = stem1 .. "ō" forms["acc_sg"] = stem1 .. "um" forms["abl_sg"] = stem1 .. "ō" forms["voc_sg"] = stem1 .. "e" forms["nom_pl"] = stem1 .. "ī" forms["gen_pl"] = stem1 .. "ōrum" forms["dat_pl"] = stem1 .. "īs" forms["acc_pl"] = stem1 .. "ōs" forms["abl_pl"] = stem1 .. "īs" forms["voc_pl"] = stem1 .. "ī" -- all neuter if types.N then forms["nom_sg"] = stem1 .. "um" forms["voc_sg"] = stem1 .. "um" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- neuter ium if types.ium then forms["nom_sg"] = stem1 .. "ium" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" forms["voc_sg"] = stem1 .. "ium" forms["nom_pl"] = stem1 .. "ia" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "ia" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "ia" -- neuter us, plural a elseif types.a then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- -vom (aevom, etc.) elseif types.vom then forms["nom_sg"] = stem1 .. "om" forms["acc_sg"] = stem1 .. "om" forms["voc_sg"] = stem1 .. "om" -- neuter Greek in -os (cētos) elseif types.Greek and types.us then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "os" forms["voc_sg"] = stem1 .. "os" forms["nom_pl"] = stem1 .. "ē" forms["gen_pl"] = stem1 .. "ōn" forms["acc_pl"] = stem1 .. "ē" forms["voc_pl"] = stem1 .. "ē" -- neuter Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "on" forms["acc_sg"] = stem1 .. "on" forms["voc_sg"] = stem1 .. "on" -- neuter us elseif types.us then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "ī" forms["acc_pl"] = stem1 .. "ōs" forms["voc_pl"] = stem1 .. "ī" end -- er elseif types.er then forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "ī" forms["dat_sg"] = stem2 .. "ō" forms["acc_sg"] = stem2 .. "um" forms["abl_sg"] = stem2 .. "ō" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ī" forms["gen_pl"] = stem2 .. "ōrum" forms["dat_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "ōs" forms["abl_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "ī" -- ius elseif types.ius then forms["nom_sg"] = stem1 .. "ius" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" if types.voci then -- Only for proper names and fīlius, genius forms["voc_sg"] = stem1 .. "ī" else forms["voc_sg"] = stem1 .. "ie" end forms["nom_pl"] = stem1 .. "iī" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "iōs" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "iī" -- -vos (servos, etc.) elseif types.vos then forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "om" -- Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "on" if data.num == "pl" then forms["nom_pl"] = stem1 .. "oe" forms["voc_pl"] = stem1 .. "oe" else forms["nom_pl"] = {stem1 .. "ī", stem1 .. "oe"} forms["voc_pl"] = {stem1 .. "ī", stem1 .. "oe"} end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- with -um genitive plural alt_gen_pl_in_um(stem2, forms, types, subtitles, types.ius or types.ium) -- with locative if data.loc then if types.ius or types.ium then forms["loc_sg"] = stem2 .. "iī" forms["loc_pl"] = stem2 .. "iīs" else forms["loc_sg"] = stem2 .. "ī" forms["loc_pl"] = stem2 .. "īs" end end end local acc_sg_i_stem_subtypes = { acc_im = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [abl -ī]; -- cannabis, senapis, sinapis [abl -e, -ī] acc_sg = {"im"}, title = {"accusative singular in ''-im''"}, }, acc_im_in = { -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [abl -ī]; -- Baetis, Tigris [acc -e, -ī] acc_sg = {"im", "in"}, title = {"accusative singular in ''-im'' or ''-in''"}, }, acc_im_in_em = { -- e.g. tigris, river Līris acc_sg = {"im", "in", "em"}, title = {"accusative singular in ''-im'', ''-in'' or ''-em''"}, }, acc_im_em = { acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or ''-em''"}, }, acc_im_occ_em = { -- febris, pelvis, puppis, restis, securis, turris [abl -ī, -e] acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or occasionally ''-em''"}, }, acc_em_im = { -- aqualis, clavis, lens, navis [abl -e, -ī]; -- cutis, restis [abl -e] acc_sg = {"em", "im"}, title = {"accusative singular in ''-em'' or ''-im''"}, }, } local abl_sg_i_stem_subtypes = { abl_i = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [acc -im]; -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [acc -im or -in]; -- canalis "water pipe", months in -is or -er, nouns originally i-stem adjectives such as aedilis, affinis, bipennis, familiaris, sodalis, volucris, etc. [acc -em] abl_sg = {"ī"}, title = {"ablative singular in ''-ī''"}, }, abl_i_e = { -- febris, pelvis, puppis, restis, securis, turris [acc -im, -em] abl_sg = {"ī", "e"}, title = {"ablative singular in ''-ī'' or ''-e''"}, }, abl_e_i = { -- cannabis, senapis, sinapis [acc -im]; -- Baetis, Tigris [acc -im, -in]; -- aqualis, clavis, lens, navis [acc -em, -im]; -- finis, mugilis, occiput, pugil, rus, supellex, vectis [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or ''-ī''"}, }, abl_e_occ_i = { -- amnis, anguis, avis, civis, classis, fustis, ignis, imber, orbis, pars, postis, sors, unguis, vesper [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or occasionally ''-ī''"}, }, } local function extract_stem(form, ending) local base = match(form, "^(.*)" .. ending .. "$") if not base then error("Form " .. form .. " should end in -" .. ending) end return base end local function count_vowels(stem) return select(2, toNFD(stem):gsub("[aeiouyAEIOUY]", "")) end noun_decl["3"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] -- local function non_i_stem_type() -- return (count_vowels(stem1) > count_vowels(stem2) and "parisyllabic" or "imparisyllabic") .. " non-i-stem" -- end insert_if_not(data.title, "tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") --normal 3rd forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "is" forms["dat_sg"] = stem2 .. "ī" forms["acc_sg"] = stem2 .. "em" forms["abl_sg"] = stem2 .. "e" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ēs" forms["gen_pl"] = stem2 .. "um" forms["dat_pl"] = stem2 .. "ibus" forms["acc_pl"] = stem2 .. "ēs" forms["abl_pl"] = stem2 .. "ibus" forms["voc_pl"] = stem2 .. "ēs" local acc_sg_i_stem_subtype = false local not_acc_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if acc_sg_i_stem_subtypes[subtype] then acc_sg_i_stem_subtype = true break end end for acc_sg_subtype, _ in pairs(acc_sg_i_stem_subtypes) do if types["not_" .. acc_sg_subtype] then not_acc_sg_i_stem_subtype = true break end end local abl_sg_i_stem_subtype = false local not_abl_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if abl_sg_i_stem_subtypes[subtype] then abl_sg_i_stem_subtype = true break end end for abl_sg_subtype, _ in pairs(abl_sg_i_stem_subtypes) do if types["not_" .. abl_sg_subtype] then not_abl_sg_i_stem_subtype = true break end end -- all Greek if types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") -- Greek er if types.er then stem1 = extract_stem(stem1, "ēr") forms["nom_sg"] = stem1 .. "ēr" forms["gen_sg"] = stem1 .. "eris" forms["dat_sg"] = stem1 .. "erī" forms["acc_sg"] = {stem1 .. "era", stem1 .. "erem"} forms["abl_sg"] = stem1 .. "ere" forms["voc_sg"] = stem1 .. "ēr" forms["nom_pl"] = stem1 .. "erēs" forms["gen_pl"] = stem1 .. "erum" forms["dat_pl"] = stem1 .. "eribus" forms["acc_pl"] = stem1 .. "erēs" forms["abl_pl"] = stem1 .. "eribus" forms["voc_pl"] = stem1 .. "erēs" -- Greek on elseif types.on then stem1 = extract_stem(stem1, "ōn") forms["nom_sg"] = stem1 .. "ōn" forms["gen_sg"] = {stem1 .. "ontis", stem1 .. "ontos"} forms["dat_sg"] = stem1 .. "ontī" forms["acc_sg"] = stem1 .. "onta" forms["abl_sg"] = stem1 .. "onte" forms["voc_sg"] = stem1 .. "ōn" forms["nom_pl"] = stem1 .. "ontēs" forms["gen_pl"] = {stem1 .. "ontum", stem1 .. "ontium"} forms["dat_pl"] = stem1 .. "ontibus" forms["acc_pl"] = {stem1 .. "ontēs", stem1 .. "ontās"} forms["abl_pl"] = stem1 .. "ontibus" forms["voc_pl"] = stem1 .. "ontēs" -- Greek i-stem elseif types.I then forms["gen_sg"] = {stem2 .. "is", stem2 .. "eōs", stem2 .. "ios"} forms["acc_sg"] = {stem2 .. "im", stem2 .. "in", stem2 .. "em{MED}"} forms["abl_sg"] = {stem2 .. "ī", stem2 .. "e{MED}"} forms["voc_sg"] = {stem2 .. "is", stem2 .. "i"} forms["nom_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["gen_pl"] = {stem2 .. "ium", stem2 .. "eōn"} forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["voc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} if types.poetic_esi then forms["dat_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} forms["abl_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} end -- normal Greek else forms["gen_sg"] = stem2 .. "os" if match(toNFD(stem2), "[yY]" .. ACCENT .. "*$") then forms["acc_sg"] = stem2 .. "n" else forms["acc_sg"] = stem2 .. "a" end forms["nom_pl"] = stem2 .. "es" forms["acc_pl"] = stem2 .. "as" forms["voc_pl"] = stem2 .. "es" if match(toNFD(stem1), "[iyIY]" .. ACCENT .. "*s$") then -- Per Hiley, words in -is and -ys have a poetic vocative -- without the -s, but otherwise the vocative is the same -- as the nominative. forms["voc_sg"] = {stem1, (stem1:gsub("s$", "")).."{L}"} end end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- polis if types.polis then stem1 = extract_stem(stem1, "polis") insert_if_not(data.title, "parcialmente griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "polis" forms["gen_sg"] = stem1 .. "polis" forms["dat_sg"] = stem1 .. "polī" forms["acc_sg"] = {stem1 .. "polim", stem1 .. "polin"} forms["abl_sg"] = stem1 .. "polī" forms["voc_sg"] = {stem1 .. "polis", stem1 .. "polī"} end -- all neuter if types.N then forms["acc_sg"] = stem1 -- neuter I stem if types.I then -- pure variety if types.pure then forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "ia" forms["gen_pl"] = stem2 .. "ium" forms["acc_pl"] = stem2 .. "ia" forms["voc_pl"] = stem2 .. "ia" -- non-pure variety (rare) else forms["nom_pl"] = stem2 .. "a" forms["gen_pl"] = {stem2 .. "ium", stem2 .. "um"} forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- normal neuter else forms["nom_pl"] = stem2 .. "a" forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- I stem elseif types.I or acc_sg_i_stem_subtype or abl_sg_i_stem_subtype then forms["gen_pl"] = stem2 .. "ium" -- Per Allen and Greenough, Hiley and others, the acc_pl in -īs -- applied originally to all i-stem nouns, and was current as an -- alternative form up through Caesar. forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "īs"} -- pure variety if types.pure then forms["acc_sg"] = stem2 .. "im" forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "īs" end local num = data.num for subtype, _ in pairs(types) do local acc_sg_i_stem_props = acc_sg_i_stem_subtypes[subtype] if acc_sg_i_stem_props then forms["acc_sg"] = {} for _, ending in ipairs(acc_sg_i_stem_props.acc_sg) do insert_if_not(forms["acc_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(acc_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end -- FIXME: needs to be done for neuter nouns as well. for subtype, _ in pairs(types) do local abl_sg_i_stem_props = abl_sg_i_stem_subtypes[subtype] if abl_sg_i_stem_props then forms["abl_sg"] = {} for _, ending in ipairs(abl_sg_i_stem_props.abl_sg) do insert_if_not(forms["abl_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(abl_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end end -- with locative if data.loc then -- As far as I can tell, in general both dative singular and -- ablative singular could be used for the third-declension locative, -- with different time periods preferring different forms. -- http://dcc.dickinson.edu/grammar/latin/3rd-declension-locative-case -- mentions rūrī along with either Carthāginī or Carthāgine. -- Wikipedia in https://en.wikipedia.org/wiki/Locative_case#Latin -- says this: -- -- In archaic times, the locative singular of third declension nouns -- was still interchangeable between ablative and dative forms, but in -- the Augustan Period the use of the ablative form became fixed. -- Therefore, both forms "rūrī" and "rūre" may be encountered. -- -- Lewis and Short confirm this. local loc_sg = forms["dat_sg"] if type(loc_sg) == "table" then loc_sg = deep_copy(loc_sg) else loc_sg = {loc_sg} end local abl_sg = forms["abl_sg"] if type(abl_sg) == "table" then for _, form in ipairs(abl_sg) do insert_if_not(loc_sg, deep_copy(form)) end else insert_if_not(loc_sg, abl_sg) end forms["loc_sg"] = loc_sg forms["loc_pl"] = deep_copy(forms["abl_pl"]) --The following is what we used to have, but I simply cannot believe it. --if types.Greek and not types.s then -- forms["loc_pl"] = stem2 .. "ēs" --end end end noun_decl["4"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "cuarta declinación") insert_if_not(data.categories, "LA:Sustantivos de la cuarta declinación") -- normal 4th forms["nom_sg"] = stem .. "us" forms["gen_sg"] = stem .. "ūs" forms["dat_sg"] = stem .. "uī" forms["acc_sg"] = stem .. "um" forms["abl_sg"] = stem .. "ū" forms["voc_sg"] = stem .. "us" forms["nom_pl"] = stem .. "ūs" forms["gen_pl"] = stem .. "uum" forms["dat_pl"] = stem .. "ibus" forms["acc_pl"] = stem .. "ūs" forms["abl_pl"] = stem .. "ibus" forms["voc_pl"] = stem .. "ūs" if types.echo then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end add_form(forms, "acc_sg", stem, "ōn") elseif types.Callisto then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end end -- neuter if types.N then forms["nom_sg"] = stem .. "ū̆{?}" forms["gen_sg"] = {stem .. "ūs{C}", stem .. "ū{S}"} forms["dat_sg"] = {stem .. "uī{C}", stem .. "ū{S}"} forms["acc_sg"] = stem .. "ū̆{?}" forms["voc_sg"] = stem .. "ū̆{?}" forms["nom_pl"] = stem .. "ua" forms["acc_pl"] = stem .. "ua" forms["voc_pl"] = stem .. "ua" end -- ubus if types.ubus then forms["dat_pl"] = stem .. "ubus" forms["abl_pl"] = stem .. "ubus" end -- with locative if data.loc then forms["loc_sg"] = forms["abl_sg"] forms["loc_pl"] = forms["abl_pl"] end end noun_decl["5"] = function(data, args) local forms, types = data.forms, data.types local stem = args[1] insert_if_not(data.title, "quinta declinación") insert_if_not(data.categories, "LA:Sustantivos de la quinta declinación") -- ies if types.i then stem = stem .. "i" end forms["nom_sg"] = stem .. "ēs" forms["gen_sg"] = stem .. "eī" forms["dat_sg"] = stem .. "eī" forms["acc_sg"] = stem .. "em" forms["abl_sg"] = stem .. "ē" forms["voc_sg"] = stem .. "ēs" forms["nom_pl"] = stem .. "ēs" forms["gen_pl"] = stem .. "ērum" forms["dat_pl"] = stem .. "ēbus" forms["acc_pl"] = stem .. "ēs" forms["abl_pl"] = stem .. "ēbus" forms["voc_pl"] = stem .. "ēs" -- ies if types.i then forms["gen_sg"] = stem .. "ēī" forms["dat_sg"] = stem .. "ēī" end --with locative if data.loc then forms["loc_sg"] = stem .. "ē" forms["loc_pl"] = stem .. "ēbus" end end noun_decl["sgpl"] = function(data, args) local forms = data.forms local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem1 forms["gen_sg"] = stem1 forms["dat_sg"] = stem1 forms["acc_sg"] = stem1 forms["abl_sg"] = stem1 forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 forms["gen_pl"] = stem2 forms["dat_pl"] = stem2 forms["acc_pl"] = stem2 forms["abl_pl"] = stem2 forms["voc_pl"] = stem2 -- with locative if data.loc then forms["loc_sg"] = stem1 forms["loc_pl"] = stem2 end end noun_decl["indecl"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = stem forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} -- with locative (for multiword terms) if data.loc then forms["loc_sg"] = {} forms["loc_pl"] = {} end data.num = "sg" end noun_decl["irreg"] = function(data, args) local forms, subtitles, notes = data.forms, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "irregular") insert_if_not(data.categories, "LA:Sustantivos irregulares") forms["nom_sg"] = {} forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = {} forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} if stem == "bōs" then data.decl = "3" local stem1, stem2 = "bōs", "bov" noun_decl["3"](data, {stem1, stem2}) add_form(forms, "abl_sg", stem2, "īd{†}") add_form(forms, "gen_pl", "bo", "um") add_form(forms, "gen_pl", stem2, "erum") add_form(forms, "dat_pl", "", "bōbus") add_form(forms, "dat_pl", "", "būbus") add_form(forms, "abl_pl", "", "bōbus") add_form(forms, "abl_pl", "", "būbus") elseif stem:match("^[dD]eus$") then data.decl = "2" local dD = stem:sub(1, 1) forms["nom_sg"] = dD .. "eus" forms["gen_sg"] = dD .. "eī" forms["dat_sg"] = dD .. "eō" forms["acc_sg"] = dD .. "eum" forms["abl_sg"] = dD .. "eō" forms["voc_sg"] = {dD .. "eus", dD .. "ee"} if stem == "deus" then forms["nom_pl"] = {"dī", "diī", "deī"} forms["gen_pl"] = {"deōrum", "deum"} forms["dat_pl"] = {"dīs", "diīs", "deīs"} forms["acc_pl"] = "deōs" forms["abl_pl"] = {"dīs", "diīs", "deīs"} forms["voc_pl"] = {"dī", "diī", "deī"} end elseif stem == "domus" then data.decl = "4,2" insert_if_not(data.title, "cuarta/segunda declinación") forms["nom_sg"] = "domus" forms["gen_sg"] = {"domūs", "domī"} forms["dat_sg"] = {"domuī", "domō", "domū"} forms["acc_sg"] = "domum" forms["abl_sg"] = {"domū", "domō"} forms["voc_sg"] = "domus" forms["loc_sg"] = "domī" forms["nom_pl"] = "domūs" forms["gen_pl"] = {"domuum", "domōrum"} forms["dat_pl"] = "domibus" forms["acc_pl"] = {"domūs", "domōs"} forms["abl_pl"] = "domibus" forms["voc_pl"] = "domūs" forms["loc_pl"] = {} data.loc = true elseif match(stem, "^[IÏJ]ēs[uū]" .. BREVE .. "?s$") then local ij = sub(stem, 1, 1) local uu = match(stem, "[uū]" .. BREVE .. "?") forms["nom_sg"] = stem forms["gen_sg"] = ij .. "ēsū" forms["dat_sg"] = ij .. "ēsū" forms["acc_sg"] = ij .. "ēs" .. uu .. "m" forms["abl_sg"] = ij .. "ēsū" forms["voc_sg"] = ij .. "ēsū" data.num = "sg" elseif stem == "Mōsēs" or stem == "Moesēs" or match(stem, "^M[oō]" .. BREVE .. "?[īȳ]sēs$") then local mos = sub(stem, 1, -3) forms["nom_sg"] = stem forms["gen_sg"] = {mos .. "ī", mos .. "ēī", mos .. "is", mos .. "ēn", mos .. "eōs"} forms["dat_sg"] = mos .. "ī" forms["acc_sg"] = {mos .. "ēn", mos .. "em"} forms["abl_sg"] = {mos .. "e", mos .. "ēn", mos .. "ī"} forms["voc_sg"] = {mos .. "ēs", mos .. "ē"} data.num = "sg" elseif stem:match("^[ij]ūgerum$") then data.decl = "2,3" local ij = stem:sub(1, 1) insert_if_not(data.title, "segunda/tercera declinación híbrido") forms["nom_sg"] = ij .. "ūgerum" forms["gen_sg"] = ij .. "ūgerī" forms["dat_sg"] = ij .. "ūgerō" forms["acc_sg"] = ij .. "ūgerum" forms["abl_sg"] = ij .. "ūgerō" forms["voc_sg"] = ij .. "ūgerum" forms["nom_pl"] = ij .. "ūgera" forms["gen_pl"] = ij .. "ūgerum" forms["dat_pl"] = ij .. "ūgeribus" forms["acc_pl"] = ij .. "ūgera" forms["abl_pl"] = {ij .. "ūgeribus", ij .. "ūgerīs{†}"} forms["voc_pl"] = ij .. "ūgera" elseif stem == "sūs" then data.decl = "3" forms["nom_sg"] = "sūs" forms["gen_sg"] = "suis" forms["dat_sg"] = "suī" forms["acc_sg"] = "suem" forms["abl_sg"] = "sue" forms["voc_sg"] = "sūs" forms["nom_pl"] = "suēs" forms["gen_pl"] = "suum" forms["dat_pl"] = {"suibus", "sūbus", "subus"} forms["acc_pl"] = "suēs" forms["abl_pl"] = {"suibus", "sūbus", "subus"} forms["voc_pl"] = "suēs" elseif stem == "ēthos" then data.decl = "3" insert_if_not(data.title, "tercera declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "ēthos" forms["gen_sg"] = "ētheos" forms["acc_sg"] = "ēthos" forms["voc_sg"] = "ēthos" forms["nom_pl"] = {"ēthea", "ēthē"} forms["dat_pl"] = {"ēthesi", "ēthesin"} forms["acc_pl"] = {"ēthea", "ēthē"} forms["abl_pl"] = {"ēthesi", "ēthesin"} forms["voc_pl"] = {"ēthea", "ēthē"} elseif stem == "Athōs" then data.decl = "2" insert_if_not(data.title, "segunda declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "Athōs" forms["gen_sg"] = "Athō" forms["dat_sg"] = "Athō" forms["acc_sg"] = {"Athō", "Athōn"} forms["abl_sg"] = "Athō" forms["voc_sg"] = "Athōs" data.num = "sg" elseif stem:match("^[uv]ēnum$") then data.decl = "4,2" local uv = stem:sub(1, 1) insert_if_not(data.title, "cuarta/segunda declinación, defectivo") forms["dat_sg"] = {uv .. "ēnuī", uv .. "ēnō"} forms["acc_sg"] = uv .. "ēnum" data.num = "sg" elseif stem:match("^[uv]īs$") then data.decl = "3" local uv = stem:sub(1, 1) insert_if_not(data.title, "defectivo") forms["nom_sg"] = uv .. "īs" forms["gen_sg"] = uv .. "īs" forms["dat_sg"] = uv .. "ī" forms["acc_sg"] = uv .. "im" forms["abl_sg"] = uv .. "ī" forms["voc_sg"] = uv .. "īs" forms["nom_pl"] = uv .. "īrēs" forms["gen_pl"] = uv .. "īrium" forms["dat_pl"] = uv .. "īribus" forms["acc_pl"] = {uv .. "īrēs", uv .. "īrīs"} forms["abl_pl"] = uv .. "īribus" forms["voc_pl"] = uv .. "īrēs" else error("Stem " .. stem .. " not recognized.") end end local adj_decl = {} adj_decl["0+"] = function(data, args) local forms, categories = data.forms, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = stem forms["gen_sg_m"] = stem forms["gen_pl_m"] = stem forms["dat_sg_m"] = stem forms["dat_pl_m"] = stem forms["acc_sg_m"] = stem forms["acc_pl_m"] = stem forms["abl_sg_m"] = stem forms["abl_pl_m"] = stem forms["voc_sg_m"] = stem forms["voc_pl_m"] = stem forms["loc_sg_m"] = stem forms["loc_pl_m"] = stem end adj_decl["1&2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera y segunda declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local original if types.er then local final2 = stem:sub(-2) if final2 == "er" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") elseif final2 == "ur" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") else error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem) end stem, original = args[2], stem end local us = "us" local a_sf = "a" local um = "um" local ae_gsf = "ae" local am = "am" local a_macron = "ā" local i_pl = stem .. "ī" if types.greekA or types.greekE then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") if types.greekA then us = "os" um = "on" am = "ān" else us = "os" a_sf = "ē" um = "on" ae_gsf = "ēs" am = "ēn" a_macron = "ē" end i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = original or (stem .. us) forms["nom_sg_f"] = stem .. a_sf forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_f"] = stem .. ae_gsf forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_f"] = stem .. "ae" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_f"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_f"] = stem .. am forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_f"] = stem .. a_macron forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_f"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = original or (stem .. "e") forms["voc_sg_f"] = stem .. a_sf forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" if types.ius then insert_if_not(data.title, "pronominal") --insert_if_not(subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''") forms["gen_sg_m"] = stem .. "ī̆us" forms["gen_sg_f"] = stem .. "ī̆us" forms["gen_sg_n"] = stem .. "ī̆us" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_f"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" elseif types.not_ius then insert_if_not(data.title, "no pronominal") --insert_if_not(subtitles, "with normal genitive and dative singular") end if stem == "me" then forms["voc_sg_m"] = "mī" end if types.ic then --insert_if_not(subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''") local oc = "oc" local oc_macron = "ōc" if stem == "ill" then oc = "uc" oc_macron = "ūc" end forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = stem .. oc forms["nom_pl_n"] = stem .. "aec" forms["gen_sg_m"] = stem .. "uius" forms["gen_sg_f"] = stem .. "uius" forms["gen_sg_n"] = stem .. "uius" forms["dat_sg_m"] = stem .. "uic" forms["dat_sg_f"] = stem .. "uic" forms["dat_sg_n"] = stem .. "uic" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = stem .. oc forms["acc_pl_n"] = stem .. "aec" forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. oc_macron forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} end if types.distr then if stem:sub(-1) == "n" then forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum{R}"} forms["gen_pl_f"] = {stem .. "um", stem .. "ārum{R}"} forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum{R}"} else error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem) end end forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["1-1+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") forms["nom_sg_m"] = stem .. "a" forms["nom_pl_m"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ae" forms["gen_pl_m"] = stem .. "ārum" forms["dat_sg_m"] = stem .. "ae" forms["dat_pl_m"] = stem .. "īs" forms["acc_sg_m"] = stem .. "am" forms["acc_sg_n"] = stem .. "a" forms["acc_pl_m"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ā" forms["abl_pl_m"] = stem .. "īs" forms["voc_sg_m"] = stem .. "a" forms["voc_pl_m"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["2-2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "segunda declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local us = "us" local um = "um" local i_pl = stem .. "ī" if types.greek then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") us = "os" um = "on" i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = stem .. us forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = stem .. "e" forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end local function abl_i_e(...) local function update_slot(forms, slot, f, do_copy) if not forms[slot] then return do_copy elseif do_copy then f = deep_copy(f) end forms[slot] = f return true end function abl_i_e(stem, forms, types) local f, do_copy if types["abl_e_i"] then f = {stem .. "e", stem .. "ī"} elseif types["abl_i_e"] then f = {stem .. "ī", stem .. "e"} else return end do_copy = update_slot(forms, "abl_sg_m", f, do_copy) do_copy = update_slot(forms, "abl_sg_f", f, do_copy) -- Neuter doesn't take -e with i-stems. if not types.I then update_slot(forms, "abl_sg_n", f, do_copy) end end return abl_i_e(...) end adj_decl["3-1+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) if types.par then forms["nom_pl_n"] = stem2 .. "a" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["abl_sg_m"] = stem2 .. "e" forms["abl_sg_n"] = stem2 .. "e" forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"} -- Really? forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"} -- Why does this happen? forms["acc_pl_n"] = stem2 .. "a" forms["voc_pl_n"] = stem2 .. "a" end local es_base = stem1:match("^(.-)ēs$") if es_base and es_base == stem2 then if types.greek then forms["nom_sg_n"] = {stem2 .. "ē̆s{?}"} forms["acc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_m"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["nom_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["acc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["voc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["abl_sg_m"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["abl_sg_n"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["gen_pl_m"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} forms["gen_pl_n"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Adjetivos griegos") elseif types.not_greek then insert_if_not(data.title, "no griego") end end end adj_decl["3-def+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, defectivo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = stem2 .. "ēs" forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" if types.tor then insert_if_not(data.title, "tercera declinación, solo en masculino") insert_if_not(categories, "LA:Adjetivos solo en masculino") remove_forms(forms, {"_f$", "_n$"}) forms["nom_sg_m"] = stem1 forms["gen_sg_m"] = stem2 .. "is" forms["dat_sg_m"] = stem2 .. "ī" forms["acc_sg_m"] = stem2 .. "em" forms["abl_sg_m"] = stem2 .. "e" forms["voc_sg_m"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["gen_pl_m"] = stem2 .. "um" forms["dat_pl_m"] = stem2 .. "ibus" forms["acc_pl_m"] = stem2 .. "ēs" forms["abl_pl_m"] = stem2 .. "ibus" forms["voc_pl_m"] = stem2 .. "ēs" end if types.trix then insert_if_not(data.title, "tercera declinación, solo en femenino o en neutro plural") insert_if_not(categories, "LA:Adjetivos solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en neutro") remove_forms(forms, {"_m$", "sg_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.trixf then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.idis then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = {stem2 .. "is", stem2 .. "os"} forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = {stem2 .. "em", stem2 .. "a"} forms["abl_sg_f"] = stem2 .. "e" forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} forms["gen_pl_f"] = stem2 .. "um" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = {stem2 .. "ēs", stem2 .. "as"} forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} end forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-C+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1 = args[1] local stem2 = stem1 .. "ōr" insert_if_not(data.title, "tercera declinación, comparativo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos comparativos") forms["nom_sg_m"] = stem1 .. "or" forms["nom_sg_n"] = stem1 .. "us" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "a" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 .. "us" forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} forms["acc_pl_n"] = stem2 .. "a" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 .. "or" forms["voc_sg_n"] = stem1 .. "us" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "a" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-P+"] = function(data, args) local forms, notes = data.forms, data.notes local stem2 = args[2] adj_decl["3-1+"](data, args) insert_if_not(data.title, "tercera declinación, participio") insert_if_not(data.categories, "LA:Adjetivos de la tercera declinación") forms["abl_sg_m"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["abl_sg_n"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} end adj_decl["3-2+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem = args[1] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem .. "is" forms["nom_sg_n"] = stem .. "e" forms["nom_pl_m"] = stem .. "ēs" forms["nom_pl_n"] = stem .. "ia" forms["gen_sg_m"] = stem .. "is" forms["gen_sg_n"] = stem .. "is" forms["gen_pl_m"] = stem .. "ium" forms["gen_pl_n"] = stem .. "ium" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" forms["dat_pl_m"] = stem .. "ibus" forms["dat_pl_n"] = stem .. "ibus" forms["acc_sg_m"] = stem .. "em" forms["acc_sg_n"] = stem .. "e" forms["acc_pl_m"] = {stem .. "īs", stem .. "ēs"} forms["acc_pl_n"] = stem .. "ia" forms["abl_sg_m"] = stem .. "ī" forms["abl_sg_n"] = stem .. "ī" forms["abl_pl_m"] = stem .. "ibus" forms["abl_pl_n"] = stem .. "ibus" -- abl_i_e(stem, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem .. "is" forms["voc_sg_n"] = stem .. "e" forms["voc_pl_m"] = stem .. "ēs" forms["voc_pl_n"] = stem .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-3+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con tres terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_f"] = stem2 .. "is" forms["nom_sg_n"] = stem2 .. "e" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_f"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_f"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_f"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_f"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_f"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_f"] = stem2 .. "em" forms["acc_sg_n"] = stem2 .. "e" forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_f"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_f"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_f"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" -- abl_i_e(stem2, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem1 forms["voc_sg_f"] = stem2 .. "is" forms["voc_sg_n"] = stem2 .. "e" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_f"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["indecl+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = {} forms["gen_sg_m"] = {} forms["gen_pl_m"] = {} forms["dat_sg_m"] = {} forms["dat_pl_m"] = {} forms["acc_sg_m"] = stem forms["acc_pl_m"] = {} forms["abl_sg_m"] = {} forms["abl_pl_m"] = {} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["irreg+"] = function(data,args) local forms, types, pos, notes, categories = data.forms, data.types, data.pos, data.notes, data.categories local arg1 = args[1] insert_if_not(data.title, "irregular") insert_if_not(categories, "LA:Adjetivos irregulares") if arg1 == "duo" or arg1 == "ambō" then local stem = sub(arg1, 1, -2) -- data.title = stem == "amb" and "irregular adjective" or "numeral" data.num = "pl" local stem_with_o = stem .. (stem == "amb" and "ō" or "o") forms["nom_pl_m"] = stem_with_o forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem_with_o forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_pl_m"] = stem .. "ōbus" forms["dat_pl_f"] = stem .. "ābus" forms["dat_pl_n"] = stem .. "ōbus" forms["acc_pl_m"] = {stem .. "ōs", stem_with_o} forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem_with_o forms["abl_pl_m"] = stem .. "ōbus" forms["abl_pl_f"] = stem .. "ābus" forms["abl_pl_n"] = stem .. "ōbus" forms["voc_pl_m"] = stem_with_o forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem_with_o if stem == "du" then forms["gen_pl_m"] = {forms["gen_pl_m"], "duum", "duom{†}"} forms["gen_pl_n"] = {forms["gen_pl_n"], "duum", "duom{†}"} end elseif arg1:sub(-6) == "mīlle" then insert_if_not(data.title, "numeral semiindeclinable") local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "le" forms["nom_pl_m"] = {stem .. "ia", stem .. "lia"} forms["gen_sg_m"] = stem .. "le" forms["gen_pl_m"] = {stem .. "ium", stem .. "lium"} forms["dat_sg_m"] = stem .. "le" forms["dat_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["acc_sg_m"] = stem .. "le" forms["acc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["abl_sg_m"] = stem .. "le" forms["abl_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["voc_sg_m"] = stem .. "le" forms["voc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) elseif arg1 == "ille" or arg1 == "iste" or arg1 == "ipse" or arg1 == "olle" then local stem = arg1:sub(1, -2) types.ius = true adj_decl["1&2+"](data, {stem}) insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) forms["nom_sg_m"] = arg1 if arg1 == "ipse" then add_form(forms, "nom_sg_n", stem, "ud{MED}") add_form(forms, "acc_sg_n", stem, "ud{MED}") else forms["nom_sg_n"] = stem .. "ud" forms["acc_sg_n"] = stem .. "ud" end forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} elseif arg1 == "illic" or arg1 == "istic" or arg1 == "isthic" then insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["gen_sg_m"] = stem .. "ī̆usce" forms["gen_sg_f"] = stem .. "ī̆usce" forms["gen_sg_n"] = stem .. "ī̆usce" forms["dat_sg_m"] = stem .. "īc" forms["dat_sg_f"] = stem .. "īc" forms["dat_sg_n"] = stem .. "īc" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. "ōc" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["nom_pl_m"] = stem .. "īsce" forms["nom_pl_f"] = stem .. "aec" forms["nom_pl_n"] = stem .. "aec" forms["gen_pl_m"] = stem .. "ōrunc{?}" forms["gen_pl_f"] = stem .. "ārunc{?}" forms["gen_ok_n"] = stem .. "ōrunc{?}" forms["dat_pl_m"] = stem .. "īsce" forms["dat_pl_f"] = stem .. "īsce" forms["dat_pl_n"] = stem .. "īsce" forms["acc_pl_m"] = stem .. "ōsce" forms["acc_pl_f"] = stem .. "āsce" forms["acc_pl_n"] = stem .. "aec" forms["abl_pl_m"] = stem .. "īsce" forms["abl_pl_f"] = stem .. "īsce" forms["abl_pl_n"] = stem .. "īsce" forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "hice" then insert_if_not(data.title, "demostrativo") -- .. " pronoun" forms["nom_sg_m"] = "hice" forms["nom_sg_f"] = "haece" forms["nom_sg_n"] = "hoce" forms["nom_pl_m"] = "hīce" forms["nom_pl_f"] = "haece" forms["nom_pl_n"] = "haece" forms["gen_sg_m"] = "huiusce" forms["gen_sg_f"] = "huiusce" forms["gen_sg_n"] = "huiusce" forms["gen_pl_m"] = {"hōrunce", "hōrumce"} forms["gen_pl_f"] = {"hārunce", "hārumce"} forms["gen_pl_n"] = {"hōrunce", "hōrumce"} forms["dat_sg_m"] = "huīce" forms["dat_sg_f"] = "huīce" forms["dat_sg_n"] = "huīce" forms["dat_pl_m"] = "hīsce" forms["dat_pl_f"] = "hīsce" forms["dat_pl_n"] = "hīsce" forms["acc_sg_m"] = "hunce" forms["acc_sg_f"] = "hance" forms["acc_sg_n"] = "hoce" forms["acc_pl_m"] = "hōsce" forms["acc_pl_f"] = "hāsce" forms["acc_pl_n"] = "haece" forms["abl_sg_m"] = "hōce" forms["abl_sg_f"] = "hāce" forms["abl_sg_n"] = "hōce" forms["abl_pl_m"] = "hīsce" forms["abl_pl_f"] = "hīsce" forms["abl_pl_n"] = "hīsce" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "plūs" then insert_if_not(data.title, "comparativo") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación con una terminación") data.note = "Ninguna de las formas en singular se usaron en latín clásico" forms["nom_sg_n"] = "plūs" forms["nom_pl_m"] = "plūrēs" forms["nom_pl_n"] = "plūra" forms["gen_sg_m"] = "plūris" forms["gen_sg_n"] = "plūris" forms["gen_pl_m"] = "plūrium" forms["gen_pl_n"] = "plūrium" forms["dat_sg_m"] = "plūrī" forms["dat_sg_n"] = "plūrī" forms["dat_pl_m"] = "plūribus" forms["dat_pl_n"] = "plūribus" forms["acc_sg_m"] = "plūrem" forms["acc_sg_f"] = "plūrem" forms["acc_sg_n"] = "plūs" forms["acc_pl_m"] = {"plūrēs", "plūrīs"} forms["acc_pl_n"] = "plūra" forms["abl_sg_m"] = {"plūrī", "plūre"} forms["abl_sg_f"] = {"plūrī", "plūre"} forms["abl_sg_n"] = {"plūrī", "plūre"} forms["abl_pl_m"] = "plūribus" forms["abl_pl_n"] = "plūribus" forms["voc_sg_n"] = "plūs" forms["voc_pl_m"] = "plūrēs" forms["voc_pl_n"] = "plūra" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif match(arg1, "^egō̆?$") or arg1 == "nōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "nōs" forms["gen_sg_m"] = "meī" forms["gen_pl_m"] = {"nostrī", "nostrum"} forms["dat_sg_m"] = "mihī̆" forms["dat_pl_m"] = "nōbīs" forms["acc_sg_m"] = {"mē", "mēmē"} forms["acc_pl_m"] = "nōs" forms["abl_sg_m"] = {"mē", "mēmē"} forms["abl_pl_m"] = "nōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "nōs" elseif arg1 == "tū" or arg1 == "vōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "vōs" forms["gen_sg_m"] = "tuī" forms["gen_pl_m"] = {"vestrī", "vestrum"} forms["dat_sg_m"] = "tibī̆" forms["dat_pl_m"] = "vōbīs" forms["acc_sg_m"] = {"tē", "tētē"} forms["acc_pl_m"] = "vōs" forms["abl_sg_m"] = {"tē", "tētē"} forms["abl_pl_m"] = "vōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "vōs" elseif arg1 == "suī" then insert_if_not(data.title, "pronombre reflexivo") forms["nom_sg_m"] = {} forms["nom_pl_m"] = {} forms["gen_sg_m"] = arg1 forms["gen_pl_m"] = forms["gen_sg_m"] forms["dat_sg_m"] = "sibī̆" forms["dat_pl_m"] = forms["dat_sg_m"] forms["acc_sg_m"] = {"sē", "sēsē"} forms["acc_pl_m"] = {"sē", "sēsē"} forms["abl_sg_m"] = {"sē", "sēsē"} forms["abl_pl_m"] = {"sē", "sēsē"} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} elseif arg1 == "is" or arg1 == "īdem" then insert_if_not(data.title, "pronombre demostrativo") forms["nom_sg_m"] = "is" forms["nom_sg_f"] = "ea" forms["nom_sg_n"] = "id" forms["nom_pl_m"] = {"iī", "eī", "ī"} forms["nom_pl_f"] = "eae" forms["nom_pl_n"] = "ea" forms["gen_sg_m"] = {"eius", "ejus"} forms["gen_sg_f"] = {"eius", "ejus"} forms["gen_sg_n"] = {"eius", "ejus"} forms["gen_pl_m"] = {"eōrum", "eum"} forms["gen_pl_f"] = "eārum" forms["gen_pl_n"] = {"eōrum", "eum"} forms["dat_sg_m"] = {"eī", "e͡i", "ēī"} forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"} forms["dat_sg_n"] = {"eī", "e͡i", "ēī"} forms["dat_pl_m"] = {"iīs", "eīs", "īs"} forms["dat_pl_f"] = {"iīs", "eīs", "īs", "eābus"} forms["dat_pl_n"] = {"iīs", "eīs", "īs"} forms["acc_sg_m"] = "eum" forms["acc_sg_f"] = "eam" forms["acc_sg_n"] = "id" forms["acc_pl_m"] = "eōs" forms["acc_pl_f"] = "eās" forms["acc_pl_n"] = "ea" forms["abl_sg_m"] = "eō" forms["abl_sg_f"] = "eā" forms["abl_sg_n"] = "eō" forms["abl_pl_m"] = {"iīs", "eīs", "īs"} forms["abl_pl_f"] = {"iīs", "eīs", "īs"} forms["abl_pl_n"] = {"iīs", "eīs", "īs"} if arg1 == "īdem" then forms["nom_sg_m"] = "ī" forms["nom_sg_n"] = "i" forms["acc_sg_n"] = "i" end elseif arg1 == "quis" or arg1 == "quī" then data.note = "La forma ''qua'' es preferida frente a ''quae'' cuando se usa como indefinido" local id = "id" if arg1 == "quī" then insert_if_not(data.title, "determinante relativo/interrogativo") id = "od" forms["nom_sg_m"] = {"quī", "quis", "quei{†}"} forms["nom_sg_f"] = {"quae", "qua"} forms["acc_sg_f"] = "quam" forms["abl_sg_m"] = "quō" forms["abl_sg_f"] = "quā" forms["abl_sg_n"] = "quō" else insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = {"quis", "quī"} forms["nom_sg_f"] = {"quae", "qua", "quis{†}"} forms["acc_sg_f"] = {"quam", "quem{†}"} forms["abl_sg_m"] = {"quō", "quī"} forms["abl_sg_f"] = {"quā", "quī"} forms["abl_sg_n"] = {"quō", "quī"} end forms["nom_sg_n"] = "qu"..id forms["nom_pl_m"] = {"quī", "quei{†}"} forms["nom_pl_f"] = "quae" forms["nom_pl_n"] = {"quae", "qua"} forms["gen_sg_m"] = {"cuius", "quoius{†}"} forms["gen_sg_f"] = {"cuius", "quoius{†}"} forms["gen_sg_n"] = {"cuius", "quoius{†}"} forms["gen_pl_m"] = "quōrum" forms["gen_pl_f"] = "quārum" forms["gen_pl_n"] = "quōrum" forms["dat_sg_m"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_f"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_n"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_n"] = {"quibus", "quīs", "queis{†}"} forms["acc_sg_m"] = "quem" forms["acc_sg_n"] = "qu"..id forms["acc_pl_m"] = "quōs" forms["acc_pl_f"] = "quās" forms["acc_pl_n"] = {"quae", "qua"} forms["abl_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_n"] = {"quibus", "quīs", "queis{†}"} elseif arg1 == "aliquī" then insert_if_not(data.title, "determinante indefinido") forms["nom_sg_m"] = {"aliquī{DET/ADJ}", "aliquis{PRON/SUST}"} forms["nom_sg_f"] = {"aliqua", "aliquae{R}"} forms["nom_sg_n"] = "aliquod" forms["nom_pl_m"] = "aliquī" forms["nom_pl_f"] = "aliquae" forms["nom_pl_n"] = "aliqua" forms["gen_sg_m"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_f"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_n"] = {"alicuius", "aliquoius{†}"} forms["gen_pl_m"] = "aliquōrum" forms["gen_pl_f"] = "aliquārum" forms["gen_pl_n"] = "aliquōrum" forms["dat_sg_m"] = {"alicui", "aliquoi{†}"} forms["dat_sg_f"] = {"alicui", "aliquoi{†}"} forms["dat_sg_n"] = {"alicui", "aliquoi{†}"} forms["dat_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["acc_sg_m"] = "aliquem" forms["acc_sg_f"] = "aliquam" forms["acc_sg_n"] = "aliquod" forms["acc_pl_m"] = "aliquōs" forms["acc_pl_f"] = "aliquās" forms["acc_pl_n"] = "aliqua" forms["abl_sg_m"] = "aliquō" forms["abl_sg_f"] = "aliquā" forms["abl_sg_n"] = "aliquō" forms["abl_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} elseif arg1 == "quisquam" then insert_if_not(data.title, "determinante indefinido, concordancia en negativo") data.note = "En latín clásico, era preferidas las formas de ''ūllus'' en lugar de las esta voz para el femenino y el neutro." forms["nom_sg_m"] = "quisquam" forms["nom_sg_f"] = {"quaequam", "quisquam{†}"} forms["nom_sg_n"] = "quodquam" forms["nom_pl_m"] = "quīquam" forms["nom_pl_f"] = "quaequam" forms["nom_pl_n"] = "quaequam" forms["gen_sg_m"] = "cuiusquam" forms["gen_sg_f"] = "cuiusquam" forms["gen_sg_n"] = "cuiusquam" forms["gen_pl_m"] = "quōrumquam" forms["gen_pl_f"] = "quārumquam" forms["gen_pl_n"] = "quōrumquam" forms["dat_sg_m"] = "cuiquam" forms["dat_sg_f"] = "cuiquam" forms["dat_sg_n"] = "cuiquam" forms["dat_pl_m"] = "quibusquam" forms["dat_pl_f"] = "quibusquam" forms["dat_pl_n"] = "quibusquam" forms["acc_sg_m"] = "quemquam" forms["acc_sg_f"] = {"quamquam", "quemquam{†}"} forms["acc_sg_n"] = "quodquam" forms["acc_pl_m"] = "quōsquam" forms["acc_pl_f"] = "quāsquam" forms["acc_pl_n"] = "quaequam" forms["abl_sg_m"] = {"quōquam", "quīquam{†}"} forms["abl_sg_f"] = "quāquam" forms["abl_sg_n"] = "quōquam" forms["abl_pl_m"] = "quibusquam" forms["abl_pl_f"] = "quibusquam" forms["abl_pl_n"] = "quibusquam" forms["voc_sg_m"] = "quisquam" forms["voc_sg_f"] = "quaequam" forms["voc_sg_n"] = "quodquam" forms["voc_pl_m"] = "quīquam" forms["voc_pl_f"] = "quaequam" forms["voc_pl_n"] = "quaequam" elseif arg1 == "quisquis" then insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = "quisquis" forms["nom_sg_f"] = "quisquis" forms["nom_sg_n"] = {"quidquid", "quicquid"} forms["nom_pl_m"] = "quīquī" forms["nom_pl_f"] = "quaequae" forms["nom_pl_n"] = "quaequae" forms["gen_sg_m"] = "cuiuscuius" forms["gen_sg_f"] = "cuiuscuius" forms["gen_sg_n"] = "cuiuscuius" forms["gen_pl_m"] = "quōrumquōrum" forms["gen_pl_f"] = "quārumquārum" forms["gen_pl_n"] = "quōrumquōrum" forms["dat_sg_m"] = "cuicui" forms["dat_sg_f"] = "cuicui" forms["dat_sg_n"] = "cuicui" forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"} forms["acc_sg_m"] = "quemquem" forms["acc_sg_f"] = "quamquam" forms["acc_sg_n"] = {"quidquid", "quicquid"} forms["acc_pl_m"] = "quōsquōs" forms["acc_pl_f"] = "quāsquās" forms["acc_pl_n"] = "quaequae" forms["abl_sg_m"] = "quōquō" forms["abl_sg_f"] = "quāquā" forms["abl_sg_n"] = "quōquō" forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"} forms["voc_sg_m"] = "quisquis" forms["voc_sg_f"] = "quisquis" forms["voc_sg_n"] = {"quidquid", "quicquid"} forms["voc_pl_m"] = "quīquī" forms["voc_pl_f"] = "quaequae" forms["voc_pl_n"] = "quaequae" elseif arg1 == "ecquis" then insert_if_not(data.title, "pronombre interrogativo") forms["nom_sg_m"] = {"ecquis", "ecquī"} forms["nom_sg_f"] = {"ecqua", "ecquae"} forms["nom_sg_n"] = "ecquid" forms["nom_pl_m"] = "ecquī" forms["nom_pl_f"] = "ecquae" forms["nom_pl_n"] = {"ecqua", "ecquae"} forms["gen_sg_m"] = "eccuius" forms["gen_sg_f"] = "eccuius" forms["gen_sg_n"] = "eccuius" forms["dat_sg_m"] = "eccui" forms["dat_sg_f"] = "eccui" forms["dat_sg_n"] = "eccui" forms["acc_sg_m"] = "ecquem" forms["acc_sg_f"] = "ecquam" forms["acc_sg_n"] = "ecquod" forms["acc_pl_m"] = "ecquōs" forms["acc_pl_f"] = "ecquās" forms["acc_pl_n"] = {"ecqua", "ecquae"} forms["abl_sg_m"] = {"ecquō", "ecquī"} forms["abl_sg_f"] = {"ecquā", "ecquī"} forms["abl_sg_n"] = {"ecquō", "ecquī"} elseif arg1 == "quīdam" then insert_if_not(data.title, "pronombre indefinido") forms["nom_sg_m"] = "quīdam" forms["nom_sg_f"] = "quaedam" forms["nom_sg_n"] = "quiddam" forms["nom_pl_m"] = {"quīdam", "quēsdam{†}"} forms["nom_pl_f"] = "quaedam" forms["nom_pl_n"] = "quaedam" forms["gen_sg_m"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_f"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_n"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_pl_m"] = {"quōrundam", "quōrumdam"} forms["gen_pl_f"] = {"quārundam", "quārumdam"} forms["gen_pl_n"] = {"quōrundam", "quōrumdam"} forms["dat_sg_m"] = {"cuidam", "quoidam{†}"} forms["dat_sg_f"] = {"cuidam", "quoidam{†}"} forms["dat_sg_n"] = {"cuidam", "quoidam{†}"} forms["dat_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_n"] = {"quibusdam", "quīsdam{†}"} forms["acc_sg_m"] = {"quendam", "quemdam"} forms["acc_sg_f"] = {"quandam", "quamdam"} forms["acc_sg_n"] = "quiddam" forms["acc_pl_m"] = {"quōsdam", "quēsdam{†}"} forms["acc_pl_f"] = "quāsdam" forms["acc_pl_n"] = "quaedam" forms["abl_sg_m"] = "quōdam" forms["abl_sg_f"] = "quādam" forms["abl_sg_n"] = "quōdam" forms["abl_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_n"] = {"quibusdam", "quīsdam{†}"} elseif arg1 == "nēmō" then insert_if_not(data.title, "Determinante y pronombre, concordancia en negativo") forms["nom_sg_m"] = "nēmō" forms["nom_sg_f"] = "nēmō" forms["gen_sg_m"] = {"nūllī̆us", "nēminis{R}"} forms["gen_sg_f"] = {"nūllī̆us", "nēminis{R}"} forms["dat_sg_m"] = "nēminī" forms["dat_sg_f"] = "nēminī" forms["acc_sg_m"] = "nēminem" forms["acc_sg_f"] = "nēminem" forms["abl_sg_m"] = {"nūllō", "nēmine{R}"} forms["abl_sg_f"] = {"nūllā", "nēmine{R}"} else error('adjective ' .. arg1 .. ' not recognized') end end local function extract_base(lemma, ending) if ending:find("(", nil, true) then return match(lemma, ending) end return match(lemma, "^(.*)" .. ending .. "$") end local function get_noun_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local subtypes = ending_and_subtypes[2] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. -- In addition, M or F as a subtype is canceled by N, and -- vice-versa, but M doesn't cancel F or vice-versa; instead, -- we simply ignore the conflicting gender specification when -- constructing the combination of specified and inferred subtypes. -- The reason for this is that neuters have distinct declensions -- from masculines and feminines, but masculines and feminines have -- the same declension, and various nouns in Latin that are -- normally masculine are exceptionally feminine and vice-versa -- (nauta, agricola, fraxinus, malus "apple tree", manus, rēs, -- etc.). -- -- In addition, sg as a subtype is canceled by pl and vice-versa. -- It's also possible to specify both, which will override sg but -- not cancel it (in the sense that it won't prevent the relevant -- rule from matching). For example, there's a rule specifying that -- lemmas beginning with a capital letter and ending in -ius take -- the ius.voci.sg subtypes. Specifying such a lemma with the -- subtype both will result in the ius.voci.both subtypes, whereas -- specifying such a lemma with the subtype pl will cause this rule -- not to match, and it will fall through to a less specific rule -- that returns just the ius subtype, which will be combined with -- the explicitly specified pl subtype to produce ius.pl. if specified_subtypes["-" .. subtype] or subtype == "N" and (specified_subtypes.M or specified_subtypes.F) or (subtype == "M" or subtype == "F") and specified_subtypes.N or subtype == "sg" and specified_subtypes.pl or subtype == "pl" and specified_subtypes.sg then not_this_subtype = true break end end end if not not_this_subtype then if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] local base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending == stem2 then return base, stem2, subtypes end else local base = extract_base(lemma, ending) if base then return base, stem2, subtypes end end end end if decltype then error("Unrecognized ending for declension-" .. decltype .. " noun: " .. lemma) end return lemma, stem2, keys_to_list(specified_subtypes) end local patterns = { {"[mM]a", "%0t"}, {"e", ""}, {"([aoAO])([lr])", "%1" .. MACRON .. "%2"}, {"[eE]l", "%0l"}, {"([mM])en", "%1in"}, {"([tT]ūd)ō", "%1in"}, {"([gG])ō", "%1in"}, {"[ōŌ]", "%1n"}, {"er", "r"}, {"[ēi]s", ""}, {"([āēīōūȳĀĒĪŌŪȲ]n)s", function(v) return (gsub(toNFD(v), MACRON, "") .. "t") end}, {"([cC])eps", "%1ipit"}, {"([bp])s", "%1"}, {"us", "or"}, {"s", "t"}, {"ex", "ic"}, {"x", "c"}, } local function make_stem2(stem) local n for _, pattern in ipairs(patterns) do local key = pattern[1] stem, n = gsub(stem, key .. "$", pattern[2]) if n > 0 then -- debug_track("la-utilities/" .. key) REVISAR return toNFC(stem) end end -- debug_track("la-utilities") REVISAR return stem end local function detect_noun_subtype(lemma, stem2, typ, subtypes) local base, _ if typ == "1" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ām", {"F", "am"}}, {"ās", {"M", "Greek", "Ma"}}, {"ēs", {"M", "Greek", "Me"}}, {"ē", {"F", "Greek"}}, {"ae", {"F", "pl"}}, {"a", {"F"}}, }) elseif typ == "2" then local detected_subtypes lemma, stem2, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(.*r)$", {"M", "er"}}, {"^(.*v)os$", {"M", "vos"}}, {"^(.*v)om$", {"N", "vom"}}, -- If the lemma ends in -os and the user said N or -M, then the -- following won't apply, and the second (neuter) -os will applly. {"os", {"M", "Greek"}}, {"os", {"N", "Greek", "us"}}, {"on", {"N", "Greek"}}, -- -ius beginning with a capital letter is assumed a proper name, -- and takes the voci subtype (vocative in -ī) along with the ius -- subtype and sg-only. Other nouns in -ius just take the ius -- subtype. Explicitly specify "sg" so that if .pl is given, -- this rule won't apply. {"^(%u.*)ius$", {"M", "ius", "voci", "sg"}}, {"ius", {"M", "ius"}}, {"ium", {"N", "ium"}}, -- If the lemma ends in -us and the user said N or -M, then the -- following won't apply, and the second (neuter) -us will applly. {"us", {"M"}}, {"us", {"N", "us"}}, {"um", {"N"}}, {"iī", {"M", "ius", "pl"}}, {"ia", {"N", "ium", "pl"}}, -- If the lemma ends in -ī and the user said N or -M, then the -- following won't apply, and the second (neuter) -ī will applly. {"ī", {"M", "pl"}}, {"ī", {"N", "us", "pl"}}, {"oe", {"M", "Greek", "pl"}}, {"a", {"N", "pl"}}, }) stem2 = stem2 or lemma return lemma, stem2, detected_subtypes elseif typ == "3" then if subtypes.pl then if subtypes.Greek then base = lemma:match("^(.*)erēs$") if base then return base .. "ēr", base .. "er", {"er"} end base = lemma:match("^(.*)ontēs$") if base then return base .. "ōn", base .. "ont", {"on"} end base = lemma:match("^(.*)es$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural Greek noun: " .. lemma) end base = lemma:match("^(.*)ia$") if base then return base, stem2 or base, {"N", "I", "pure"} end base = lemma:match("^(.*)a$") if base then return base, stem2 or base, {"N"} end base = lemma:match("^(.*)ēs$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural noun: " .. lemma) end stem2 = stem2 or make_stem2(lemma) local detected_subtypes if subtypes.Greek then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"is", ""}, {"I"}}, {"ēr", {"er"}}, {"ōn", {"on"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} end if not subtypes.N then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"^(%u.*pol)is$", ""}, {"F", "polis", "sg", "loc"}}, {{"tūdō", "tūdin"}, {"F"}}, {{"tās", "tāt"}, {"F"}}, {{"tūs", "tūt"}, {"F"}}, {{"tiō", "tiōn"}, {"F"}}, {{"siō", "siōn"}, {"F"}}, {{"xiō", "xiōn"}, {"F"}}, {{"gō", "gin"}, {"F"}}, {{"or", "ōr"}, {"M"}}, {{"tr[iī]x", "trīc"}, {"F"}}, {{"is", ""}, {"I"}}, {{"^(%l.*)ēs$", ""}, {"I"}}, }) if base then return lemma, stem2, detected_subtypes end end base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"us", "or"}, {"N"}}, {{"us", "er"}, {"N"}}, {{"ma", "mat"}, {"N"}}, {{"men", "min"}, {"N"}}, {{"^(%u.*)e$", ""}, {"N", "sg"}}, {{"e", ""}, {"N", "I", "pure"}}, {{"al", "āl"}, {"N", "I", "pure"}}, {{"ar", "ār"}, {"N", "I", "pure"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} elseif typ == "4" then if subtypes.echo or subtypes.Callisto then base = lemma:match("^(.*)ō$") if not base then error("Declension-4 noun of subtype .echo or .Callisto should end in -ō: " .. lemma) end if subtypes.Callisto then return base, nil, {"F", "sg"} else return base, nil, {"F"} end end return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", {"M"}}, {"ū̆", {"N"}}, {"ūs", {"M", "pl"}}, {"ua", {"N", "pl"}}, }) elseif typ == "5" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"iēs", {"F", "i"}}, {"iēs", {"F", "i", "pl"}}, {"ēs", {"F"}}, {"ēs", {"F", "pl"}}, }) elseif typ == "sgpl" then return lemma, stem2, {} elseif typ == "irreg" and lemma == "domus" then -- [[domus]] auto-sets data.loc = true, but we need to know this -- before declining the noun so we can propagate it to other segments. return lemma, nil, {"loc"} elseif typ == "indecl" or typ == "irreg" and ( lemma == "Deus" or match(lemma, "^[IJ]ēs[uū]s$") or lemma == "Athōs" or lemma == "vēnum" ) then -- Indeclinable nouns, and certain irregular nouns, set data.num = "sg", -- but we need to know this before declining the noun so we can -- propagate it to other segments. return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", {"both"}}, {"", {"sg"}}, {"", {"pl"}}, }) elseif typ == "indecl" or typ == "irreg" then return lemma, nil, {} else return nil, nil, {} end end -- Given ENDINGS_AND_SUBTYPES (a list of four-tuples of ENDING, RETTYPE, -- SUBTYPES, PROCESS_RETVAL), check each ENDING in turn against LEMMA and -- STEM2. If it matches, return a four-tuple BASE, STEM2, RETTYPE, NEW_SUBTYPES -- where BASE is normally the remainder of LEMMA minus the ending, STEM2 is -- as passed in, RETTYPE is as passed in, and NEW_SUBTYPES is the same as -- SUBTYPES minus any subtypes beginning with a hyphen. If no endings match, -- throw an error if DECLTYPPE is non-nil, mentioning the DECLTYPE -- (user-specified declension); but if DECLTYPE is nil, just return the tuple -- nil, nil, nil, nil. -- -- In order for a given entry to match, ENDING must match and also the subtypes -- in SUBTYPES (a list) must not be incompatible with the passed-in -- user-specified subtypes SPECIFIED_SUBTYPES (a set, i.e. a table where the -- keys are strings and the value is always true). "Incompatible" means that -- a given SUBTYPE is specified in either one and -SUBTYPE in the other, or -- that "pl" is found in SPECIFIED_SUBTYPES and not in SUBTYPES. -- -- The ending spec in ENDINGS_AND_SUBTYPES is one of the following: -- -- 1. A simple string, e.g. "tūdō", specifying an ending. -- 2. A regex that should match the entire lemma (it should be anchored at -- the beginning with ^ and at the end with $), and contains a single -- capturing group to match the base. -- 3. A pair {SIMPLE_STRING_OR_REGEX, STEM2_ENDING} where -- SIMPLE_STRING_OR_REGEX is one of the previous two possibilities and -- STEM2_ENDING is a string specifying the corresponding ending that must -- be present in STEM2. If this form is used, the combination of -- base + STEM2_ENDING must exactly match STEM2 in order for this entry -- to be considered a match. An example is {"is", ""}, which will match -- lemma == "follis", stem2 == "foll", but not lemma == "lapis", -- stem2 == "lapid". -- -- If PROCESS_STEM2 is given and the returned STEM2 would be nil, call -- process_stem2(BASE) to get the STEM2 to return. local function get_adj_type_and_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes, process_stem2) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local rettype = ending_and_subtypes[2] local subtypes = ending_and_subtypes[3] local process_retval = ending_and_subtypes[4] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. if specified_subtypes["-" .. subtype] then not_this_subtype = true break end -- A subtype is canceled if the user specified SUBTYPE and -- -SUBTYPE is given in the to-be-returned subtypes. local must_not_be_present = subtype:match("^%-(.*)$") if must_not_be_present and specified_subtypes[must_not_be_present] then not_this_subtype = true break end end end if not not_this_subtype then local base if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending ~= stem2 then base = nil end else base = extract_base(lemma, ending) end if base then -- Remove subtypes of the form -SUBTYPE from the subtypes -- to be returned. local new_subtypes = {} for _, subtype in ipairs(subtypes) do if subtype:sub(1, 1) ~= "-" then insert(new_subtypes, subtype) end end if process_retval then base, stem2 = process_retval(base, stem2) end if process_stem2 then stem2 = stem2 or process_stem2(base) end return base, stem2, rettype, new_subtypes end end end if not decltype then return lemma, stem2, nil, keys_to_list(specified_subtypes) elseif decltype == "" then error("Unrecognized ending for adjective: " .. lemma) else error("Unrecognized ending for declension-" .. decltype .. " adjective: " .. lemma) end end -- Autodetect the type and subtype of an adjective given all the information -- specified by the user: lemma, stem2, declension type and specified subtypes. -- Four values are returned: the lemma base (i.e. the stem of the lemma, as -- required by the declension functions), the value of stem2 to pass to the -- declension function, the declension type and the autodetected subtypes. -- Note that this will not detect a given subtype if -SUBTYPE is specified for -- any subtype that would be returned, or if SUBTYPE is specified and -SUBTYPE -- is among the subtypes that would be returned (such subtypes are filtered out -- of the returned subtypes). local function detect_adj_type_and_subtype(lemma, stem2, typ, subtypes) local function base_as_stem2(base, stem2) return base, base end local function constant_base(baseval) return function(base, stem2) return baseval, nil end end local function decl12_stem2(base) return base end local function decl3_stem2(base) return make_stem2(base) end local decl12_entries = { {"us", "1&2+", {}}, {"a", "1&2+", {}}, {"um", "1&2+", {}}, {"ī", "1&2+", {"pl"}}, {"ae", "1&2+", {"pl"}}, {"a", "1&2+", {"pl"}}, -- Nearly all -os adjectives are greekA {"os", "1&2+", {"greekA", "-greekE"}}, {"os", "1&2+", {"greekE", "-greekA"}}, {"ē", "1&2+", {"greekE", "-greekA"}}, {"on", "1&2+", {"greekA", "-greekE"}}, {"on", "1&2+", {"greekE", "-greekA"}}, {"^(.*er)$", "1&2+", {"er"}}, {"^(.*ur)$", "1&2+", {"er"}}, {"^(h)ic$", "1&2+", {"ic"}}, } local decl3_entries = { {"^(.*er)$", "3-3+", {"I"}}, {"^(.*er)$", "3-3+", {}}, {"is", "3-2+", {"I"}}, {"is", "3-2+", {}}, {"e", "3-2+", {"I"}}, {"e", "3-2+", {}}, {"^(.*[ij])or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(.*[ij])or$", "3-C+", {}}, {"^(min)or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(min)or$", "3-C+", {}}, {"^(.*trīx)$", "3-def+", {"trix", "abl_i_e", "-abl_e_i"}}, {"^(.*trīx)$", "3-def+", {"trix"}}, {"^(.*tor)$", "3-def+", {"tor", "abl_i_e", "-abl_e_i"}}, {"^(.*tor)$", "3-def+", {"tor"}}, -- Detect -ēs as 3-1 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like quadripēs, volucripēs). -- Essentially, for declension-3 adjectives, we require that -- .pl is given if the lemma is plural. -- -- Most 3-1 adjectives are i-stem (e.g. audāx) so we require -I -- to be given with non-i-stem adjectives. The first entry below -- will apply when -I isn't given, the second when it is given. {"^(.*ēs)$", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"I"}}, {"^(.*ēs)$", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"par"}}, {"^(.*[ij])ōrēs$", "3-C+", {"pl"}}, {"^(min)ōrēs$", "3-C+", {"pl"}}, -- If .pl with -ēs, we don't know if the adjective is 3-1, 3-2 -- or 3-3. Since 3-2 is probably the most common, we infer it -- (as well as the fact that these adjectives *are* in a sense -- 3-2 since they have a distinct neuter in -(i)a. Note that -- we have two entries here; the first one will apply unless -- -I is given, and will infer an i-stem adjective; the second -- one will apply otherwise (and infer a non-i-stem 3-1 adjective). {"ēs", "3-2+", {"pl", "I"}, base_as_stem2}, {"ēs", "3-1+", {"pl", "par"}, base_as_stem2}, -- Same for neuters. {"ia", "3-2+", {"pl", "I"}, base_as_stem2}, {"a", "3-1+", {"pl", "par"}, base_as_stem2}, -- As above for -ēs but for miscellaneous singulars. {"", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"I"}}, {"", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"par"}}, } local function get_subtypes_and_endings(typ, f) local subtypes_and_endings = {} for _, v in ipairs(decl3_entries) do if f(v) then v = deep_copy(v) v[2] = typ insert(subtypes_and_endings, v) end end return subtypes_and_endings end local function compare(spec) return spec[2] == typ end if typ == "+" then local base, new_stem2, rettype, new_subtypes = get_adj_type_and_subtype_by_ending(lemma, stem2, nil, subtypes, decl12_entries, decl12_stem2) if rettype then return base, new_stem2, rettype, new_subtypes else return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) end elseif typ == "3+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) elseif typ == "1&2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl12_entries, decl12_stem2) elseif typ == "1-1+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"a", typ, {}}, {"ae", typ, {"pl"}}, }) elseif typ == "2-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", typ, {}}, {"um", typ, {}}, {"ī", typ, {"pl"}}, {"a", typ, {"pl"}}, {"os", typ, {"greek"}}, {"on", typ, {"greek"}}, {"oe", typ, {"greek", "pl"}}, }) elseif typ == "3-1+" then -- Use the specs from `decl3_entries`, but add the two i-stem 3-2+ specs when plural-only, as they're the same when 3-1+. local subtypes_and_endings = get_subtypes_and_endings(typ, function(spec) local spec1, spec2 = spec[1], spec[2] return spec2 == typ or (spec2 == "3-2+" and spec1 == "ēs" or spec1 == "ia") end) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-def+" then -- Like 3-1+ but defective in gender local subtypes_and_endings = get_subtypes_and_endings(typ, compare) insert(subtypes_and_endings, {"", typ, {"I"}}) insert(subtypes_and_endings, {"", typ, {"par"}}) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"is", typ, {}}, {"e", typ, {}}, -- Detect -ēs as 3-2 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like isoscelēs). Essentially, -- for declension-3 adjectives, we require that .pl is given -- if the lemma is plural. {"ēs", typ, {}}, {"ēs", typ, {"pl"}}, {"ia", typ, {"pl"}}, }, decl3_stem2) elseif typ == "3-3+" or typ == "3-P+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ēs", typ, {"pl"}, base_as_stem2}, {"ia", typ, {"pl"}, base_as_stem2}, {"", typ, {}}, }, decl3_stem2) elseif typ == "3-C+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, get_subtypes_and_endings(typ, compare), decl3_stem2) elseif typ == "irreg+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(duo)$", typ, {"pl"}}, {"^(ambō)$", typ, {"pl"}}, {"^(mīll?ia)$", typ, {"N", "pl"}, constant_base("mīlle")}, -- match ea {"^(ea)$", typ, {}, constant_base("is")}, -- match id {"^(id)$", typ, {}, constant_base("is")}, -- match plural eī, iī {"^([ei]ī)$", typ, {"pl"}, constant_base("is")}, -- match plural ea, eae {"^(eae?)$", typ, {"pl"}, constant_base("is")}, -- match eadem {"^(eadem)$", typ, {}, constant_base("īdem")}, -- match īdem, idem {"^([īi]dem)$", typ, {}, constant_base("īdem")}, -- match plural īdem {"^(īdem)$", typ, {"pl"}}, -- match plural eadem, eaedem {"^(eae?dem)$", typ, {"pl"}, constant_base("īdem")}, -- match illa, ipsa, ista; it doesn't matter if we overmatch because -- we'll get an error as we use the stem itself in the returned base {"^(i[lps][lst])a$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match illud, istud; as above, it doesn't matter if we overmatch {"^(i[ls][lt])ud$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match ipsum {"^(ipsum)$", typ, {}, constant_base("ipse")}, -- match plural illī, ipsī, istī; as above, it doesn't matter if we -- overmatch {"^(i[lps][lst])ī$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- match plural illa, illae, ipsa, ipsae, ista, istae; as above, it -- doesn't matter if we overmatch {"^(i[lps][lst])ae?$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- Detect quī as non-plural unless .pl specified. {"^(quī)$", typ, {}}, -- Otherwise detect quī as plural. {"^(quī)$", typ, {"pl"}}, -- Same for quae. {"^(quae)$", typ, {}, constant_base("quī")}, {"^(quae)$", typ, {"pl"}, constant_base("quī")}, {"^(quid)$", typ, {}, constant_base("quis")}, {"^(quod)$", typ, {}, constant_base("quī")}, {"^(qui[cd]quid)$", typ, {}, constant_base("quisquis")}, {"^(quīquī)$", typ, {"pl"}, constant_base("quisquis")}, {"^(quaequae)$", typ, {"pl"}, constant_base("quisquis")}, -- match all remaining lemmas in lemma form {"", typ, {}}, }) elseif typ == "indecl+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", typ, {"both"}}, {"", typ, {"sg"}}, {"", typ, {"pl"}}, }) else -- 0+ return lemma, nil, typ, {} end end local noun_lb = { nom_sg = "sg.", gen_sg = "sg.", dat_sg = "sg.", acc_sg = "sg.", abl_sg = "sg.", voc_sg = "sg.", loc_sg = "sg.", nom_pl = "pl.", gen_pl = "pl.", dat_pl = "pl.", acc_pl = "pl.", abl_pl = "pl.", voc_pl = "pl.", loc_pl = "pl." } function export.sust(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de = "num"}, ["nota"] = {}, } for form,_ in pairs(noun_lb) do params[form] = {lista=true} end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local genero local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, detected_subtypes = detect_noun_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end if not genero then if types.M then genero = "m" end if types.N then genero = "n" end if types.F then genero = "f" end end local es_adj if not r1 and genero then local typ r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) if r1 then c = typ es_adj = true end end assert(r1, "forma no reconocida: "..r[1]) local cb = es_adj and adj_decl[c] or noun_decl[c] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) if es_adj then local forms_ = {} for form,arr in pairs(data.forms) do local f1, f2 = form:match("^(.*)(_"..genero..")$") if f1 then forms_[f1] = arr end end data.forms = forms_ end if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, noun_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if declinfo["loc_sg"] and #declinfo["loc_sg"] == 0 then declinfo["loc_sg"] = nil end if declinfo["loc_pl"] and #declinfo["loc_pl"] == 0 then declinfo["loc_pl"] = nil end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local forms = sobreescribir_formas(declinfo, args, false, {}) comprobar_defectivo(forms, {}) forms = desactivar_formas(forms, function (form) return (form:find("pl$") and nopl) or (form:find("sg$") and nosg) end ) local raiz_nom = f(forms["nom_sg"][1] or forms["nom_pl"][1] or "?") local raiz_gen = f(forms["gen_sg"][1] or forms["gen_pl"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, noun_lb) local t = {} insert(t, {{""}, {"Singular"}, {"Plural"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg"], forms["nom_pl"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg"], forms["gen_pl"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg"], forms["dat_pl"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg"], forms["acc_pl"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg"], forms["abl_pl"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg"], forms["voc_pl"]}) if (forms["loc_sg"] and forms["loc_sg"][1]) or (forms["loc_pl"] and forms["loc_pl"][1]) then insert(t, {{"Locativo", header=true, color=COLOR_H}, forms["loc_sg"], forms["loc_pl"]}) end insert(t, {{args["nota"] or "", colspan=3}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_nom..", "..raiz_gen.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local adj_lb = { nom_sg_m = "m.", nom_sg_n = "n.", nom_sg_f = "f.", nom_pl_m = "m.", nom_pl_n = "n.", nom_pl_f = "f.", gen_sg_m = "m.", gen_sg_n = "n.", gen_sg_f = "f.", gen_pl_m = "m.", gen_pl_n = "n.", gen_pl_f = "f.", dat_sg_m = "m.", dat_sg_n = "n.", dat_sg_f = "f.", dat_pl_m = "m.", dat_pl_n = "n.", dat_pl_f = "f.", acc_sg_m = "m.", acc_sg_n = "n.", acc_sg_f = "f.", acc_pl_m = "m.", acc_pl_n = "n.", acc_pl_f = "f.", abl_sg_m = "m.", abl_sg_n = "n.", abl_sg_f = "f.", abl_pl_m = "m.", abl_pl_n = "n.", abl_pl_f = "f.", voc_sg_m = "m.", voc_sg_n = "n.", voc_sg_f = "f.", voc_pl_m = "m.", voc_pl_n = "n.", voc_pl_f = "f.", } function export.adj(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de="num"}, ["gen"] = {por_defecto="mfn"}, ["nota"] = {}, } for form,_ in pairs(adj_lb) do params[form] = {lista=true} end params["dat_pl"] = {lista=true} params["abl_pl"] = {lista=true} params["loc_pl"] = {lista=true} local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) if args["dat_pl"][1] then args["dat_pl_m"] = deep_copy(args["dat_pl"]) args["dat_pl_n"] = deep_copy(args["dat_pl"]) args["dat_pl_f"] = deep_copy(args["dat_pl"]) end if args["abl_pl"][1] then args["abl_pl_m"] = deep_copy(args["abl_pl"]) args["abl_pl_n"] = deep_copy(args["abl_pl"]) args["abl_pl_f"] = deep_copy(args["abl_pl"]) end if args["loc_pl"][1] then args["loc_pl_m"] = deep_copy(args["loc_pl"]) args["loc_pl_n"] = deep_copy(args["loc_pl"]) args["loc_pl_f"] = deep_copy(args["loc_pl"]) end args["dat_pl"] = nil args["abl_pl"] = nil args["loc_pl"] = nil assert(not find(title, " "), "locuciones no soportadas aún") -- REVISAR local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") a = a or subarg b = b or "+" local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end local cb = adj_decl[typ] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) local formas_ = {} -- necesario crear otro arreglo para no modificar las claves durante la iteración for form,arr in pairs(data.forms) do local pref = match(form, "^(.*)_m$") if pref and not data.forms[pref.."_f"] then formas_[pref.."_f"] = deep_copy(arr) end if pref and not data.forms[pref.."_n"] then formas_[pref.."_n"] = deep_copy(arr) end formas_[form] = arr end data.forms = formas_ if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, adj_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local m = find(args["gen"], "m") local fem = find(args["gen"], "f") local n = find(args["gen"], "n") local forms = sobreescribir_formas(declinfo, args, false, {}, adj_lb) comprobar_defectivo(forms) forms = desactivar_formas(forms, function (form) return (form:find("pl") and nopl) or (form:find("sg") and nosg) or (form:find("m$") and not m) or (form:find("f$") and not fem) or (form:find("n$") and not n) end ) local raiz_m = f(forms["nom_sg_m"][1] or forms["nom_pl_m"][1] or "?") local raiz_f = f(forms["nom_sg_f"][1] or forms["nom_pl_f"][1] or "?") local raiz_n = f(forms["nom_sg_n"][1] or forms["nom_pl_n"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, adj_lb) local t = {} insert(t, {{"Singular", colspan=4}, header=true, color=COLOR_H}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg_m"], forms["nom_sg_f"], forms["nom_sg_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg_m"], forms["gen_sg_f"], forms["gen_sg_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg_m"], forms["dat_sg_f"], forms["dat_sg_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg_m"], forms["acc_sg_f"], forms["acc_sg_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg_m"], forms["abl_sg_f"], forms["abl_sg_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg_m"], forms["voc_sg_f"], forms["voc_sg_n"]}) insert(t, {{"Plural", colspan=4, header=true, color=COLOR_H}}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_pl_m"], forms["nom_pl_f"], forms["nom_pl_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_pl_m"], forms["gen_pl_f"], forms["gen_pl_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_pl_m"], forms["dat_pl_f"], forms["dat_pl_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_pl_m"], forms["acc_pl_f"], forms["acc_pl_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_pl_m"], forms["abl_pl_f"], forms["abl_pl_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_pl_m"], forms["voc_pl_f"], forms["voc_pl_n"]}) insert(t, {{args["nota"] or "", colspan=4}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_m..", "..raiz_f..", "..raiz_n.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local EGO, TU, IS, NOS, VOS, EI = 1, 2, 3, 4, 5, 6 local tostr = {"1", "2", "3", "4", "5", "6"} local PRONOMBRES = {"ego", "tū", "is, ea, id", "nōs", "vōs", "eī, eae, ea"} local PRONOMBRES_SUBJ = {"ut ego", "ut tū", "ut is, ut ea, ut id", "ut nōs", "ut vōs", "ut eī, ut eae, ut ea"} local PRONOMBRES_IMP = {"―", "(tū)", "(is, ea, id)", "―", "(vōs)", "(eī, eae, ea)"} local IMPERSONALES = {"", "", "(id)", "", "", ""} local function obtener_pronombre(forma, impers) local conj, p = match(forma, "^(.*)(%d)$") if not p then return nil end p = tonumber(p) if impers then return IMPERSONALES[p] else if find(conj, "^subj") then return PRONOMBRES_SUBJ[p] end if find(conj, "^imper") then return PRONOMBRES_IMP[p] end return PRONOMBRES[p] end end local sufijos = { ["1"] = { inf_act = {"āre","isse"}, inf_pas = {"ārī"}, part_act = {"āns","ūrus"}, part_pas = {"andus","us"}, ger = {"andī","andō","andum"}, sup = {"um","ū"}, ind_pres = {"ō","ās","at","āmus","ātis","ant"}, ind_imp = {"ābam","ābās","ābat","ābāmus","ābātis","ābant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ābō","ābis","ābit","ābimus","ābitis","ābunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","āris","ātur","āmur","āminī","antur", nil,"āre"}, ind_imp_pas = {"ābar","ābāris","ābātur","ābāmur","ābāminī","ābantur", nil,"ābāre"}, ind_fut_pas = {"ābor","āberis","ābitur","ābimur","ābiminī","ābuntur", nil,"ābere"}, subj_pres = {"em","ēs","et","ēmus","ētis","ent"}, subj_imp = {"ārem","ārēs","āret","ārēmus","ārētis","ārent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"er","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_imp_pas = {"ārer","ārēris","ārētur","ārēmur","ārēminī","ārentur", nil,"ārēre"}, imper_pres = {nil,"ā",nil,nil,"āte",nil}, imper_fut = {nil,"ātō","ātō",nil,"ātōte","antō"}, imper_pres_pas = {nil,"āre",nil,nil,"āminī",nil}, imper_fut_pas = {nil,"ātor","ātor",nil,nil,"antor"}, }, ["2"] = { inf_act = {"ēre","isse"}, inf_pas = {"ērī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"eō","ēs","et","ēmus","ētis","ent"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ēbō","ēbis","ēbit","ēbimus","ēbitis","ēbunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"eor","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ēbor","ēberis","ēbitur","ēbimur","ēbiminī","ēbuntur", nil,"ēbere"}, subj_pres = {"eam","eās","eat","eāmus","eātis","eant"}, subj_imp = {"ērem","ērēs","ēret","ērēmus","ērētis","ērent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ear","eāris","eātur","eāmur","eāminī","eantur", nil,"eāre"}, subj_imp_pas = {"ērer","ērēris","ērētur","ērēmur","ērēminī","ērentur", nil,"ērēre"}, imper_pres = {nil,"ē",nil,nil,"ēte",nil}, imper_fut = {nil,"ētō","ētō",nil,"ētōte","entō"}, imper_pres_pas = {nil,"ēre",nil,nil,"ēminī",nil}, imper_fut_pas = {nil,"ētor","ētor",nil,nil,"entor"}, }, ["3"] = { -- 3 (comparar [[capio]] con [[lego]], las raíces con capi- y leg- pero hay que eliminar la doble ii) inf_act = {"ere","isse"}, inf_pas = {"ī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", nil,"ere"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_pres = {"am","ās","at","āmus","ātis","ant"}, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", nil,"āre"}, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", nil,"erēre"}, imper_pres = {nil,"e",nil,nil,"ite",nil}, imper_fut = {nil,"itō","itō",nil,"itōte","untō"}, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil}, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor"}, }, ["3/4"] = { inf_act = {"ere","isse","īre","isse"}, inf_pas = {"ī","īrī"}, part_act = {"ēns","iēns","ūrus"}, part_pas = {"endus","iendus","us"}, ger = {"endī","endō","endum","iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt", "iō","īs",nil,"īmus","ītis","iunt" }, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant", "iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant" }, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent", "iam","iēs","iet","iēmus","iētis","ient" }, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", "ior","ere","ītur","īmur","īminī","iuntur", nil,"īris",nil,nil,nil,nil, nil,"īre" }, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", "iēbar","ēbāre","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāris",nil,nil,nil,nil, nil,"iēbāre" }, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", "iar","ēre","iētur","iēmur","iēminī","ientur", nil,"iēris",nil,nil,nil,nil, nil,"iēre" }, subj_pres = {"am","ās","at","āmus","ātis","ant", "iam","iās","iat","iāmus","iātis","iant", }, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent", "īrem","īrēs","īret","īrēmus","īrētis","īrent" }, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", "iar","āre","iātur","iāmur","iāminī","iantur", nil,"iāris",nil,nil,nil,nil, nil,"iāre" }, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", "īrer","erēre","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēris",nil,nil,nil,nil, nil,"īrēre" }, imper_pres = {nil,"e",nil,nil,"ite",nil, nil,"ī",nil,nil,"īte",nil }, imper_fut = {nil,"itō","itō",nil,"itōte","untō", nil,"ītō","ītō",nil,"ītōte","iuntō" }, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil, nil,"īre",nil,nil,"īminī",nil }, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor", nil,"ītor","ītor",nil,nil,"iuntor" }, }, ["4"] = { inf_act = {"īre","isse"}, inf_pas = {"īrī"}, part_act = {"iēns","ūrus"}, part_pas = {"iendus","us"}, ger = {"iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"iō","īs","it","īmus","ītis","iunt"}, ind_imp = {"iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"iam","iēs","iet","iēmus","iētis","ient"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"ior","īris","ītur","īmur","īminī","iuntur", nil,"īre"}, ind_imp_pas = {"iēbar","iēbāris","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāre"}, ind_fut_pas = {"iar","iēris","iētur","iēmur","iēminī","ientur", nil,"iēre"}, subj_pres = {"iam","iās","iat","iāmus","iātis","iant"}, subj_imp = {"īrem","īrēs","īret","īrēmus","īrētis","īrent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"iar","iāris","iātur","iāmur","iāminī","iantur", nil,"iāre"}, subj_imp_pas = {"īrer","īrēris","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēre"}, imper_pres = {nil,"ī",nil,nil,"īte",nil}, imper_fut = {nil,"ītō","ītō",nil,"ītōte","iuntō"}, imper_pres_pas = {nil,"īre",nil,nil,"īminī",nil}, imper_fut_pas = {nil,"ītor","ītor",nil,nil,"iuntor"}, } } local formas_no_personales = { inf_act = true, inf_pas = true, part_act = true, part_pas = true, ger = true, sup = true, } local formas_personales = { ind_pres = true, ind_imp = true, ind_perf = true, ind_pluperf = true, ind_fut = true, ind_fut_perf = true, ind_fut_sig = true, ind_pres_pas = true, ind_imp_pas = true, ind_fut_pas = true, subj_pres = true, subj_imp = true, subj_perf = true, subj_pluperf = true, subj_aor_sig = true, subj_pres_pas = true, subj_imp_pas = true, imper_pres = true, imper_fut = true, imper_pres_pas = true, imper_fut_pas = true, } local formas = merge(formas_no_personales, formas_personales) local verbos_irregulares = { {"aiō", {"aiō", "aiiō", "aijō", "ajō"}, { desactivar = {"inf_pas","part_pas","ger","sup","ind_pluperf","ind_fut","ind_fut_perf", "ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_perf","subj_pluperf","subj_pres_pas", "subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {"ai"}, nucleoperf = {"a"}, nucleosup = {}, nucleosigm = {}, inf_act = {"aiere"}, ind_pres = {nil,nil,nil,{}}, ind_perf = {{},nil,nil,{},{}}, subj_pres = {nil,nil,nil,{},{}}, subj_imp = {{},{},nil,{},{},{}}, imper_pres = {{},{"ai"},{},{},{},{}}, }}, {"cedo", {"cedo"}, { desactivar = {"inf_act","inf_pas","part_act","part_pas","ger","sup","ind_pluperf","ind_pres","ind_imp","ind_perf", "ind_fut","ind_fut_perf","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres","subj_imp","subj_perf", "subj_pluperf","subj_pres_pas","subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, imper_pres = {nil,{"cedo"},nil,nil,{"cette","cedile"},nil}, }}, {"dīcō", {"dīcō"}, { conj = "3", nucleopres = {"dīc"}, nucleoperf = {"dīx"}, nucleosup = {"dict"}, nucleosigm = {"dīx"}, desactivar = {}, part_pas = {"dīcendus", "dīcundus", "dictus"}, imper_pres = {nil, {"dīc", "dīce"}}, inf_pas = {"dīcī", "dīcier{L}"}, }}, {"dō", {"dō"}, { conj = "1", nucleopres = {"d"}, nucleoperf = {"ded"}, nucleosup = {"dat"}, nucleosigm = {}, desactivar = {}, inf_act = {"dare","dedisse"}, inf_pas = {"darī"}, ind_pres = {nil,nil,nil,{"damus"},{"datis"},nil}, ind_imp = {{"dabam"},{"dabās"},{"dabat"},{"dabāmus"},{"dabātis"},{"dabant"}}, ind_fut = {{"dabō"},{"dabis"},{"dabit"},{"dabimus"},{"dabitis"},{"dabunt"}}, ind_imp_pas = {{"dabar"},{"dabāris","dabāre"},{"dabātur"},{"dabāmur"},{"dabāminī"},{"dabantur"}}, ind_fut_pas = {{"dabor"},{"daberis","dabere"},{"dabitur"},{"dabimur"},{"dabiminī"},{"dabuntur"}}, subj_imp = {{"darem"},{"darēs"},{"daret"},{"darēmus"},{"darētis"},{"darent"}}, subj_imp_pas = {{"darer"},{"darēris","darēre"},{"darētur"},{"darēmur"},{"darēminī"},{"darentur"}}, imper_pres = {nil,nil,nil,nil,{"date"},nil}, imper_fut = {nil,{"datō"},{"datō"},nil,{"datōte"},{"dantō"}}, imper_pres_pas = {nil,{"dare"},nil,nil,{"daminī"},nil}, imper_fut_pas = {nil,{"dator"},{"dator"},nil,nil,{"dator"}}, }}, {"dūcō", {"dūcō"}, { conj = "3", nucleopres = {"dūc"}, nucleoperf = {"dūx"}, nucleosup = {"duct"}, nucleosigm = {}, desactivar = {}, imper_pres = {nil, {"dūc", "dūce"}}, }}, {"edō", {"edō", "ëdō"}, { conj = "3", nucleopres = {"ed"}, nucleoperf = {"ed"}, nucleosup = {""}, nucleosigm = {}, desactivar = {}, inf_act = {"edere","ēsse"}, part_act = {"edēns","ēsūrus","ēssūrus","ēstūrus"}, part_pas = {"edendus","edundus","ēsus","ēssus","ēstus"}, sup = {"ēsum","ēssum","ēstum","ēsū","ēssū","ēstū"}, ind_pres = {nil,{"edis","ēs"},{"edit","ēst"},nil,{"editis","ēstis"},nil}, ind_pres_pas = {nil,{"ederis","edere","ēssis","ēsse"},{"editur","ēstur"}}, subj_pres = {{"edam","edim"},{"edās","edīs"},{"edat","edit","ēst"},{"edāmus","edīmus"},{"edātis","edītis"},{"edant","edint"}}, subj_imp = {{"ederem","ēssem"},{"ederēs","ēssēs"},{"ederet","ēsset"},{"ederēmus","ēssēmus"},{"ederētis","ēssētis"},{"ederent","ēssent"}}, subj_imp_pas = {{"ederer","ēsser"},{"ederēris","ederēre","ēssēris","ēssēre"},{"ederetur","ēssetur"},{"ederēmur","ēssēmur"},{"ederēminī","ēssēminī"},{"ederentur","ēssentur"}}, imper_pres = {nil,{"ede","ēs"},nil,nil,{"edite","ēste"},nil}, imper_fut = {nil,{"editō","ēstō"},{"editō","ēstō"},nil,{"editōte","ēstōte"},{"eduntō"}}, imper_pres_pas = {nil,{"edere","ēsse"},nil,nil,{"ediminī"},nil}, imper_fut_pas = {nil,{"editor","ēstor"},{"editor","ēstor"},nil,nil,{"eduntor"}}, }}, {"eō", {"eō", "ëō"}, { conj = "4", nucleopres = {""}, nucleoperf = {""}, nucleosup = {""}, nucleosigm = {}, desactivar = {"imper_pres_pas"}, inf_act = {"īre","īsse","iisse","īvisse"}, inf_pas = {"īrī","īrier"}, part_act = {"iēns","itūrus"}, part_pas = {"eundum","itum"}, ger = {"eundī","eundō","eundum"}, sup = {"itum","itū"}, ind_pres = {{"eō"},{"īs"},{"it"},{"īmus"},{"ītis"},{"eunt"}}, ind_imp = {{"ībam"},{"ībās"},{"ībat"},{"ībāmus"},{"ībātis"},{"ībant"}}, ind_perf = {{"iī","īvī"},{"īstī","iistī","īvistī"},{"iit","īvit"},{"iimus","īvimus"},{"īstis","iistis","īvistis"},{"iērunt","iēre","īvērunt","īvēre"}}, ind_pluperf = {{"ieram","īveram"},{"ierās","īverās"},{"ierat","īverat"},{"ierāmus","īverāmus"},{"ierātis","īverātis"},{"ierant","īverant"}}, ind_fut = {{"ībō"},{"ībis"},{"ībit"},{"ībimus"},{"ībitis"},{"ībunt"}}, ind_fut_perf = {{"ierō","īverō"},{"ieris","īveris"},{"ierit","īverit"},{"ierimus","īverimus"},{"ieritis","īveritis"},{"ierint","īverint"}}, ind_fut_sig = {nil,nil,nil,nil,nil,nil}, ind_pres_pas = {{},{},{"ītur"},{},{},{}}, ind_imp_pas = {{},{},{"ībātur"},{},{},{}}, ind_fut_pas = {{},{},{"ībitur"},{},{},{}}, subj_pres = {{"eam"},{"eās"},{"eat"},{"eāmus"},{"eātis"},{"eant"}}, subj_imp = {{"īrem"},{"īrēs"},{"īret"},{"īrēmus"},{"īrētis"},{"īrent"}}, subj_perf = {{"ierim","īverim"},{"ierīs","īverīs"},{"ierit","īverit"},{"ierīmus","īverīmus"},{"ierītis","īverītis"},{"ierint","īverint"}}, subj_pluperf = {{"īssem","iissem","īvissem"},{"īssēs","iissēs","īvissēs"},{"īsset","iisset","īvisset"},{"īssēmus","iissēmus","īvissēmus"},{"īssētis","iissētis","īvissētis"},{"īssent","iissent","īvissent"}}, subj_aor_sig = {nil,nil,nil,nil,nil,nil}, subj_pres_pas = {{},{},{"eātur"},{},{},{}}, subj_imp_pas = {{},{},{"īrētur"},{},{},{}}, imper_pres = {nil,nil,nil,nil,nil,nil}, imper_fut = {nil,nil,nil,nil,nil,{"euntō"}}, imper_fut_pas = {nil,{},nil,nil,nil,{}}, }}, {"faciō", {"faciō"}, { conj = "3", I = true, inf_act = {"facere", "fāre{L}", "fēcisse"}, inf_pas = {"fierī"}, part_pas = {"faciendus", "faciundus", "factus"}, nucleopres = {"fac"}, nucleoperf = {"fēc"}, nucleosup = {"fact"}, nucleosigm = {"fax","faxs","facs"}, desactivar = {}, ind_pres_pas = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, ind_imp_pas = {{"fīēbam"},{"fīēbās"},{"fīēbat"},{"fīēbāmus"},{"fīēbātis"},{"fīēbant"}}, ind_fut_pas = {{"fīam"},{"fīēs"},{"fīet"},{"fīēmus"},{"fīētis"},{"fīent"}}, subj_pres_pas = {{"fīam"},{"fīās"},{"fīat"},{"fīāmus"},{"fīātis"},{"fīant"}}, subj_imp_pas = {{"fierem"},{"fierēs"},{"fieret"},{"fierēmus"},{"fierētis"},{"fierent"}}, imper_pres = {nil,{"fac","face"},nil,nil,nil,nil}, imper_pres_pas = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut_pas = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"ferō", {"ferō"}, { conj = "3", nucleopres = {"fer"}, nucleoperf = {"tul", "tetul{†}"}, nucleosup = {"lāt"}, nucleosigm = {}, desactivar = {}, inf_act = {"ferre", "tulisse", "tetulisse{†}"}, inf_pas = {"ferrī"}, ind_pres = {nil,{"fers"},{"fert"},nil,{"fertis"}}, ind_pres_pas = {nil,{"ferris","ferre"}}, subj_imp = {{"ferrem"},{"ferrēs"},{"ferret"},{"ferrēmus"},{"ferrētis"},{"ferrent"}}, subj_imp_pas = {{"ferrer"},{"ferrēris","ferrēre"},{"ferrētur"},{"ferrēmur"},{"ferrēminī"},{"ferrentur"}}, imper_pres = {nil,{"fer"},nil,nil,{"ferte"},nil}, imper_pres_pas = {nil,{"ferre"},nil,nil,nil,nil}, imper_fut = {nil,{"fertō"},{"fertō"},nil,{"fertōte"},{"feruntō"}}, imper_fut_pas = {nil,{"fertor"},{"fertor"},nil,nil,nil}, }}, {"fīō", {"fīō"}, { conj = "3", nucleopres = {"fī"}, nucleoperf = {}, nucleosup = {"fact"}, nucleosigm = {}, semidep = true, desactivar = {}, inf_act = {"fierī"}, ind_pres = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, imper_pres = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"inquam", {"inquam"}, { conj = "3", I = true, nucleopres = {"inqu"}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, nopasivo = true, desactivar = {"inf_act","inf_pas","part_pas","ger"}, ind_pres = {{"inquam"}}, }}, {"possum", {"possum"}, { conj = "3", nucleopres = {"pot"}, nucleoperf = {"pot"}, nucleosup = {}, nucleosigm = {}, pres = "possō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"posse","potesse{†}"}, part_act = {"potēns"}, ind_pres = {{"possum"},{"potes"},{"potest"},{"possumus"},{"potestis"},{"possunt"}}, ind_imp = {{"poteram"},{"poterās"},{"poterat"},{"poterāmus"},{"poterātis"},{"poterant"}}, ind_fut = {{"poterō"},{"poteris","potere"},{"poterit"},{"poterimus"},{"poteritis"},{"poterunt"}}, ind_perf = {{"potuī"},{"potuistī"},{"potuit"},{"potuimus"},{"potuistis"},{"potuērunt","potuēre"}}, ind_pluperf = {{"potueram"},{"potuerās"},{"potuerat"},{"potuerāmus"},{"potuerātis"},{"potuerant"}}, ind_fut_perf = {{"potuerō"},{"potueris"},{"potuerit"},{"potuerimus"},{"potueritis"},{"potuerunt"}}, subj_pres = {{"possem"},{"possēs"},{"possēt"},{"possēmus"},{"possētis"},{"possent"}}, subj_imp = {{"possim"},{"possīs"},{"possit"},{"possīmus"},{"possītis"},{"possint"}}, subj_perf = {{"potuerim"},{"potuerīs"},{"potuerit"},{"potuerīmus"},{"potuerītis"},{"potuerint"}}, subj_pluperf = {{"potuissem"},{"potuissēs"},{"potuisset"},{"potuissēmus"},{"potuissētis"},{"potuissent"}}, }}, {"sum", {"sum"}, { conj = "3", nucleopres = {"s"}, nucleoperf = {"fu"}, nucleosup = {}, nucleosigm = {}, pres = "sō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres_pas","imper_fut_pas"}, inf_act = {"esse"}, part_act = {"futūrus"}, ind_pres = {{"sum"},{"es"},{"est"},{"sumus"},{"estis"},{"sunt"}}, ind_imp = {{"eram"},{"erās"},{"erat"},{"erāmus"},{"erātis"},{"erant"}}, ind_fut = {{"erō"},{"eris","ere"},{"erit"},{"erimus"},{"eritis"},{"erunt"}}, subj_pres = {{"sim","siem","fuam{†}"},{"sīs","siēs","fuās{†}"},{"sit","siet","fuat{†}"},{"sīmus","siēmus","fuāmus{†}"},{"sītis","siētis","fuātis{†}"},{"sint","sient","fuant{†}"}}, subj_imp = {{"essem","forem"},{"essēs","forēs"},{"esset","foret"},{"essēmus","forēmus"},{"essētis","forētis"},{"essent","forent"}}, imper_pres = {nil,{"es"},nil,nil,{"este"},nil}, imper_fut = {nil,{"estō"},{"estō"},nil,{"estōte"},nil}, }}, {"mālō", {"mālō"}, { conj = "3", nucleopres = {"māl"}, nucleoperf = {"mālu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"mālle","māluisse"}, ind_pres = {{"mālō"},{"māvīs"},{"māvult"},{"mālumus"},{"māvultis"},{"mālunt"}}, subj_pres = {{"mālim"},{"mālīs"},{"mālit"},{"mālīmus"},{"mālītis"},{"mālint"}}, subj_imp = {{"māllem"},{"māllēs"},{"māllet"},{"māllēmus"},{"māllētis"},{"māllent"}}, }}, {"nōlō", {"nōlō"}, { conj = "3", nucleopres = {"nōl"}, nucleoperf = {"nōlu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"nōlle","nōluisse"}, ind_pres = {{"nōlō"},{"nōn vīs","nevīs{†}"},{"nōn vult","nōn volt","nevolt{†}"},{"nōlumus"},{"nōn vultis","nōn voltis","nōltis{†}"},{"nōlunt"}}, subj_pres = {{"nōlim"},{"nōlīs"},{"nōlit"},{"nōlīmus"},{"nōlītis"},{"nōlint"}}, subj_imp = {{"nōllem"},{"nōllēs"},{"nōllet"},{"nōllēmus"},{"nōllētis"},{"nōllent"}}, }}, {"volō", {"volō"}, { conj = "3", nucleopres = {"vol"}, nucleoperf = {"volu"}, nucleosup = {"volit"}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"velle","voluisse"}, ind_pres = {{"volō"},{"vīs"},{"vult","volt{†}"},{"volumus"},{"vultis","voltis{†}"},{"volunt"}}, subj_pres = {{"velim","volim{†}"},{"velīs","volīs{†}"},{"velit","volit{†}"},{"velīmus","volīmus{†}"},{"velītis","volītis{†}"},{"velint","volint{†}"}}, subj_imp = {{"vellem"},{"vellēs"},{"vellet"},{"vellēmus"},{"vellētis"},{"vellent"}}, }}, } local function combinar_prefijo_nucleosufijo(prefijo, nucleosufijo) return prefijo..nucleosufijo end local function combinar_nucleo_sufijo(nucleo, sufijo, agregar_i) if agregar_i and (not find(sufijo, "^[iī]")) and (sufijo ~= "e") and (not find(sufijo, "^er")) then return nucleo.."~i~"..sufijo end return nucleo..sufijo end local function agregar_forma(conjugado, conjinfo, forma) conjinfo[forma] = conjinfo[forma] or {} local sufijos_ = sufijos[conjinfo.conj][forma] local nucleos local prefijo if forma == "sup" then nucleos = conjinfo.nucleosup prefijo = conjinfo.prefijosup or conjinfo.prefijo elseif find(forma, "sig") then nucleos = conjinfo.nucleosigm prefijo = conjinfo.prefijosigm or conjinfo.prefijo elseif find(forma, "perf") then nucleos = conjinfo.nucleoperf prefijo = conjinfo.prefijoperf or conjinfo.prefijo else nucleos = conjinfo.nucleopres prefijo = conjinfo.prefijo end if formas_no_personales[forma] then if conjinfo[forma][1] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma]) do insert_if_not(conjugado[forma], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else for _, sufijo in ipairs(sufijos_) do local nucleos_ = nucleos if forma == "inf_act" and sufijo == "isse" then nucleos_ = conjinfo.nucleoperf elseif forma == "part_act" and sufijo == "ūrus" then nucleos_ = conjinfo.nucleosup elseif forma == "part_pas" and sufijo == "us" then nucleos_ = conjinfo.nucleosup end local agregar_i = conjinfo.I and nucleos_ == conjinfo.nucleopres for _,nucleo in ipairs(nucleos_) do insert_if_not(conjugado[forma], combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(nucleo, sufijo, agregar_i))) end end end return end for i = EGO, EI do local p = tostr[i] if conjinfo[forma][i] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma][i]) do insert_if_not(conjugado[forma..p], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else local k = i while sufijos_[k] do local agregar_i = conjinfo.I and nucleos == conjinfo.nucleopres for j, n in ipairs(nucleos) do local x = combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(n, sufijos_[k], agregar_i)) if conjinfo.always_sync_perf and (forma == "ind_perf" or forma == "ind_pluperf" or forma == "ind_fut_perf" or forma == "subj_perf" or forma == "subj_pluperf") then x = x:gsub("īvī", "iī") x = x:gsub("īvi", "ī") x = x:gsub("īve", "ī") x = x:gsub("īvē", "ē") end insert_if_not(conjugado[forma..p], x) end k = k + 6 end end end end local function get_subtype_by_ending(pres, conjinfo, specs) for _, spec in ipairs(specs) do local base = extract_base(pres, spec[1]) if base then for _,s in ipairs(spec[2]) do if conjinfo[s] == nil then conjinfo[s] = true end end return base end end error("Unrecognized ending for conjugation " .. conjinfo["conj"]) end local function detect_v_type_and_subtypes(conjinfo) local pres = conjinfo["v"] local conj_arg = conjinfo["conj"] pres = toNFC(pres) local base_conj_arg, auto_perf_supine = conj_arg:match("^([124]/?4?)(%+%+?)$") if base_conj_arg then if auto_perf_supine == "++" and base_conj_arg ~= "4" then error("Conjugation types 1++ and 2++ not allowed") end conj_arg = base_conj_arg end conjinfo.conj = conj_arg if conj_arg == "1" then local base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"at", {"impers"}}, {"ātur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "āv" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "āt" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "āss" end end elseif conj_arg == "2" then local base = get_subtype_by_ending(pres, conjinfo, { {"eō", {}}, {"eor", {"dep"}}, {"et", {"impers"}}, {"ētur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "u" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "it" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3" then local base if conjinfo.I == false then -- si explícitamente se indicó que no es del tipo -io, hay que excluir sufijos base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) else base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) end if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end assert(conjinfo["nucleoperf"][1], "especifique todos los núcleos para verbos de la tercera conjugación") assert(conjinfo["nucleosup"][1], "especifique todos los núcleos para verbos de la tercera conjugación") if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3/4" then local base base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "4" then local base = get_subtype_by_ending(pres, conjinfo, { {"iō", {}}, {"ior", {"dep"}}, {"it", {"impers"}}, {"ītur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "irreg" then for _,p in ipairs(verbos_irregulares) do for _,rx in ipairs(p[2]) do local pref, verb = match(conjinfo.v, "^(.*)("..rx..")$") if verb then conjinfo.v = verb conjinfo.prefijo = pref if conjinfo.nucleoperf[1] and conjinfo.nucleoperf[1] ~= "-" then -- [[ecfero]] conjinfo.prefijoperf = conjinfo.nucleoperf[1] conjinfo.nucleoperf = {} end if conjinfo.nucleosup[1] and conjinfo.nucleosup[1] ~= "-" then conjinfo.prefijosup = conjinfo.nucleosup[1] conjinfo.nucleosup = {} end if conjinfo.nucleosigm[1] and conjinfo.nucleosigm[1] ~= "-" then conjinfo.prefijosigm = conjinfo.nucleosigm[1] conjinfo.nucleosigm = {} end conjinfo.irreg = true error(p[3].conj) conjinfo.conj = p[3].conj for k,val in pairs(p[3]) do if not conjinfo[k] or (type(conjinfo[k]) == "table" and not conjinfo[k][1]) then conjinfo[k] = deep_copy(val) end end return conjinfo end end end error("Unrecognized conjugation '" .. conj_arg .. "'") else error("Unrecognized conjugation '" .. conj_arg .. "'") end return conjinfo end function export.v(frame) local title_ = mw.title.getCurrentTitle() local tit = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {alias_de = "conj"}, [2] = {alias_de = "pres"}, [3] = {alias_de = "nucleoperf"}, [4] = {alias_de = "nucleosup"}, [5] = {alias_de = "nucleosigm"}, ["impers"] = {}, -- pas para formas pasivas solamente ["impersonal"] = {alias_de = "impers"}, ["dep"] = {tipo="bool"}, ["depon"] = {alias_de="dep"}, ["deponente"] = {alias_de="dep"}, ["semidep"] = {tipo="bool"}, ["semidepon"] = {alias_de="semidep"}, ["semideponente"] = {alias_de="semidep"}, ["sigm"] = {tipo="bool"}, ["nopasivo"] = {tipo="bool"}, ["soloperf"] = {tipo="bool"}, ["I"] = {tipo="bool"}, ["p3inf"] = {tipo="bool"}, -- sin uso ["poet_sync_perf"] = {tipo="bool"}, -- sin uso ["always_sync_perf"] = {tipo="bool"}, -- solo en [[saevio]] ["conj"] = {requerido=true}, ["pres"] = {requerido=true}, ["nucleopres"] = {lista = true}, ["nucleoperf"] = {lista = true}, ["nucleosup"] = {lista = true}, ["nucleosigm"] = {lista = true}, ["núcleopres"] = {alias_de="nucleopres"}, ["núcleoperf"] = {alias_de="nucleoperf"}, ["núcleosup"] = {alias_de="nucleosup"}, ["paradigma"] = {lista = true}, ["desactivarnucleos"] = {tipo="bool", por_defecto=true}, -- para [[-o]] ["nota"] = {}, } local conjugado = {} for forma,_ in pairs(formas_no_personales) do params[forma] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma] = {} end for forma,_ in pairs(formas_personales) do for i,s in ipairs(tostr) do params[forma..s] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma..s] = {} if i == 1 then params[forma] = {alias_de=forma..s} end end end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) assert(not find(tit, " "), "locuciones no soportadas aún") assert(not (args["dep"] and args["semidep"]), "un verbo no puede ser deponente y semideponente a la vez") local conjinfo = { conj = args.conj, prefijo="", v=args.pres, desactivar = {}, dep=args.dep, semidep=args.semidep, sigm=args.sigm, impers=args.impers, nopasivo=args.nopasivo, soloperf=args.soloperf, I=args.I, p3inf=args.p3inf, poet_sync_perf=args.poet_sync_perf, -- sin uso always_sync_perf=args.always_sync_perf, nucleopres = deep_copy(args.nucleopres), nucleoperf = deep_copy(args.nucleoperf), nucleosup = deep_copy(args.nucleosup), nucleosigm = deep_copy(args.nucleosigm) } conjinfo = detect_v_type_and_subtypes(conjinfo) if conjinfo.impers == true then conjinfo.impers = "3" end -- no puede ir conjinfo acá abajo porque si es un sufijo va a quedar "-" en la raíz, lo que anularía todas las formas conjugadas, tiene que venir directo de args if args.desactivarnucleos then if args.nucleopres[1] == "-" then conjinfo.nucleopres = {} end if args.nucleoperf[1] == "-" then conjinfo.nucleoperf = {} end if args.nucleosup[1] == "-" then conjinfo.nucleosup = {} end if args.nucleosigm[1] == "-" then conjinfo.nucleosigm = {} end end local es_irregular = conjinfo.irreg for _,d in ipairs(conjinfo.desactivar) do if formas_no_personales[d] then args[d] = {"no"} else args[d.."2"] = {"no"} end end for forma,_ in pairs(formas) do agregar_forma(conjugado, conjinfo, forma) end local resultante = sobreescribir_formas(conjugado, args) local mostrar_fut_sig = #resultante["ind_fut_sig1"] > 0 local mostrar_aor_sig = #resultante["subj_aor_sig1"] > 0 local defectivo = comprobar_defectivo(resultante, {"^imper", "_sig"}, tostr) local defect2 resultante, defect2 = desactivar_formas(resultante, function (form) return (conjinfo.nopasivo and form:find("_pas")) or (conjinfo.soloperf and not form:find("perf")) or (conjinfo.impers == "pas" and form:find("_pas[^3]")) or (conjinfo.impers == "pas3" and form:find("_pas[^3]")) or (conjinfo.impers == "pas36" and form:find("_pas[^36]")) end ) if defect2 then defectivo = true end -- por ahora innecesario -- local part_no_adj = {} -- for _,e in ipairs(resultante.part) do -- if (find(e, 'PART') or not find(e, 'ADJ')) and not find(e, "†") then -- insert(part_no_adj, gsub1(e, '%b{}', '')) -- end -- end local tit_pres = f(resultante["ind_pres1"][1] or "―") local tit_inf = f(resultante["inf_act"][1] or "―") local tit_perf = f(resultante["ind_perf1"][1] or "―") local tit_sup = f(resultante["sup"][1] or "―") resultante = agregar_enlaces(resultante, tit, normalizar_enlace) local es_impersonal = conjinfo.impers resultante = formatear_formas(resultante, function (x) return obtener_pronombre(x, es_impersonal) end) local impers = conjinfo.impers local cs, cs1, cs2, fila_pronombres_ind, fila_pronombres_subj, fila_pronombres_imper, mostrar_imper if impers == "3" then fila_pronombres_ind = {"", "(id)", color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", "(quod id)", color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", "(id)", color=COLOR_IMPER, header=true, class="pc"} cs = 2 elseif impers == "36" then error("no soportado actualmente") cs = 3 else fila_pronombres_ind = {"", PRONOMBRES[1], PRONOMBRES[2], PRONOMBRES[3], PRONOMBRES[4], PRONOMBRES[5], PRONOMBRES[6], color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", PRONOMBRES_SUBJ[1], PRONOMBRES_SUBJ[2], PRONOMBRES_SUBJ[3], PRONOMBRES_SUBJ[4], PRONOMBRES_SUBJ[5], PRONOMBRES_SUBJ[6], color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", PRONOMBRES_IMP[1], PRONOMBRES_IMP[2], PRONOMBRES_IMP[3], PRONOMBRES_IMP[4], PRONOMBRES_IMP[5], PRONOMBRES_IMP[6], color=COLOR_IMPER, header=true, class="pc"} cs = 7 mostrar_imper = true end cs1 = cs -- math.floor(cs / 2) -- cs2 = cs - cs1 local t = {} insert(t, {{"Formas no personales (verboides)", colspan=cs}, color=COLOR_H, header=true}) if impers == "3" then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else resultante.inf_act.colspan = cs1-1 resultante.inf_pas.colspan = cs1-1 resultante.part_act.colspan = cs1-1 resultante.part_pas.colspan = cs1-1 resultante.ger.colspan = cs1-1 resultante.sup.colspan = cs1-1 if conjinfo.dep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) elseif conjinfo.semidep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) end end local function ic(tiempo) if impers == "3" then return resultante[tiempo.."3"] elseif impers == "36" then return resultante[tiempo.."3"], resultante[tiempo.."6"] end return resultante[tiempo.."1"], resultante[tiempo.."2"], resultante[tiempo.."3"], resultante[tiempo.."4"], resultante[tiempo.."5"], resultante[tiempo.."6"] end insert(t, {{"Formas personales", colspan=cs}, color=COLOR_H, header=true}) insert(t, {{"Modo indicativo", colspan=cs}, color=COLOR_IND, header=true}) insert(t, fila_pronombres_ind) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end else insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) insert(t, {{"Pretérito perfecto", color=COLOR_IND, header=true}, ic("ind_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_IND, header=true}, ic("ind_pluperf")}) insert(t, {{"Futuro perfecto", color=COLOR_IND, header=true}, ic("ind_fut_perf")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) end insert(t, {{"Modo subjuntivo", colspan=cs}, color=COLOR_SUBJ, header=true}) insert(t, fila_pronombres_subj) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end else insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) insert(t, {{"Pretérito perfecto", color=COLOR_SUBJ, header=true}, ic("subj_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_SUBJ, header=true}, ic("subj_pluperf")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) end insert(t, {{"Modo imperativo", colspan=cs}, color=COLOR_IMPER, header=true}) insert(t, fila_pronombres_imper) if mostrar_imper then if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) else insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) insert(t, {{"Presente pasivo", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) end else insert(t, {{"Como verbo "..(impers == "3" and "impersonal" or "terciopersonal")..", ''"..tit.."'' CARECE de imperativo", color=COLOR_IMPER, header=true, colspan=cs}}) end insert(t, {{f("Leyenda: † arcaico, x no normativo, ~■~ cambio ortográfico, #■# irregularidad"), colspan=cs}}) args["nota"] = args["nota"] or "" if conjinfo.impers == "utc3" then args["nota"] = args["nota"].." NOTA: se usa también como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "umc3" then args["nota"] = args["nota"].." NOTA: se usa más como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "utc36" then args["nota"] = args["nota"].." NOTA: se usa también como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "umc36" then args["nota"] = args["nota"].." NOTA: se usa más como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "pas" or conjinfo.imeprs == "pas3" then args["nota"] = args["nota"].." NOTA: impersonal para las formas pasivas" end if conjinfo.impers == "pas36" then args["nota"] = args["nota"].." NOTA: formas pasivas terciopersonales (solamente tercera persona singular y plural)" end if conjinfo.soloperf then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas del perfecto y pluscuamperfecto con valor de presente, imperfecto o futuro" end if conjinfo.nopasivo then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas activas" end insert(t, {{args["nota"] and args["nota"] or "", colspan=cs}}) local cats = {} local subtits = {} local conj_str if conjinfo.conj == "1" then conj_str = "primera conjugación" elseif conjinfo.conj == "2" then conj_str = "segunda conjugación" elseif conjinfo.conj == "3" then conj_str = "tercera conjugación" elseif conjinfo.conj == "3/4" then conj_str = "tercera/cuarta conjugación" else conj_str = "cuarta conjugación" end insert(cats, "LA:Verbos de la "..conj_str) insert(subtits, conj_str) impers = impers or "" if impers == "3" or find(impers, "^u[tm]c3$") then insert(subtits, "impersonal") insert(cats, "LA:Verbos impersonales") end if defectivo then insert(subtits, "defectivo") insert(cats, "LA:Verbos defectivos") end if conjinfo.dep then insert(subtits, "deponente") insert(cats, "LA:Verbos deponentes") end if conjinfo.semidep then insert(subtits, "semideponente") insert(cats, "LA:Verbos semideponentes") end if es_irregular then insert(subtits, "irregular") insert(cats, "LA:Verbos irregulares") else insert(subtits, "regular") insert(cats, "LA:Verbos regulares") end return renderizar_tabla( frame, "'''Conjugación de ''"..tit_pres..", "..tit_inf..", "..tit_perf..", "..tit_sup.."'''''&emsp;&emsp;("..concat(subtits, ", ")..")", t, ns == 0 and cats or {}) end function export.adv(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { ["n"] = {}, ["nota"] = {alias_de = "n"}, ["comp"] = {lista = true}, ["comparativo"] = {alias_de = "comp"}, ["compnota"] = {lista = true}, ["sup"] = {lista = true}, ["superlativo"] = {alias_de = "sup"}, ["supnota"] = {lista = true}, } local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local head = args[1] local modo = args[2] local enc local cats = {} local cat_pref = "LA:Adverbios" if modo == "-" then enc = "sin comparativo ni superlativo" insert(cats, cat_pref.." incomparables") return renderizar_encabezado( frame, head, enc, args["n"], {}, ns == 0 and cats or {}, normalizar_enlace ) end local flex = {comp={},sup={}} local stem for _, suff in ipairs{"iter", "nter", "ter", "er", "iē", "ē", "rā", "im", "ō"} do stem = match(head, "^(.*)" .. suff .. "$") if stem ~= nil then local comp_suff, sup_suff = "ius", "issimē" if suff == "nter" then stem = stem .. "nt" end if suff == "rā" then comp_suff = "er" .. comp_suff sup_suff = "imē" end insert(flex.comp, stem .. comp_suff) insert(flex.sup, stem .. sup_suff) break end end if not stem and not args.comp[1] and not args.sup[1] then error("Unrecognized adverb type, recognized types are “-ē”, “-er”, “-ter”, “-iter”, “-im”, or “-ō”, “-ra” or specify irregular forms or “-” if incomparable.") end local formas, irr = sobreescribir_formas(flex, args) if args["comp"][1] == "no" then enc = "sin comparativo" insert(cats, cat_pref.." sin comparativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) elseif args["sup"][1] == "no" then enc = "sin superlativo" insert(cats, cat_pref.." sin superlativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end if irr then enc = f("#irregular#") insert(cats, cat_pref.." irregulares") end return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}, {"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end return export 1iicr2j0pe9qx7uy0lyejhrs13ngicx 6123558 6123556 2026-07-25T05:23:56Z Tmagc 158167 6123558 Scribunto text/plain -- FLEXIÓN DEL LATÍN -- Adaptado desde en.wikt por Tmagc local export = {} local unpack = unpack or table.unpack local insert = table.insert local concat = table.concat local m_table = require("Módulo:tabla") local keys_to_list = m_table.keysToList local insert_if_not = m_table.insertIfNot local deep_copy = m_table.deepCopy local contains = m_table.contains local merge = m_table.merge local m_str = require("Módulo:string") local u = m_str.char local match = m_str.match local sub = m_str.sub local gsub = m_str.gsub local split = m_str.split local gsplit = m_str.gsplit local find = m_str.find local m_str_avanzado = require("Módulo:string/avanzado") local toNFD = m_str_avanzado.toNFD local toNFC = m_str_avanzado.toNFC local m_flex = require("Módulo:flex") local f = m_flex.f local f_links = m_flex.f_links local parsear_arreglo = m_flex.parsear_arreglo local separar_palabras = m_flex.separar_palabras local combinar_copulativa = m_flex.combinar_copulativa local sobreescribir_formas = m_flex.sobreescribir_formas local desactivar_formas = m_flex.desactivar_formas local agregar_enlaces = m_flex.agregar_enlaces local formatear_formas = m_flex.formatear_formas local comprobar_defectivo = m_flex.comprobar_defectivo local renderizar_tabla = m_flex.renderizar_tabla local renderizar_encabezado = m_flex.renderizar_encabezado local COLOR_H = m_flex.COLOR_H local COLOR_NP = m_flex.COLOR_NP local COLOR_IND = m_flex.COLOR_IND local COLOR_SUBJ = m_flex.COLOR_SUBJ local COLOR_IMPER = m_flex.COLOR_IMPER local MACRON = u(0x304) local BREVE = u(0x306) local DIAER = u(0x308) local DBREVE = u(0x361) local ACCENT = "[" .. MACRON .. BREVE .. DIAER .. DBREVE .. "]" local VOWEL = "[aæeioœuyAÆEIOŒUY]" local cons_to_vowel = { ["j"] = "i", ["J"] = "I", ["v"] = "u", ["V"] = "U", } local function normalizar_enlace(x) x = toNFD(x) x = gsub(x, ACCENT, "") return toNFC(x) end local function join(a, b) a, b = toNFD(a), toNFD(b) -- If the first part ends in "j" or "v", convert it to "i" or "u" unless -- the second part begins with a vowel. if not match(b, "^" .. VOWEL) then a = gsub(a, "[jvJV]$", cons_to_vowel) end return toNFC(a..b) end local function add_form(decl, slot, stem, suf) if type(slot) == "string" then slot = {slot} end for _,slt in ipairs(slot) do if type(decl[slt]) == "nil" or decl[slt] == "" then decl[slt] = {} elseif type(decl[slt]) == "string" then decl[slt] = {decl[slt]} end insert_if_not(decl[slt], join(stem, suf)) end end local function remove_forms(decl, forms) for form,_ in pairs(decl) do for _,rx in ipairs(forms) do if form:find(rx) then forms[form] = {} break end end end end local function merge_forms(forms, forms2, keys) keys = keys or forms2 for key,arr in pairs(keys) do if not forms[key] then forms[key] = {} end if type(forms2[key]) == "string" then insert_if_not(forms[key], forms2[key]) elseif type(forms2[key]) == "table" then for _,a in ipairs(forms2[key]) do insert_if_not(forms[key], a) end end end end local noun_decl = {} noun_decl["0"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = stem forms["dat_sg"] = stem forms["acc_sg"] = stem forms["abl_sg"] = stem forms["voc_sg"] = stem forms["nom_pl"] = stem forms["gen_pl"] = stem forms["dat_pl"] = stem forms["acc_pl"] = stem forms["abl_pl"] = stem forms["voc_pl"] = stem -- with locative if data.loc then forms["loc_sg"] = stem forms["loc_pl"] = stem end end local function alt_gen_pl_in_um(stem, forms, types, subtitles, i_stem) if types.genplum then add_form(forms, "gen_pl", stem, (i_stem and "i" or "") .. "um") elseif types.not_genplum then -- FIXME: not a contraction. -- insert_if_not(subtitles, "uncontracted genitive plural") end end noun_decl["1"] = function(data, args) local forms, types, loc, subtitles = data.forms, data.types, data.loc, data.subtitles local stem = args[1] -- normal 1st local nom_sg = "a" local gen_loc_sg = "ae" local dat_sg = "ae" local acc_sg = "am" local abl_sg = "ā" local voc_sg = "a" local nom_voc_pl = "ae" local gen_pl = "ārum" local dat_abl_loc_pl = "īs" local acc_pl = "ās" insert_if_not(data.title, "primera declinación") insert_if_not(data.categories, "LA:Sustantivos de la primera declinación") -- ām if types.am then nom_sg = "ām" acc_sg = "ām" abl_sg = {"ām", "ā"} voc_sg = "ām" -- all Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") --Greek Ma if types.Ma then nom_sg = "ās" acc_sg = "ān" voc_sg = "ā" -- Greek Me elseif types.Me then nom_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" -- Greek else nom_sg = "ē" gen_loc_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" end end -- ābus if types.abus then dat_abl_loc_pl = "ābus" end add_form(forms, "nom_sg", stem, nom_sg) add_form(forms, "gen_sg", stem, gen_loc_sg) add_form(forms, "dat_sg", stem, dat_sg) add_form(forms, "acc_sg", stem, acc_sg) add_form(forms, "abl_sg", stem, abl_sg) add_form(forms, "voc_sg", stem, voc_sg) add_form(forms, {"nom_pl", "voc_pl"}, stem, nom_voc_pl) add_form(forms, "gen_pl", stem, gen_pl) add_form(forms, {"dat_pl", "abl_pl"}, stem, dat_abl_loc_pl) add_form(forms, "acc_pl", stem, acc_pl) -- with locative if loc then add_form(forms, "loc_sg", stem, gen_loc_sg) add_form(forms, "loc_pl", stem, dat_abl_loc_pl) end end noun_decl["2"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "segunda declinación") insert_if_not(data.categories, "LA:Sustantivos de la segunda declinación") -- normal 2nd forms["nom_sg"] = stem1 .. "us" forms["gen_sg"] = stem1 .. "ī" forms["dat_sg"] = stem1 .. "ō" forms["acc_sg"] = stem1 .. "um" forms["abl_sg"] = stem1 .. "ō" forms["voc_sg"] = stem1 .. "e" forms["nom_pl"] = stem1 .. "ī" forms["gen_pl"] = stem1 .. "ōrum" forms["dat_pl"] = stem1 .. "īs" forms["acc_pl"] = stem1 .. "ōs" forms["abl_pl"] = stem1 .. "īs" forms["voc_pl"] = stem1 .. "ī" -- all neuter if types.N then forms["nom_sg"] = stem1 .. "um" forms["voc_sg"] = stem1 .. "um" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- neuter ium if types.ium then forms["nom_sg"] = stem1 .. "ium" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" forms["voc_sg"] = stem1 .. "ium" forms["nom_pl"] = stem1 .. "ia" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "ia" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "ia" -- neuter us, plural a elseif types.a then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- -vom (aevom, etc.) elseif types.vom then forms["nom_sg"] = stem1 .. "om" forms["acc_sg"] = stem1 .. "om" forms["voc_sg"] = stem1 .. "om" -- neuter Greek in -os (cētos) elseif types.Greek and types.us then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "os" forms["voc_sg"] = stem1 .. "os" forms["nom_pl"] = stem1 .. "ē" forms["gen_pl"] = stem1 .. "ōn" forms["acc_pl"] = stem1 .. "ē" forms["voc_pl"] = stem1 .. "ē" -- neuter Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "on" forms["acc_sg"] = stem1 .. "on" forms["voc_sg"] = stem1 .. "on" -- neuter us elseif types.us then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "ī" forms["acc_pl"] = stem1 .. "ōs" forms["voc_pl"] = stem1 .. "ī" end -- er elseif types.er then forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "ī" forms["dat_sg"] = stem2 .. "ō" forms["acc_sg"] = stem2 .. "um" forms["abl_sg"] = stem2 .. "ō" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ī" forms["gen_pl"] = stem2 .. "ōrum" forms["dat_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "ōs" forms["abl_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "ī" -- ius elseif types.ius then forms["nom_sg"] = stem1 .. "ius" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" if types.voci then -- Only for proper names and fīlius, genius forms["voc_sg"] = stem1 .. "ī" else forms["voc_sg"] = stem1 .. "ie" end forms["nom_pl"] = stem1 .. "iī" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "iōs" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "iī" -- -vos (servos, etc.) elseif types.vos then forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "om" -- Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "on" if data.num == "pl" then forms["nom_pl"] = stem1 .. "oe" forms["voc_pl"] = stem1 .. "oe" else forms["nom_pl"] = {stem1 .. "ī", stem1 .. "oe"} forms["voc_pl"] = {stem1 .. "ī", stem1 .. "oe"} end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- with -um genitive plural alt_gen_pl_in_um(stem2, forms, types, subtitles, types.ius or types.ium) -- with locative if data.loc then if types.ius or types.ium then forms["loc_sg"] = stem2 .. "iī" forms["loc_pl"] = stem2 .. "iīs" else forms["loc_sg"] = stem2 .. "ī" forms["loc_pl"] = stem2 .. "īs" end end end local acc_sg_i_stem_subtypes = { acc_im = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [abl -ī]; -- cannabis, senapis, sinapis [abl -e, -ī] acc_sg = {"im"}, title = {"accusative singular in ''-im''"}, }, acc_im_in = { -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [abl -ī]; -- Baetis, Tigris [acc -e, -ī] acc_sg = {"im", "in"}, title = {"accusative singular in ''-im'' or ''-in''"}, }, acc_im_in_em = { -- e.g. tigris, river Līris acc_sg = {"im", "in", "em"}, title = {"accusative singular in ''-im'', ''-in'' or ''-em''"}, }, acc_im_em = { acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or ''-em''"}, }, acc_im_occ_em = { -- febris, pelvis, puppis, restis, securis, turris [abl -ī, -e] acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or occasionally ''-em''"}, }, acc_em_im = { -- aqualis, clavis, lens, navis [abl -e, -ī]; -- cutis, restis [abl -e] acc_sg = {"em", "im"}, title = {"accusative singular in ''-em'' or ''-im''"}, }, } local abl_sg_i_stem_subtypes = { abl_i = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [acc -im]; -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [acc -im or -in]; -- canalis "water pipe", months in -is or -er, nouns originally i-stem adjectives such as aedilis, affinis, bipennis, familiaris, sodalis, volucris, etc. [acc -em] abl_sg = {"ī"}, title = {"ablative singular in ''-ī''"}, }, abl_i_e = { -- febris, pelvis, puppis, restis, securis, turris [acc -im, -em] abl_sg = {"ī", "e"}, title = {"ablative singular in ''-ī'' or ''-e''"}, }, abl_e_i = { -- cannabis, senapis, sinapis [acc -im]; -- Baetis, Tigris [acc -im, -in]; -- aqualis, clavis, lens, navis [acc -em, -im]; -- finis, mugilis, occiput, pugil, rus, supellex, vectis [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or ''-ī''"}, }, abl_e_occ_i = { -- amnis, anguis, avis, civis, classis, fustis, ignis, imber, orbis, pars, postis, sors, unguis, vesper [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or occasionally ''-ī''"}, }, } local function extract_stem(form, ending) local base = match(form, "^(.*)" .. ending .. "$") if not base then error("Form " .. form .. " should end in -" .. ending) end return base end local function count_vowels(stem) return select(2, toNFD(stem):gsub("[aeiouyAEIOUY]", "")) end noun_decl["3"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] -- local function non_i_stem_type() -- return (count_vowels(stem1) > count_vowels(stem2) and "parisyllabic" or "imparisyllabic") .. " non-i-stem" -- end insert_if_not(data.title, "tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") --normal 3rd forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "is" forms["dat_sg"] = stem2 .. "ī" forms["acc_sg"] = stem2 .. "em" forms["abl_sg"] = stem2 .. "e" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ēs" forms["gen_pl"] = stem2 .. "um" forms["dat_pl"] = stem2 .. "ibus" forms["acc_pl"] = stem2 .. "ēs" forms["abl_pl"] = stem2 .. "ibus" forms["voc_pl"] = stem2 .. "ēs" local acc_sg_i_stem_subtype = false local not_acc_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if acc_sg_i_stem_subtypes[subtype] then acc_sg_i_stem_subtype = true break end end for acc_sg_subtype, _ in pairs(acc_sg_i_stem_subtypes) do if types["not_" .. acc_sg_subtype] then not_acc_sg_i_stem_subtype = true break end end local abl_sg_i_stem_subtype = false local not_abl_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if abl_sg_i_stem_subtypes[subtype] then abl_sg_i_stem_subtype = true break end end for abl_sg_subtype, _ in pairs(abl_sg_i_stem_subtypes) do if types["not_" .. abl_sg_subtype] then not_abl_sg_i_stem_subtype = true break end end -- all Greek if types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") -- Greek er if types.er then stem1 = extract_stem(stem1, "ēr") forms["nom_sg"] = stem1 .. "ēr" forms["gen_sg"] = stem1 .. "eris" forms["dat_sg"] = stem1 .. "erī" forms["acc_sg"] = {stem1 .. "era", stem1 .. "erem"} forms["abl_sg"] = stem1 .. "ere" forms["voc_sg"] = stem1 .. "ēr" forms["nom_pl"] = stem1 .. "erēs" forms["gen_pl"] = stem1 .. "erum" forms["dat_pl"] = stem1 .. "eribus" forms["acc_pl"] = stem1 .. "erēs" forms["abl_pl"] = stem1 .. "eribus" forms["voc_pl"] = stem1 .. "erēs" -- Greek on elseif types.on then stem1 = extract_stem(stem1, "ōn") forms["nom_sg"] = stem1 .. "ōn" forms["gen_sg"] = {stem1 .. "ontis", stem1 .. "ontos"} forms["dat_sg"] = stem1 .. "ontī" forms["acc_sg"] = stem1 .. "onta" forms["abl_sg"] = stem1 .. "onte" forms["voc_sg"] = stem1 .. "ōn" forms["nom_pl"] = stem1 .. "ontēs" forms["gen_pl"] = {stem1 .. "ontum", stem1 .. "ontium"} forms["dat_pl"] = stem1 .. "ontibus" forms["acc_pl"] = {stem1 .. "ontēs", stem1 .. "ontās"} forms["abl_pl"] = stem1 .. "ontibus" forms["voc_pl"] = stem1 .. "ontēs" -- Greek i-stem elseif types.I then forms["gen_sg"] = {stem2 .. "is", stem2 .. "eōs", stem2 .. "ios"} forms["acc_sg"] = {stem2 .. "im", stem2 .. "in", stem2 .. "em{MED}"} forms["abl_sg"] = {stem2 .. "ī", stem2 .. "e{MED}"} forms["voc_sg"] = {stem2 .. "is", stem2 .. "i"} forms["nom_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["gen_pl"] = {stem2 .. "ium", stem2 .. "eōn"} forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["voc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} if types.poetic_esi then forms["dat_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} forms["abl_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} end -- normal Greek else forms["gen_sg"] = stem2 .. "os" if match(toNFD(stem2), "[yY]" .. ACCENT .. "*$") then forms["acc_sg"] = stem2 .. "n" else forms["acc_sg"] = stem2 .. "a" end forms["nom_pl"] = stem2 .. "es" forms["acc_pl"] = stem2 .. "as" forms["voc_pl"] = stem2 .. "es" if match(toNFD(stem1), "[iyIY]" .. ACCENT .. "*s$") then -- Per Hiley, words in -is and -ys have a poetic vocative -- without the -s, but otherwise the vocative is the same -- as the nominative. forms["voc_sg"] = {stem1, (stem1:gsub("s$", "")).."{L}"} end end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- polis if types.polis then stem1 = extract_stem(stem1, "polis") insert_if_not(data.title, "parcialmente griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "polis" forms["gen_sg"] = stem1 .. "polis" forms["dat_sg"] = stem1 .. "polī" forms["acc_sg"] = {stem1 .. "polim", stem1 .. "polin"} forms["abl_sg"] = stem1 .. "polī" forms["voc_sg"] = {stem1 .. "polis", stem1 .. "polī"} end -- all neuter if types.N then forms["acc_sg"] = stem1 -- neuter I stem if types.I then -- pure variety if types.pure then forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "ia" forms["gen_pl"] = stem2 .. "ium" forms["acc_pl"] = stem2 .. "ia" forms["voc_pl"] = stem2 .. "ia" -- non-pure variety (rare) else forms["nom_pl"] = stem2 .. "a" forms["gen_pl"] = {stem2 .. "ium", stem2 .. "um"} forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- normal neuter else forms["nom_pl"] = stem2 .. "a" forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- I stem elseif types.I or acc_sg_i_stem_subtype or abl_sg_i_stem_subtype then forms["gen_pl"] = stem2 .. "ium" -- Per Allen and Greenough, Hiley and others, the acc_pl in -īs -- applied originally to all i-stem nouns, and was current as an -- alternative form up through Caesar. forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "īs"} -- pure variety if types.pure then forms["acc_sg"] = stem2 .. "im" forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "īs" end local num = data.num for subtype, _ in pairs(types) do local acc_sg_i_stem_props = acc_sg_i_stem_subtypes[subtype] if acc_sg_i_stem_props then forms["acc_sg"] = {} for _, ending in ipairs(acc_sg_i_stem_props.acc_sg) do insert_if_not(forms["acc_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(acc_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end -- FIXME: needs to be done for neuter nouns as well. for subtype, _ in pairs(types) do local abl_sg_i_stem_props = abl_sg_i_stem_subtypes[subtype] if abl_sg_i_stem_props then forms["abl_sg"] = {} for _, ending in ipairs(abl_sg_i_stem_props.abl_sg) do insert_if_not(forms["abl_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(abl_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end end -- with locative if data.loc then -- As far as I can tell, in general both dative singular and -- ablative singular could be used for the third-declension locative, -- with different time periods preferring different forms. -- http://dcc.dickinson.edu/grammar/latin/3rd-declension-locative-case -- mentions rūrī along with either Carthāginī or Carthāgine. -- Wikipedia in https://en.wikipedia.org/wiki/Locative_case#Latin -- says this: -- -- In archaic times, the locative singular of third declension nouns -- was still interchangeable between ablative and dative forms, but in -- the Augustan Period the use of the ablative form became fixed. -- Therefore, both forms "rūrī" and "rūre" may be encountered. -- -- Lewis and Short confirm this. local loc_sg = forms["dat_sg"] if type(loc_sg) == "table" then loc_sg = deep_copy(loc_sg) else loc_sg = {loc_sg} end local abl_sg = forms["abl_sg"] if type(abl_sg) == "table" then for _, form in ipairs(abl_sg) do insert_if_not(loc_sg, deep_copy(form)) end else insert_if_not(loc_sg, abl_sg) end forms["loc_sg"] = loc_sg forms["loc_pl"] = deep_copy(forms["abl_pl"]) --The following is what we used to have, but I simply cannot believe it. --if types.Greek and not types.s then -- forms["loc_pl"] = stem2 .. "ēs" --end end end noun_decl["4"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "cuarta declinación") insert_if_not(data.categories, "LA:Sustantivos de la cuarta declinación") -- normal 4th forms["nom_sg"] = stem .. "us" forms["gen_sg"] = stem .. "ūs" forms["dat_sg"] = stem .. "uī" forms["acc_sg"] = stem .. "um" forms["abl_sg"] = stem .. "ū" forms["voc_sg"] = stem .. "us" forms["nom_pl"] = stem .. "ūs" forms["gen_pl"] = stem .. "uum" forms["dat_pl"] = stem .. "ibus" forms["acc_pl"] = stem .. "ūs" forms["abl_pl"] = stem .. "ibus" forms["voc_pl"] = stem .. "ūs" if types.echo then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end add_form(forms, "acc_sg", stem, "ōn") elseif types.Callisto then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end end -- neuter if types.N then forms["nom_sg"] = stem .. "ū̆{?}" forms["gen_sg"] = {stem .. "ūs{C}", stem .. "ū{S}"} forms["dat_sg"] = {stem .. "uī{C}", stem .. "ū{S}"} forms["acc_sg"] = stem .. "ū̆{?}" forms["voc_sg"] = stem .. "ū̆{?}" forms["nom_pl"] = stem .. "ua" forms["acc_pl"] = stem .. "ua" forms["voc_pl"] = stem .. "ua" end -- ubus if types.ubus then forms["dat_pl"] = stem .. "ubus" forms["abl_pl"] = stem .. "ubus" end -- with locative if data.loc then forms["loc_sg"] = forms["abl_sg"] forms["loc_pl"] = forms["abl_pl"] end end noun_decl["5"] = function(data, args) local forms, types = data.forms, data.types local stem = args[1] insert_if_not(data.title, "quinta declinación") insert_if_not(data.categories, "LA:Sustantivos de la quinta declinación") -- ies if types.i then stem = stem .. "i" end forms["nom_sg"] = stem .. "ēs" forms["gen_sg"] = stem .. "eī" forms["dat_sg"] = stem .. "eī" forms["acc_sg"] = stem .. "em" forms["abl_sg"] = stem .. "ē" forms["voc_sg"] = stem .. "ēs" forms["nom_pl"] = stem .. "ēs" forms["gen_pl"] = stem .. "ērum" forms["dat_pl"] = stem .. "ēbus" forms["acc_pl"] = stem .. "ēs" forms["abl_pl"] = stem .. "ēbus" forms["voc_pl"] = stem .. "ēs" -- ies if types.i then forms["gen_sg"] = stem .. "ēī" forms["dat_sg"] = stem .. "ēī" end --with locative if data.loc then forms["loc_sg"] = stem .. "ē" forms["loc_pl"] = stem .. "ēbus" end end noun_decl["sgpl"] = function(data, args) local forms = data.forms local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem1 forms["gen_sg"] = stem1 forms["dat_sg"] = stem1 forms["acc_sg"] = stem1 forms["abl_sg"] = stem1 forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 forms["gen_pl"] = stem2 forms["dat_pl"] = stem2 forms["acc_pl"] = stem2 forms["abl_pl"] = stem2 forms["voc_pl"] = stem2 -- with locative if data.loc then forms["loc_sg"] = stem1 forms["loc_pl"] = stem2 end end noun_decl["indecl"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = stem forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} -- with locative (for multiword terms) if data.loc then forms["loc_sg"] = {} forms["loc_pl"] = {} end data.num = "sg" end noun_decl["irreg"] = function(data, args) local forms, subtitles, notes = data.forms, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "irregular") insert_if_not(data.categories, "LA:Sustantivos irregulares") forms["nom_sg"] = {} forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = {} forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} if stem == "bōs" then data.decl = "3" local stem1, stem2 = "bōs", "bov" noun_decl["3"](data, {stem1, stem2}) add_form(forms, "abl_sg", stem2, "īd{†}") add_form(forms, "gen_pl", "bo", "um") add_form(forms, "gen_pl", stem2, "erum") add_form(forms, "dat_pl", "", "bōbus") add_form(forms, "dat_pl", "", "būbus") add_form(forms, "abl_pl", "", "bōbus") add_form(forms, "abl_pl", "", "būbus") elseif stem:match("^[dD]eus$") then data.decl = "2" local dD = stem:sub(1, 1) forms["nom_sg"] = dD .. "eus" forms["gen_sg"] = dD .. "eī" forms["dat_sg"] = dD .. "eō" forms["acc_sg"] = dD .. "eum" forms["abl_sg"] = dD .. "eō" forms["voc_sg"] = {dD .. "eus", dD .. "ee"} if stem == "deus" then forms["nom_pl"] = {"dī", "diī", "deī"} forms["gen_pl"] = {"deōrum", "deum"} forms["dat_pl"] = {"dīs", "diīs", "deīs"} forms["acc_pl"] = "deōs" forms["abl_pl"] = {"dīs", "diīs", "deīs"} forms["voc_pl"] = {"dī", "diī", "deī"} end elseif stem == "domus" then data.decl = "4,2" insert_if_not(data.title, "cuarta/segunda declinación") forms["nom_sg"] = "domus" forms["gen_sg"] = {"domūs", "domī"} forms["dat_sg"] = {"domuī", "domō", "domū"} forms["acc_sg"] = "domum" forms["abl_sg"] = {"domū", "domō"} forms["voc_sg"] = "domus" forms["loc_sg"] = "domī" forms["nom_pl"] = "domūs" forms["gen_pl"] = {"domuum", "domōrum"} forms["dat_pl"] = "domibus" forms["acc_pl"] = {"domūs", "domōs"} forms["abl_pl"] = "domibus" forms["voc_pl"] = "domūs" forms["loc_pl"] = {} data.loc = true elseif match(stem, "^[IÏJ]ēs[uū]" .. BREVE .. "?s$") then local ij = sub(stem, 1, 1) local uu = match(stem, "[uū]" .. BREVE .. "?") forms["nom_sg"] = stem forms["gen_sg"] = ij .. "ēsū" forms["dat_sg"] = ij .. "ēsū" forms["acc_sg"] = ij .. "ēs" .. uu .. "m" forms["abl_sg"] = ij .. "ēsū" forms["voc_sg"] = ij .. "ēsū" data.num = "sg" elseif stem == "Mōsēs" or stem == "Moesēs" or match(stem, "^M[oō]" .. BREVE .. "?[īȳ]sēs$") then local mos = sub(stem, 1, -3) forms["nom_sg"] = stem forms["gen_sg"] = {mos .. "ī", mos .. "ēī", mos .. "is", mos .. "ēn", mos .. "eōs"} forms["dat_sg"] = mos .. "ī" forms["acc_sg"] = {mos .. "ēn", mos .. "em"} forms["abl_sg"] = {mos .. "e", mos .. "ēn", mos .. "ī"} forms["voc_sg"] = {mos .. "ēs", mos .. "ē"} data.num = "sg" elseif stem:match("^[ij]ūgerum$") then data.decl = "2,3" local ij = stem:sub(1, 1) insert_if_not(data.title, "segunda/tercera declinación híbrido") forms["nom_sg"] = ij .. "ūgerum" forms["gen_sg"] = ij .. "ūgerī" forms["dat_sg"] = ij .. "ūgerō" forms["acc_sg"] = ij .. "ūgerum" forms["abl_sg"] = ij .. "ūgerō" forms["voc_sg"] = ij .. "ūgerum" forms["nom_pl"] = ij .. "ūgera" forms["gen_pl"] = ij .. "ūgerum" forms["dat_pl"] = ij .. "ūgeribus" forms["acc_pl"] = ij .. "ūgera" forms["abl_pl"] = {ij .. "ūgeribus", ij .. "ūgerīs{†}"} forms["voc_pl"] = ij .. "ūgera" elseif stem == "sūs" then data.decl = "3" forms["nom_sg"] = "sūs" forms["gen_sg"] = "suis" forms["dat_sg"] = "suī" forms["acc_sg"] = "suem" forms["abl_sg"] = "sue" forms["voc_sg"] = "sūs" forms["nom_pl"] = "suēs" forms["gen_pl"] = "suum" forms["dat_pl"] = {"suibus", "sūbus", "subus"} forms["acc_pl"] = "suēs" forms["abl_pl"] = {"suibus", "sūbus", "subus"} forms["voc_pl"] = "suēs" elseif stem == "ēthos" then data.decl = "3" insert_if_not(data.title, "tercera declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "ēthos" forms["gen_sg"] = "ētheos" forms["acc_sg"] = "ēthos" forms["voc_sg"] = "ēthos" forms["nom_pl"] = {"ēthea", "ēthē"} forms["dat_pl"] = {"ēthesi", "ēthesin"} forms["acc_pl"] = {"ēthea", "ēthē"} forms["abl_pl"] = {"ēthesi", "ēthesin"} forms["voc_pl"] = {"ēthea", "ēthē"} elseif stem == "Athōs" then data.decl = "2" insert_if_not(data.title, "segunda declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "Athōs" forms["gen_sg"] = "Athō" forms["dat_sg"] = "Athō" forms["acc_sg"] = {"Athō", "Athōn"} forms["abl_sg"] = "Athō" forms["voc_sg"] = "Athōs" data.num = "sg" elseif stem:match("^[uv]ēnum$") then data.decl = "4,2" local uv = stem:sub(1, 1) insert_if_not(data.title, "cuarta/segunda declinación, defectivo") forms["dat_sg"] = {uv .. "ēnuī", uv .. "ēnō"} forms["acc_sg"] = uv .. "ēnum" data.num = "sg" elseif stem:match("^[uv]īs$") then data.decl = "3" local uv = stem:sub(1, 1) insert_if_not(data.title, "defectivo") forms["nom_sg"] = uv .. "īs" forms["gen_sg"] = uv .. "īs" forms["dat_sg"] = uv .. "ī" forms["acc_sg"] = uv .. "im" forms["abl_sg"] = uv .. "ī" forms["voc_sg"] = uv .. "īs" forms["nom_pl"] = uv .. "īrēs" forms["gen_pl"] = uv .. "īrium" forms["dat_pl"] = uv .. "īribus" forms["acc_pl"] = {uv .. "īrēs", uv .. "īrīs"} forms["abl_pl"] = uv .. "īribus" forms["voc_pl"] = uv .. "īrēs" else error("Stem " .. stem .. " not recognized.") end end local adj_decl = {} adj_decl["0+"] = function(data, args) local forms, categories = data.forms, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = stem forms["gen_sg_m"] = stem forms["gen_pl_m"] = stem forms["dat_sg_m"] = stem forms["dat_pl_m"] = stem forms["acc_sg_m"] = stem forms["acc_pl_m"] = stem forms["abl_sg_m"] = stem forms["abl_pl_m"] = stem forms["voc_sg_m"] = stem forms["voc_pl_m"] = stem forms["loc_sg_m"] = stem forms["loc_pl_m"] = stem end adj_decl["1&2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera y segunda declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local original if types.er then local final2 = stem:sub(-2) if final2 == "er" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") elseif final2 == "ur" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") else error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem) end stem, original = args[2], stem end local us = "us" local a_sf = "a" local um = "um" local ae_gsf = "ae" local am = "am" local a_macron = "ā" local i_pl = stem .. "ī" if types.greekA or types.greekE then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") if types.greekA then us = "os" um = "on" am = "ān" else us = "os" a_sf = "ē" um = "on" ae_gsf = "ēs" am = "ēn" a_macron = "ē" end i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = original or (stem .. us) forms["nom_sg_f"] = stem .. a_sf forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_f"] = stem .. ae_gsf forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_f"] = stem .. "ae" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_f"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_f"] = stem .. am forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_f"] = stem .. a_macron forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_f"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = original or (stem .. "e") forms["voc_sg_f"] = stem .. a_sf forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" if types.ius then insert_if_not(data.title, "pronominal") --insert_if_not(subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''") forms["gen_sg_m"] = stem .. "ī̆us" forms["gen_sg_f"] = stem .. "ī̆us" forms["gen_sg_n"] = stem .. "ī̆us" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_f"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" elseif types.not_ius then insert_if_not(data.title, "no pronominal") --insert_if_not(subtitles, "with normal genitive and dative singular") end if stem == "me" then forms["voc_sg_m"] = "mī" end if types.ic then --insert_if_not(subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''") local oc = "oc" local oc_macron = "ōc" if stem == "ill" then oc = "uc" oc_macron = "ūc" end forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = stem .. oc forms["nom_pl_n"] = stem .. "aec" forms["gen_sg_m"] = stem .. "uius" forms["gen_sg_f"] = stem .. "uius" forms["gen_sg_n"] = stem .. "uius" forms["dat_sg_m"] = stem .. "uic" forms["dat_sg_f"] = stem .. "uic" forms["dat_sg_n"] = stem .. "uic" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = stem .. oc forms["acc_pl_n"] = stem .. "aec" forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. oc_macron forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} end if types.distr then if stem:sub(-1) == "n" then forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum{R}"} forms["gen_pl_f"] = {stem .. "um", stem .. "ārum{R}"} forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum{R}"} else error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem) end end forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["1-1+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") forms["nom_sg_m"] = stem .. "a" forms["nom_pl_m"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ae" forms["gen_pl_m"] = stem .. "ārum" forms["dat_sg_m"] = stem .. "ae" forms["dat_pl_m"] = stem .. "īs" forms["acc_sg_m"] = stem .. "am" forms["acc_sg_n"] = stem .. "a" forms["acc_pl_m"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ā" forms["abl_pl_m"] = stem .. "īs" forms["voc_sg_m"] = stem .. "a" forms["voc_pl_m"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["2-2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "segunda declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local us = "us" local um = "um" local i_pl = stem .. "ī" if types.greek then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") us = "os" um = "on" i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = stem .. us forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = stem .. "e" forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end local function abl_i_e(...) local function update_slot(forms, slot, f, do_copy) if not forms[slot] then return do_copy elseif do_copy then f = deep_copy(f) end forms[slot] = f return true end function abl_i_e(stem, forms, types) local f, do_copy if types["abl_e_i"] then f = {stem .. "e", stem .. "ī"} elseif types["abl_i_e"] then f = {stem .. "ī", stem .. "e"} else return end do_copy = update_slot(forms, "abl_sg_m", f, do_copy) do_copy = update_slot(forms, "abl_sg_f", f, do_copy) -- Neuter doesn't take -e with i-stems. if not types.I then update_slot(forms, "abl_sg_n", f, do_copy) end end return abl_i_e(...) end adj_decl["3-1+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) if types.par then forms["nom_pl_n"] = stem2 .. "a" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["abl_sg_m"] = stem2 .. "e" forms["abl_sg_n"] = stem2 .. "e" forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"} -- Really? forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"} -- Why does this happen? forms["acc_pl_n"] = stem2 .. "a" forms["voc_pl_n"] = stem2 .. "a" end local es_base = stem1:match("^(.-)ēs$") if es_base and es_base == stem2 then if types.greek then forms["nom_sg_n"] = {stem2 .. "ē̆s{?}"} forms["acc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_m"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["nom_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["acc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["voc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["abl_sg_m"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["abl_sg_n"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["gen_pl_m"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} forms["gen_pl_n"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Adjetivos griegos") elseif types.not_greek then insert_if_not(data.title, "no griego") end end end adj_decl["3-def+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, defectivo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = stem2 .. "ēs" forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" if types.tor then insert_if_not(data.title, "tercera declinación, solo en masculino") insert_if_not(categories, "LA:Adjetivos solo en masculino") remove_forms(forms, {"_f$", "_n$"}) forms["nom_sg_m"] = stem1 forms["gen_sg_m"] = stem2 .. "is" forms["dat_sg_m"] = stem2 .. "ī" forms["acc_sg_m"] = stem2 .. "em" forms["abl_sg_m"] = stem2 .. "e" forms["voc_sg_m"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["gen_pl_m"] = stem2 .. "um" forms["dat_pl_m"] = stem2 .. "ibus" forms["acc_pl_m"] = stem2 .. "ēs" forms["abl_pl_m"] = stem2 .. "ibus" forms["voc_pl_m"] = stem2 .. "ēs" end if types.trix then insert_if_not(data.title, "tercera declinación, solo en femenino o en neutro plural") insert_if_not(categories, "LA:Adjetivos solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en neutro") remove_forms(forms, {"_m$", "sg_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.trixf then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.idis then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = {stem2 .. "is", stem2 .. "os"} forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = {stem2 .. "em", stem2 .. "a"} forms["abl_sg_f"] = stem2 .. "e" forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} forms["gen_pl_f"] = stem2 .. "um" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = {stem2 .. "ēs", stem2 .. "as"} forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} end forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-C+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1 = args[1] local stem2 = stem1 .. "ōr" insert_if_not(data.title, "tercera declinación, comparativo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos comparativos") forms["nom_sg_m"] = stem1 .. "or" forms["nom_sg_n"] = stem1 .. "us" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "a" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 .. "us" forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} forms["acc_pl_n"] = stem2 .. "a" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 .. "or" forms["voc_sg_n"] = stem1 .. "us" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "a" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-P+"] = function(data, args) local forms, notes = data.forms, data.notes local stem2 = args[2] adj_decl["3-1+"](data, args) insert_if_not(data.title, "tercera declinación, participio") insert_if_not(data.categories, "LA:Adjetivos de la tercera declinación") forms["abl_sg_m"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["abl_sg_n"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} end adj_decl["3-2+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem = args[1] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem .. "is" forms["nom_sg_n"] = stem .. "e" forms["nom_pl_m"] = stem .. "ēs" forms["nom_pl_n"] = stem .. "ia" forms["gen_sg_m"] = stem .. "is" forms["gen_sg_n"] = stem .. "is" forms["gen_pl_m"] = stem .. "ium" forms["gen_pl_n"] = stem .. "ium" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" forms["dat_pl_m"] = stem .. "ibus" forms["dat_pl_n"] = stem .. "ibus" forms["acc_sg_m"] = stem .. "em" forms["acc_sg_n"] = stem .. "e" forms["acc_pl_m"] = {stem .. "īs", stem .. "ēs"} forms["acc_pl_n"] = stem .. "ia" forms["abl_sg_m"] = stem .. "ī" forms["abl_sg_n"] = stem .. "ī" forms["abl_pl_m"] = stem .. "ibus" forms["abl_pl_n"] = stem .. "ibus" -- abl_i_e(stem, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem .. "is" forms["voc_sg_n"] = stem .. "e" forms["voc_pl_m"] = stem .. "ēs" forms["voc_pl_n"] = stem .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-3+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con tres terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_f"] = stem2 .. "is" forms["nom_sg_n"] = stem2 .. "e" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_f"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_f"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_f"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_f"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_f"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_f"] = stem2 .. "em" forms["acc_sg_n"] = stem2 .. "e" forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_f"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_f"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_f"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" -- abl_i_e(stem2, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem1 forms["voc_sg_f"] = stem2 .. "is" forms["voc_sg_n"] = stem2 .. "e" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_f"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["indecl+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = {} forms["gen_sg_m"] = {} forms["gen_pl_m"] = {} forms["dat_sg_m"] = {} forms["dat_pl_m"] = {} forms["acc_sg_m"] = stem forms["acc_pl_m"] = {} forms["abl_sg_m"] = {} forms["abl_pl_m"] = {} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["irreg+"] = function(data,args) local forms, types, pos, notes, categories = data.forms, data.types, data.pos, data.notes, data.categories local arg1 = args[1] insert_if_not(data.title, "irregular") insert_if_not(categories, "LA:Adjetivos irregulares") if arg1 == "duo" or arg1 == "ambō" then local stem = sub(arg1, 1, -2) -- data.title = stem == "amb" and "irregular adjective" or "numeral" data.num = "pl" local stem_with_o = stem .. (stem == "amb" and "ō" or "o") forms["nom_pl_m"] = stem_with_o forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem_with_o forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_pl_m"] = stem .. "ōbus" forms["dat_pl_f"] = stem .. "ābus" forms["dat_pl_n"] = stem .. "ōbus" forms["acc_pl_m"] = {stem .. "ōs", stem_with_o} forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem_with_o forms["abl_pl_m"] = stem .. "ōbus" forms["abl_pl_f"] = stem .. "ābus" forms["abl_pl_n"] = stem .. "ōbus" forms["voc_pl_m"] = stem_with_o forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem_with_o if stem == "du" then forms["gen_pl_m"] = {forms["gen_pl_m"], "duum", "duom{†}"} forms["gen_pl_n"] = {forms["gen_pl_n"], "duum", "duom{†}"} end elseif arg1:sub(-6) == "mīlle" then insert_if_not(data.title, "numeral semiindeclinable") local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "le" forms["nom_pl_m"] = {stem .. "ia", stem .. "lia"} forms["gen_sg_m"] = stem .. "le" forms["gen_pl_m"] = {stem .. "ium", stem .. "lium"} forms["dat_sg_m"] = stem .. "le" forms["dat_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["acc_sg_m"] = stem .. "le" forms["acc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["abl_sg_m"] = stem .. "le" forms["abl_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["voc_sg_m"] = stem .. "le" forms["voc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) elseif arg1 == "ille" or arg1 == "iste" or arg1 == "ipse" or arg1 == "olle" then local stem = arg1:sub(1, -2) types.ius = true adj_decl["1&2+"](data, {stem}) insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) forms["nom_sg_m"] = arg1 if arg1 == "ipse" then add_form(forms, "nom_sg_n", stem, "ud{MED}") add_form(forms, "acc_sg_n", stem, "ud{MED}") else forms["nom_sg_n"] = stem .. "ud" forms["acc_sg_n"] = stem .. "ud" end forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} elseif arg1 == "illic" or arg1 == "istic" or arg1 == "isthic" then insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["gen_sg_m"] = stem .. "ī̆usce" forms["gen_sg_f"] = stem .. "ī̆usce" forms["gen_sg_n"] = stem .. "ī̆usce" forms["dat_sg_m"] = stem .. "īc" forms["dat_sg_f"] = stem .. "īc" forms["dat_sg_n"] = stem .. "īc" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. "ōc" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["nom_pl_m"] = stem .. "īsce" forms["nom_pl_f"] = stem .. "aec" forms["nom_pl_n"] = stem .. "aec" forms["gen_pl_m"] = stem .. "ōrunc{?}" forms["gen_pl_f"] = stem .. "ārunc{?}" forms["gen_ok_n"] = stem .. "ōrunc{?}" forms["dat_pl_m"] = stem .. "īsce" forms["dat_pl_f"] = stem .. "īsce" forms["dat_pl_n"] = stem .. "īsce" forms["acc_pl_m"] = stem .. "ōsce" forms["acc_pl_f"] = stem .. "āsce" forms["acc_pl_n"] = stem .. "aec" forms["abl_pl_m"] = stem .. "īsce" forms["abl_pl_f"] = stem .. "īsce" forms["abl_pl_n"] = stem .. "īsce" forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "hice" then insert_if_not(data.title, "demostrativo") -- .. " pronoun" forms["nom_sg_m"] = "hice" forms["nom_sg_f"] = "haece" forms["nom_sg_n"] = "hoce" forms["nom_pl_m"] = "hīce" forms["nom_pl_f"] = "haece" forms["nom_pl_n"] = "haece" forms["gen_sg_m"] = "huiusce" forms["gen_sg_f"] = "huiusce" forms["gen_sg_n"] = "huiusce" forms["gen_pl_m"] = {"hōrunce", "hōrumce"} forms["gen_pl_f"] = {"hārunce", "hārumce"} forms["gen_pl_n"] = {"hōrunce", "hōrumce"} forms["dat_sg_m"] = "huīce" forms["dat_sg_f"] = "huīce" forms["dat_sg_n"] = "huīce" forms["dat_pl_m"] = "hīsce" forms["dat_pl_f"] = "hīsce" forms["dat_pl_n"] = "hīsce" forms["acc_sg_m"] = "hunce" forms["acc_sg_f"] = "hance" forms["acc_sg_n"] = "hoce" forms["acc_pl_m"] = "hōsce" forms["acc_pl_f"] = "hāsce" forms["acc_pl_n"] = "haece" forms["abl_sg_m"] = "hōce" forms["abl_sg_f"] = "hāce" forms["abl_sg_n"] = "hōce" forms["abl_pl_m"] = "hīsce" forms["abl_pl_f"] = "hīsce" forms["abl_pl_n"] = "hīsce" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "plūs" then insert_if_not(data.title, "comparativo") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación con una terminación") data.note = "Ninguna de las formas en singular se usaron en latín clásico" forms["nom_sg_n"] = "plūs" forms["nom_pl_m"] = "plūrēs" forms["nom_pl_n"] = "plūra" forms["gen_sg_m"] = "plūris" forms["gen_sg_n"] = "plūris" forms["gen_pl_m"] = "plūrium" forms["gen_pl_n"] = "plūrium" forms["dat_sg_m"] = "plūrī" forms["dat_sg_n"] = "plūrī" forms["dat_pl_m"] = "plūribus" forms["dat_pl_n"] = "plūribus" forms["acc_sg_m"] = "plūrem" forms["acc_sg_f"] = "plūrem" forms["acc_sg_n"] = "plūs" forms["acc_pl_m"] = {"plūrēs", "plūrīs"} forms["acc_pl_n"] = "plūra" forms["abl_sg_m"] = {"plūrī", "plūre"} forms["abl_sg_f"] = {"plūrī", "plūre"} forms["abl_sg_n"] = {"plūrī", "plūre"} forms["abl_pl_m"] = "plūribus" forms["abl_pl_n"] = "plūribus" forms["voc_sg_n"] = "plūs" forms["voc_pl_m"] = "plūrēs" forms["voc_pl_n"] = "plūra" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif match(arg1, "^egō̆?$") or arg1 == "nōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "nōs" forms["gen_sg_m"] = "meī" forms["gen_pl_m"] = {"nostrī", "nostrum"} forms["dat_sg_m"] = "mihī̆" forms["dat_pl_m"] = "nōbīs" forms["acc_sg_m"] = {"mē", "mēmē"} forms["acc_pl_m"] = "nōs" forms["abl_sg_m"] = {"mē", "mēmē"} forms["abl_pl_m"] = "nōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "nōs" elseif arg1 == "tū" or arg1 == "vōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "vōs" forms["gen_sg_m"] = "tuī" forms["gen_pl_m"] = {"vestrī", "vestrum"} forms["dat_sg_m"] = "tibī̆" forms["dat_pl_m"] = "vōbīs" forms["acc_sg_m"] = {"tē", "tētē"} forms["acc_pl_m"] = "vōs" forms["abl_sg_m"] = {"tē", "tētē"} forms["abl_pl_m"] = "vōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "vōs" elseif arg1 == "suī" then insert_if_not(data.title, "pronombre reflexivo") forms["nom_sg_m"] = {} forms["nom_pl_m"] = {} forms["gen_sg_m"] = arg1 forms["gen_pl_m"] = forms["gen_sg_m"] forms["dat_sg_m"] = "sibī̆" forms["dat_pl_m"] = forms["dat_sg_m"] forms["acc_sg_m"] = {"sē", "sēsē"} forms["acc_pl_m"] = {"sē", "sēsē"} forms["abl_sg_m"] = {"sē", "sēsē"} forms["abl_pl_m"] = {"sē", "sēsē"} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} elseif arg1 == "is" or arg1 == "īdem" then insert_if_not(data.title, "pronombre demostrativo") forms["nom_sg_m"] = "is" forms["nom_sg_f"] = "ea" forms["nom_sg_n"] = "id" forms["nom_pl_m"] = {"iī", "eī", "ī"} forms["nom_pl_f"] = "eae" forms["nom_pl_n"] = "ea" forms["gen_sg_m"] = {"eius", "ejus"} forms["gen_sg_f"] = {"eius", "ejus"} forms["gen_sg_n"] = {"eius", "ejus"} forms["gen_pl_m"] = {"eōrum", "eum"} forms["gen_pl_f"] = "eārum" forms["gen_pl_n"] = {"eōrum", "eum"} forms["dat_sg_m"] = {"eī", "e͡i", "ēī"} forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"} forms["dat_sg_n"] = {"eī", "e͡i", "ēī"} forms["dat_pl_m"] = {"iīs", "eīs", "īs"} forms["dat_pl_f"] = {"iīs", "eīs", "īs", "eābus"} forms["dat_pl_n"] = {"iīs", "eīs", "īs"} forms["acc_sg_m"] = "eum" forms["acc_sg_f"] = "eam" forms["acc_sg_n"] = "id" forms["acc_pl_m"] = "eōs" forms["acc_pl_f"] = "eās" forms["acc_pl_n"] = "ea" forms["abl_sg_m"] = "eō" forms["abl_sg_f"] = "eā" forms["abl_sg_n"] = "eō" forms["abl_pl_m"] = {"iīs", "eīs", "īs"} forms["abl_pl_f"] = {"iīs", "eīs", "īs"} forms["abl_pl_n"] = {"iīs", "eīs", "īs"} if arg1 == "īdem" then forms["nom_sg_m"] = "ī" forms["nom_sg_n"] = "i" forms["acc_sg_n"] = "i" end elseif arg1 == "quis" or arg1 == "quī" then data.note = "La forma ''qua'' es preferida frente a ''quae'' cuando se usa como indefinido" local id = "id" if arg1 == "quī" then insert_if_not(data.title, "determinante relativo/interrogativo") id = "od" forms["nom_sg_m"] = {"quī", "quis", "quei{†}"} forms["nom_sg_f"] = {"quae", "qua"} forms["acc_sg_f"] = "quam" forms["abl_sg_m"] = "quō" forms["abl_sg_f"] = "quā" forms["abl_sg_n"] = "quō" else insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = {"quis", "quī"} forms["nom_sg_f"] = {"quae", "qua", "quis{†}"} forms["acc_sg_f"] = {"quam", "quem{†}"} forms["abl_sg_m"] = {"quō", "quī"} forms["abl_sg_f"] = {"quā", "quī"} forms["abl_sg_n"] = {"quō", "quī"} end forms["nom_sg_n"] = "qu"..id forms["nom_pl_m"] = {"quī", "quei{†}"} forms["nom_pl_f"] = "quae" forms["nom_pl_n"] = {"quae", "qua"} forms["gen_sg_m"] = {"cuius", "quoius{†}"} forms["gen_sg_f"] = {"cuius", "quoius{†}"} forms["gen_sg_n"] = {"cuius", "quoius{†}"} forms["gen_pl_m"] = "quōrum" forms["gen_pl_f"] = "quārum" forms["gen_pl_n"] = "quōrum" forms["dat_sg_m"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_f"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_n"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_n"] = {"quibus", "quīs", "queis{†}"} forms["acc_sg_m"] = "quem" forms["acc_sg_n"] = "qu"..id forms["acc_pl_m"] = "quōs" forms["acc_pl_f"] = "quās" forms["acc_pl_n"] = {"quae", "qua"} forms["abl_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_n"] = {"quibus", "quīs", "queis{†}"} elseif arg1 == "aliquī" then insert_if_not(data.title, "determinante indefinido") forms["nom_sg_m"] = {"aliquī{DET/ADJ}", "aliquis{PRON/SUST}"} forms["nom_sg_f"] = {"aliqua", "aliquae{R}"} forms["nom_sg_n"] = "aliquod" forms["nom_pl_m"] = "aliquī" forms["nom_pl_f"] = "aliquae" forms["nom_pl_n"] = "aliqua" forms["gen_sg_m"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_f"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_n"] = {"alicuius", "aliquoius{†}"} forms["gen_pl_m"] = "aliquōrum" forms["gen_pl_f"] = "aliquārum" forms["gen_pl_n"] = "aliquōrum" forms["dat_sg_m"] = {"alicui", "aliquoi{†}"} forms["dat_sg_f"] = {"alicui", "aliquoi{†}"} forms["dat_sg_n"] = {"alicui", "aliquoi{†}"} forms["dat_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["acc_sg_m"] = "aliquem" forms["acc_sg_f"] = "aliquam" forms["acc_sg_n"] = "aliquod" forms["acc_pl_m"] = "aliquōs" forms["acc_pl_f"] = "aliquās" forms["acc_pl_n"] = "aliqua" forms["abl_sg_m"] = "aliquō" forms["abl_sg_f"] = "aliquā" forms["abl_sg_n"] = "aliquō" forms["abl_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} elseif arg1 == "quisquam" then insert_if_not(data.title, "determinante indefinido, concordancia en negativo") data.note = "En latín clásico, era preferidas las formas de ''ūllus'' en lugar de las esta voz para el femenino y el neutro." forms["nom_sg_m"] = "quisquam" forms["nom_sg_f"] = {"quaequam", "quisquam{†}"} forms["nom_sg_n"] = "quodquam" forms["nom_pl_m"] = "quīquam" forms["nom_pl_f"] = "quaequam" forms["nom_pl_n"] = "quaequam" forms["gen_sg_m"] = "cuiusquam" forms["gen_sg_f"] = "cuiusquam" forms["gen_sg_n"] = "cuiusquam" forms["gen_pl_m"] = "quōrumquam" forms["gen_pl_f"] = "quārumquam" forms["gen_pl_n"] = "quōrumquam" forms["dat_sg_m"] = "cuiquam" forms["dat_sg_f"] = "cuiquam" forms["dat_sg_n"] = "cuiquam" forms["dat_pl_m"] = "quibusquam" forms["dat_pl_f"] = "quibusquam" forms["dat_pl_n"] = "quibusquam" forms["acc_sg_m"] = "quemquam" forms["acc_sg_f"] = {"quamquam", "quemquam{†}"} forms["acc_sg_n"] = "quodquam" forms["acc_pl_m"] = "quōsquam" forms["acc_pl_f"] = "quāsquam" forms["acc_pl_n"] = "quaequam" forms["abl_sg_m"] = {"quōquam", "quīquam{†}"} forms["abl_sg_f"] = "quāquam" forms["abl_sg_n"] = "quōquam" forms["abl_pl_m"] = "quibusquam" forms["abl_pl_f"] = "quibusquam" forms["abl_pl_n"] = "quibusquam" forms["voc_sg_m"] = "quisquam" forms["voc_sg_f"] = "quaequam" forms["voc_sg_n"] = "quodquam" forms["voc_pl_m"] = "quīquam" forms["voc_pl_f"] = "quaequam" forms["voc_pl_n"] = "quaequam" elseif arg1 == "quisquis" then insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = "quisquis" forms["nom_sg_f"] = "quisquis" forms["nom_sg_n"] = {"quidquid", "quicquid"} forms["nom_pl_m"] = "quīquī" forms["nom_pl_f"] = "quaequae" forms["nom_pl_n"] = "quaequae" forms["gen_sg_m"] = "cuiuscuius" forms["gen_sg_f"] = "cuiuscuius" forms["gen_sg_n"] = "cuiuscuius" forms["gen_pl_m"] = "quōrumquōrum" forms["gen_pl_f"] = "quārumquārum" forms["gen_pl_n"] = "quōrumquōrum" forms["dat_sg_m"] = "cuicui" forms["dat_sg_f"] = "cuicui" forms["dat_sg_n"] = "cuicui" forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"} forms["acc_sg_m"] = "quemquem" forms["acc_sg_f"] = "quamquam" forms["acc_sg_n"] = {"quidquid", "quicquid"} forms["acc_pl_m"] = "quōsquōs" forms["acc_pl_f"] = "quāsquās" forms["acc_pl_n"] = "quaequae" forms["abl_sg_m"] = "quōquō" forms["abl_sg_f"] = "quāquā" forms["abl_sg_n"] = "quōquō" forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"} forms["voc_sg_m"] = "quisquis" forms["voc_sg_f"] = "quisquis" forms["voc_sg_n"] = {"quidquid", "quicquid"} forms["voc_pl_m"] = "quīquī" forms["voc_pl_f"] = "quaequae" forms["voc_pl_n"] = "quaequae" elseif arg1 == "ecquis" then insert_if_not(data.title, "pronombre interrogativo") forms["nom_sg_m"] = {"ecquis", "ecquī"} forms["nom_sg_f"] = {"ecqua", "ecquae"} forms["nom_sg_n"] = "ecquid" forms["nom_pl_m"] = "ecquī" forms["nom_pl_f"] = "ecquae" forms["nom_pl_n"] = {"ecqua", "ecquae"} forms["gen_sg_m"] = "eccuius" forms["gen_sg_f"] = "eccuius" forms["gen_sg_n"] = "eccuius" forms["dat_sg_m"] = "eccui" forms["dat_sg_f"] = "eccui" forms["dat_sg_n"] = "eccui" forms["acc_sg_m"] = "ecquem" forms["acc_sg_f"] = "ecquam" forms["acc_sg_n"] = "ecquod" forms["acc_pl_m"] = "ecquōs" forms["acc_pl_f"] = "ecquās" forms["acc_pl_n"] = {"ecqua", "ecquae"} forms["abl_sg_m"] = {"ecquō", "ecquī"} forms["abl_sg_f"] = {"ecquā", "ecquī"} forms["abl_sg_n"] = {"ecquō", "ecquī"} elseif arg1 == "quīdam" then insert_if_not(data.title, "pronombre indefinido") forms["nom_sg_m"] = "quīdam" forms["nom_sg_f"] = "quaedam" forms["nom_sg_n"] = "quiddam" forms["nom_pl_m"] = {"quīdam", "quēsdam{†}"} forms["nom_pl_f"] = "quaedam" forms["nom_pl_n"] = "quaedam" forms["gen_sg_m"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_f"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_n"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_pl_m"] = {"quōrundam", "quōrumdam"} forms["gen_pl_f"] = {"quārundam", "quārumdam"} forms["gen_pl_n"] = {"quōrundam", "quōrumdam"} forms["dat_sg_m"] = {"cuidam", "quoidam{†}"} forms["dat_sg_f"] = {"cuidam", "quoidam{†}"} forms["dat_sg_n"] = {"cuidam", "quoidam{†}"} forms["dat_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_n"] = {"quibusdam", "quīsdam{†}"} forms["acc_sg_m"] = {"quendam", "quemdam"} forms["acc_sg_f"] = {"quandam", "quamdam"} forms["acc_sg_n"] = "quiddam" forms["acc_pl_m"] = {"quōsdam", "quēsdam{†}"} forms["acc_pl_f"] = "quāsdam" forms["acc_pl_n"] = "quaedam" forms["abl_sg_m"] = "quōdam" forms["abl_sg_f"] = "quādam" forms["abl_sg_n"] = "quōdam" forms["abl_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_n"] = {"quibusdam", "quīsdam{†}"} elseif arg1 == "nēmō" then insert_if_not(data.title, "Determinante y pronombre, concordancia en negativo") forms["nom_sg_m"] = "nēmō" forms["nom_sg_f"] = "nēmō" forms["gen_sg_m"] = {"nūllī̆us", "nēminis{R}"} forms["gen_sg_f"] = {"nūllī̆us", "nēminis{R}"} forms["dat_sg_m"] = "nēminī" forms["dat_sg_f"] = "nēminī" forms["acc_sg_m"] = "nēminem" forms["acc_sg_f"] = "nēminem" forms["abl_sg_m"] = {"nūllō", "nēmine{R}"} forms["abl_sg_f"] = {"nūllā", "nēmine{R}"} else error('adjective ' .. arg1 .. ' not recognized') end end local function extract_base(lemma, ending) if ending:find("(", nil, true) then return match(lemma, ending) end return match(lemma, "^(.*)" .. ending .. "$") end local function get_noun_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local subtypes = ending_and_subtypes[2] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. -- In addition, M or F as a subtype is canceled by N, and -- vice-versa, but M doesn't cancel F or vice-versa; instead, -- we simply ignore the conflicting gender specification when -- constructing the combination of specified and inferred subtypes. -- The reason for this is that neuters have distinct declensions -- from masculines and feminines, but masculines and feminines have -- the same declension, and various nouns in Latin that are -- normally masculine are exceptionally feminine and vice-versa -- (nauta, agricola, fraxinus, malus "apple tree", manus, rēs, -- etc.). -- -- In addition, sg as a subtype is canceled by pl and vice-versa. -- It's also possible to specify both, which will override sg but -- not cancel it (in the sense that it won't prevent the relevant -- rule from matching). For example, there's a rule specifying that -- lemmas beginning with a capital letter and ending in -ius take -- the ius.voci.sg subtypes. Specifying such a lemma with the -- subtype both will result in the ius.voci.both subtypes, whereas -- specifying such a lemma with the subtype pl will cause this rule -- not to match, and it will fall through to a less specific rule -- that returns just the ius subtype, which will be combined with -- the explicitly specified pl subtype to produce ius.pl. if specified_subtypes["-" .. subtype] or subtype == "N" and (specified_subtypes.M or specified_subtypes.F) or (subtype == "M" or subtype == "F") and specified_subtypes.N or subtype == "sg" and specified_subtypes.pl or subtype == "pl" and specified_subtypes.sg then not_this_subtype = true break end end end if not not_this_subtype then if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] local base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending == stem2 then return base, stem2, subtypes end else local base = extract_base(lemma, ending) if base then return base, stem2, subtypes end end end end if decltype then error("Unrecognized ending for declension-" .. decltype .. " noun: " .. lemma) end return lemma, stem2, keys_to_list(specified_subtypes) end local patterns = { {"[mM]a", "%0t"}, {"e", ""}, {"([aoAO])([lr])", "%1" .. MACRON .. "%2"}, {"[eE]l", "%0l"}, {"([mM])en", "%1in"}, {"([tT]ūd)ō", "%1in"}, {"([gG])ō", "%1in"}, {"[ōŌ]", "%1n"}, {"er", "r"}, {"[ēi]s", ""}, {"([āēīōūȳĀĒĪŌŪȲ]n)s", function(v) return (gsub(toNFD(v), MACRON, "") .. "t") end}, {"([cC])eps", "%1ipit"}, {"([bp])s", "%1"}, {"us", "or"}, {"s", "t"}, {"ex", "ic"}, {"x", "c"}, } local function make_stem2(stem) local n for _, pattern in ipairs(patterns) do local key = pattern[1] stem, n = gsub(stem, key .. "$", pattern[2]) if n > 0 then -- debug_track("la-utilities/" .. key) REVISAR return toNFC(stem) end end -- debug_track("la-utilities") REVISAR return stem end local function detect_noun_subtype(lemma, stem2, typ, subtypes) local base, _ if typ == "1" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ām", {"F", "am"}}, {"ās", {"M", "Greek", "Ma"}}, {"ēs", {"M", "Greek", "Me"}}, {"ē", {"F", "Greek"}}, {"ae", {"F", "pl"}}, {"a", {"F"}}, }) elseif typ == "2" then local detected_subtypes lemma, stem2, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(.*r)$", {"M", "er"}}, {"^(.*v)os$", {"M", "vos"}}, {"^(.*v)om$", {"N", "vom"}}, -- If the lemma ends in -os and the user said N or -M, then the -- following won't apply, and the second (neuter) -os will applly. {"os", {"M", "Greek"}}, {"os", {"N", "Greek", "us"}}, {"on", {"N", "Greek"}}, -- -ius beginning with a capital letter is assumed a proper name, -- and takes the voci subtype (vocative in -ī) along with the ius -- subtype and sg-only. Other nouns in -ius just take the ius -- subtype. Explicitly specify "sg" so that if .pl is given, -- this rule won't apply. {"^(%u.*)ius$", {"M", "ius", "voci", "sg"}}, {"ius", {"M", "ius"}}, {"ium", {"N", "ium"}}, -- If the lemma ends in -us and the user said N or -M, then the -- following won't apply, and the second (neuter) -us will applly. {"us", {"M"}}, {"us", {"N", "us"}}, {"um", {"N"}}, {"iī", {"M", "ius", "pl"}}, {"ia", {"N", "ium", "pl"}}, -- If the lemma ends in -ī and the user said N or -M, then the -- following won't apply, and the second (neuter) -ī will applly. {"ī", {"M", "pl"}}, {"ī", {"N", "us", "pl"}}, {"oe", {"M", "Greek", "pl"}}, {"a", {"N", "pl"}}, }) stem2 = stem2 or lemma return lemma, stem2, detected_subtypes elseif typ == "3" then if subtypes.pl then if subtypes.Greek then base = lemma:match("^(.*)erēs$") if base then return base .. "ēr", base .. "er", {"er"} end base = lemma:match("^(.*)ontēs$") if base then return base .. "ōn", base .. "ont", {"on"} end base = lemma:match("^(.*)es$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural Greek noun: " .. lemma) end base = lemma:match("^(.*)ia$") if base then return base, stem2 or base, {"N", "I", "pure"} end base = lemma:match("^(.*)a$") if base then return base, stem2 or base, {"N"} end base = lemma:match("^(.*)ēs$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural noun: " .. lemma) end stem2 = stem2 or make_stem2(lemma) local detected_subtypes if subtypes.Greek then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"is", ""}, {"I"}}, {"ēr", {"er"}}, {"ōn", {"on"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} end if not subtypes.N then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"^(%u.*pol)is$", ""}, {"F", "polis", "sg", "loc"}}, {{"tūdō", "tūdin"}, {"F"}}, {{"tās", "tāt"}, {"F"}}, {{"tūs", "tūt"}, {"F"}}, {{"tiō", "tiōn"}, {"F"}}, {{"siō", "siōn"}, {"F"}}, {{"xiō", "xiōn"}, {"F"}}, {{"gō", "gin"}, {"F"}}, {{"or", "ōr"}, {"M"}}, {{"tr[iī]x", "trīc"}, {"F"}}, {{"is", ""}, {"I"}}, {{"^(%l.*)ēs$", ""}, {"I"}}, }) if base then return lemma, stem2, detected_subtypes end end base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"us", "or"}, {"N"}}, {{"us", "er"}, {"N"}}, {{"ma", "mat"}, {"N"}}, {{"men", "min"}, {"N"}}, {{"^(%u.*)e$", ""}, {"N", "sg"}}, {{"e", ""}, {"N", "I", "pure"}}, {{"al", "āl"}, {"N", "I", "pure"}}, {{"ar", "ār"}, {"N", "I", "pure"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} elseif typ == "4" then if subtypes.echo or subtypes.Callisto then base = lemma:match("^(.*)ō$") if not base then error("Declension-4 noun of subtype .echo or .Callisto should end in -ō: " .. lemma) end if subtypes.Callisto then return base, nil, {"F", "sg"} else return base, nil, {"F"} end end return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", {"M"}}, {"ū̆", {"N"}}, {"ūs", {"M", "pl"}}, {"ua", {"N", "pl"}}, }) elseif typ == "5" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"iēs", {"F", "i"}}, {"iēs", {"F", "i", "pl"}}, {"ēs", {"F"}}, {"ēs", {"F", "pl"}}, }) elseif typ == "sgpl" then return lemma, stem2, {} elseif typ == "irreg" and lemma == "domus" then -- [[domus]] auto-sets data.loc = true, but we need to know this -- before declining the noun so we can propagate it to other segments. return lemma, nil, {"loc"} elseif typ == "indecl" or typ == "irreg" and ( lemma == "Deus" or match(lemma, "^[IJ]ēs[uū]s$") or lemma == "Athōs" or lemma == "vēnum" ) then -- Indeclinable nouns, and certain irregular nouns, set data.num = "sg", -- but we need to know this before declining the noun so we can -- propagate it to other segments. return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", {"both"}}, {"", {"sg"}}, {"", {"pl"}}, }) elseif typ == "indecl" or typ == "irreg" then return lemma, nil, {} else return nil, nil, {} end end -- Given ENDINGS_AND_SUBTYPES (a list of four-tuples of ENDING, RETTYPE, -- SUBTYPES, PROCESS_RETVAL), check each ENDING in turn against LEMMA and -- STEM2. If it matches, return a four-tuple BASE, STEM2, RETTYPE, NEW_SUBTYPES -- where BASE is normally the remainder of LEMMA minus the ending, STEM2 is -- as passed in, RETTYPE is as passed in, and NEW_SUBTYPES is the same as -- SUBTYPES minus any subtypes beginning with a hyphen. If no endings match, -- throw an error if DECLTYPPE is non-nil, mentioning the DECLTYPE -- (user-specified declension); but if DECLTYPE is nil, just return the tuple -- nil, nil, nil, nil. -- -- In order for a given entry to match, ENDING must match and also the subtypes -- in SUBTYPES (a list) must not be incompatible with the passed-in -- user-specified subtypes SPECIFIED_SUBTYPES (a set, i.e. a table where the -- keys are strings and the value is always true). "Incompatible" means that -- a given SUBTYPE is specified in either one and -SUBTYPE in the other, or -- that "pl" is found in SPECIFIED_SUBTYPES and not in SUBTYPES. -- -- The ending spec in ENDINGS_AND_SUBTYPES is one of the following: -- -- 1. A simple string, e.g. "tūdō", specifying an ending. -- 2. A regex that should match the entire lemma (it should be anchored at -- the beginning with ^ and at the end with $), and contains a single -- capturing group to match the base. -- 3. A pair {SIMPLE_STRING_OR_REGEX, STEM2_ENDING} where -- SIMPLE_STRING_OR_REGEX is one of the previous two possibilities and -- STEM2_ENDING is a string specifying the corresponding ending that must -- be present in STEM2. If this form is used, the combination of -- base + STEM2_ENDING must exactly match STEM2 in order for this entry -- to be considered a match. An example is {"is", ""}, which will match -- lemma == "follis", stem2 == "foll", but not lemma == "lapis", -- stem2 == "lapid". -- -- If PROCESS_STEM2 is given and the returned STEM2 would be nil, call -- process_stem2(BASE) to get the STEM2 to return. local function get_adj_type_and_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes, process_stem2) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local rettype = ending_and_subtypes[2] local subtypes = ending_and_subtypes[3] local process_retval = ending_and_subtypes[4] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. if specified_subtypes["-" .. subtype] then not_this_subtype = true break end -- A subtype is canceled if the user specified SUBTYPE and -- -SUBTYPE is given in the to-be-returned subtypes. local must_not_be_present = subtype:match("^%-(.*)$") if must_not_be_present and specified_subtypes[must_not_be_present] then not_this_subtype = true break end end end if not not_this_subtype then local base if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending ~= stem2 then base = nil end else base = extract_base(lemma, ending) end if base then -- Remove subtypes of the form -SUBTYPE from the subtypes -- to be returned. local new_subtypes = {} for _, subtype in ipairs(subtypes) do if subtype:sub(1, 1) ~= "-" then insert(new_subtypes, subtype) end end if process_retval then base, stem2 = process_retval(base, stem2) end if process_stem2 then stem2 = stem2 or process_stem2(base) end return base, stem2, rettype, new_subtypes end end end if not decltype then return lemma, stem2, nil, keys_to_list(specified_subtypes) elseif decltype == "" then error("Unrecognized ending for adjective: " .. lemma) else error("Unrecognized ending for declension-" .. decltype .. " adjective: " .. lemma) end end -- Autodetect the type and subtype of an adjective given all the information -- specified by the user: lemma, stem2, declension type and specified subtypes. -- Four values are returned: the lemma base (i.e. the stem of the lemma, as -- required by the declension functions), the value of stem2 to pass to the -- declension function, the declension type and the autodetected subtypes. -- Note that this will not detect a given subtype if -SUBTYPE is specified for -- any subtype that would be returned, or if SUBTYPE is specified and -SUBTYPE -- is among the subtypes that would be returned (such subtypes are filtered out -- of the returned subtypes). local function detect_adj_type_and_subtype(lemma, stem2, typ, subtypes) local function base_as_stem2(base, stem2) return base, base end local function constant_base(baseval) return function(base, stem2) return baseval, nil end end local function decl12_stem2(base) return base end local function decl3_stem2(base) return make_stem2(base) end local decl12_entries = { {"us", "1&2+", {}}, {"a", "1&2+", {}}, {"um", "1&2+", {}}, {"ī", "1&2+", {"pl"}}, {"ae", "1&2+", {"pl"}}, {"a", "1&2+", {"pl"}}, -- Nearly all -os adjectives are greekA {"os", "1&2+", {"greekA", "-greekE"}}, {"os", "1&2+", {"greekE", "-greekA"}}, {"ē", "1&2+", {"greekE", "-greekA"}}, {"on", "1&2+", {"greekA", "-greekE"}}, {"on", "1&2+", {"greekE", "-greekA"}}, {"^(.*er)$", "1&2+", {"er"}}, {"^(.*ur)$", "1&2+", {"er"}}, {"^(h)ic$", "1&2+", {"ic"}}, } local decl3_entries = { {"^(.*er)$", "3-3+", {"I"}}, {"^(.*er)$", "3-3+", {}}, {"is", "3-2+", {"I"}}, {"is", "3-2+", {}}, {"e", "3-2+", {"I"}}, {"e", "3-2+", {}}, {"^(.*[ij])or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(.*[ij])or$", "3-C+", {}}, {"^(min)or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(min)or$", "3-C+", {}}, {"^(.*trīx)$", "3-def+", {"trix", "abl_i_e", "-abl_e_i"}}, {"^(.*trīx)$", "3-def+", {"trix"}}, {"^(.*tor)$", "3-def+", {"tor", "abl_i_e", "-abl_e_i"}}, {"^(.*tor)$", "3-def+", {"tor"}}, -- Detect -ēs as 3-1 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like quadripēs, volucripēs). -- Essentially, for declension-3 adjectives, we require that -- .pl is given if the lemma is plural. -- -- Most 3-1 adjectives are i-stem (e.g. audāx) so we require -I -- to be given with non-i-stem adjectives. The first entry below -- will apply when -I isn't given, the second when it is given. {"^(.*ēs)$", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"I"}}, {"^(.*ēs)$", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"par"}}, {"^(.*[ij])ōrēs$", "3-C+", {"pl"}}, {"^(min)ōrēs$", "3-C+", {"pl"}}, -- If .pl with -ēs, we don't know if the adjective is 3-1, 3-2 -- or 3-3. Since 3-2 is probably the most common, we infer it -- (as well as the fact that these adjectives *are* in a sense -- 3-2 since they have a distinct neuter in -(i)a. Note that -- we have two entries here; the first one will apply unless -- -I is given, and will infer an i-stem adjective; the second -- one will apply otherwise (and infer a non-i-stem 3-1 adjective). {"ēs", "3-2+", {"pl", "I"}, base_as_stem2}, {"ēs", "3-1+", {"pl", "par"}, base_as_stem2}, -- Same for neuters. {"ia", "3-2+", {"pl", "I"}, base_as_stem2}, {"a", "3-1+", {"pl", "par"}, base_as_stem2}, -- As above for -ēs but for miscellaneous singulars. {"", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"I"}}, {"", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"par"}}, } local function get_subtypes_and_endings(typ, f) local subtypes_and_endings = {} for _, v in ipairs(decl3_entries) do if f(v) then v = deep_copy(v) v[2] = typ insert(subtypes_and_endings, v) end end return subtypes_and_endings end local function compare(spec) return spec[2] == typ end if typ == "+" then local base, new_stem2, rettype, new_subtypes = get_adj_type_and_subtype_by_ending(lemma, stem2, nil, subtypes, decl12_entries, decl12_stem2) if rettype then return base, new_stem2, rettype, new_subtypes else return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) end elseif typ == "3+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) elseif typ == "1&2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl12_entries, decl12_stem2) elseif typ == "1-1+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"a", typ, {}}, {"ae", typ, {"pl"}}, }) elseif typ == "2-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", typ, {}}, {"um", typ, {}}, {"ī", typ, {"pl"}}, {"a", typ, {"pl"}}, {"os", typ, {"greek"}}, {"on", typ, {"greek"}}, {"oe", typ, {"greek", "pl"}}, }) elseif typ == "3-1+" then -- Use the specs from `decl3_entries`, but add the two i-stem 3-2+ specs when plural-only, as they're the same when 3-1+. local subtypes_and_endings = get_subtypes_and_endings(typ, function(spec) local spec1, spec2 = spec[1], spec[2] return spec2 == typ or (spec2 == "3-2+" and spec1 == "ēs" or spec1 == "ia") end) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-def+" then -- Like 3-1+ but defective in gender local subtypes_and_endings = get_subtypes_and_endings(typ, compare) insert(subtypes_and_endings, {"", typ, {"I"}}) insert(subtypes_and_endings, {"", typ, {"par"}}) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"is", typ, {}}, {"e", typ, {}}, -- Detect -ēs as 3-2 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like isoscelēs). Essentially, -- for declension-3 adjectives, we require that .pl is given -- if the lemma is plural. {"ēs", typ, {}}, {"ēs", typ, {"pl"}}, {"ia", typ, {"pl"}}, }, decl3_stem2) elseif typ == "3-3+" or typ == "3-P+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ēs", typ, {"pl"}, base_as_stem2}, {"ia", typ, {"pl"}, base_as_stem2}, {"", typ, {}}, }, decl3_stem2) elseif typ == "3-C+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, get_subtypes_and_endings(typ, compare), decl3_stem2) elseif typ == "irreg+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(duo)$", typ, {"pl"}}, {"^(ambō)$", typ, {"pl"}}, {"^(mīll?ia)$", typ, {"N", "pl"}, constant_base("mīlle")}, -- match ea {"^(ea)$", typ, {}, constant_base("is")}, -- match id {"^(id)$", typ, {}, constant_base("is")}, -- match plural eī, iī {"^([ei]ī)$", typ, {"pl"}, constant_base("is")}, -- match plural ea, eae {"^(eae?)$", typ, {"pl"}, constant_base("is")}, -- match eadem {"^(eadem)$", typ, {}, constant_base("īdem")}, -- match īdem, idem {"^([īi]dem)$", typ, {}, constant_base("īdem")}, -- match plural īdem {"^(īdem)$", typ, {"pl"}}, -- match plural eadem, eaedem {"^(eae?dem)$", typ, {"pl"}, constant_base("īdem")}, -- match illa, ipsa, ista; it doesn't matter if we overmatch because -- we'll get an error as we use the stem itself in the returned base {"^(i[lps][lst])a$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match illud, istud; as above, it doesn't matter if we overmatch {"^(i[ls][lt])ud$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match ipsum {"^(ipsum)$", typ, {}, constant_base("ipse")}, -- match plural illī, ipsī, istī; as above, it doesn't matter if we -- overmatch {"^(i[lps][lst])ī$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- match plural illa, illae, ipsa, ipsae, ista, istae; as above, it -- doesn't matter if we overmatch {"^(i[lps][lst])ae?$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- Detect quī as non-plural unless .pl specified. {"^(quī)$", typ, {}}, -- Otherwise detect quī as plural. {"^(quī)$", typ, {"pl"}}, -- Same for quae. {"^(quae)$", typ, {}, constant_base("quī")}, {"^(quae)$", typ, {"pl"}, constant_base("quī")}, {"^(quid)$", typ, {}, constant_base("quis")}, {"^(quod)$", typ, {}, constant_base("quī")}, {"^(qui[cd]quid)$", typ, {}, constant_base("quisquis")}, {"^(quīquī)$", typ, {"pl"}, constant_base("quisquis")}, {"^(quaequae)$", typ, {"pl"}, constant_base("quisquis")}, -- match all remaining lemmas in lemma form {"", typ, {}}, }) elseif typ == "indecl+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", typ, {"both"}}, {"", typ, {"sg"}}, {"", typ, {"pl"}}, }) else -- 0+ return lemma, nil, typ, {} end end local noun_lb = { nom_sg = "sg.", gen_sg = "sg.", dat_sg = "sg.", acc_sg = "sg.", abl_sg = "sg.", voc_sg = "sg.", loc_sg = "sg.", nom_pl = "pl.", gen_pl = "pl.", dat_pl = "pl.", acc_pl = "pl.", abl_pl = "pl.", voc_pl = "pl.", loc_pl = "pl." } function export.sust(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de = "num"}, ["nota"] = {}, } for form,_ in pairs(noun_lb) do params[form] = {lista=true} end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local genero local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, detected_subtypes = detect_noun_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end if not genero then if types.M then genero = "m" end if types.N then genero = "n" end if types.F then genero = "f" end end local es_adj if not r1 and genero then local typ r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) if r1 then c = typ es_adj = true end end assert(r1, "forma no reconocida: "..r[1]) local cb = es_adj and adj_decl[c] or noun_decl[c] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) if es_adj then local forms_ = {} for form,arr in pairs(data.forms) do local f1, f2 = form:match("^(.*)(_"..genero..")$") if f1 then forms_[f1] = arr end end data.forms = forms_ end if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, noun_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if declinfo["loc_sg"] and #declinfo["loc_sg"] == 0 then declinfo["loc_sg"] = nil end if declinfo["loc_pl"] and #declinfo["loc_pl"] == 0 then declinfo["loc_pl"] = nil end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local forms = sobreescribir_formas(declinfo, args, false, {}) comprobar_defectivo(forms, {}) forms = desactivar_formas(forms, function (form) return (form:find("pl$") and nopl) or (form:find("sg$") and nosg) end ) local raiz_nom = f(forms["nom_sg"][1] or forms["nom_pl"][1] or "?") local raiz_gen = f(forms["gen_sg"][1] or forms["gen_pl"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, noun_lb) local t = {} insert(t, {{""}, {"Singular"}, {"Plural"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg"], forms["nom_pl"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg"], forms["gen_pl"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg"], forms["dat_pl"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg"], forms["acc_pl"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg"], forms["abl_pl"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg"], forms["voc_pl"]}) if (forms["loc_sg"] and forms["loc_sg"][1]) or (forms["loc_pl"] and forms["loc_pl"][1]) then insert(t, {{"Locativo", header=true, color=COLOR_H}, forms["loc_sg"], forms["loc_pl"]}) end insert(t, {{args["nota"] or "", colspan=3}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_nom..", "..raiz_gen.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local adj_lb = { nom_sg_m = "m.", nom_sg_n = "n.", nom_sg_f = "f.", nom_pl_m = "m.", nom_pl_n = "n.", nom_pl_f = "f.", gen_sg_m = "m.", gen_sg_n = "n.", gen_sg_f = "f.", gen_pl_m = "m.", gen_pl_n = "n.", gen_pl_f = "f.", dat_sg_m = "m.", dat_sg_n = "n.", dat_sg_f = "f.", dat_pl_m = "m.", dat_pl_n = "n.", dat_pl_f = "f.", acc_sg_m = "m.", acc_sg_n = "n.", acc_sg_f = "f.", acc_pl_m = "m.", acc_pl_n = "n.", acc_pl_f = "f.", abl_sg_m = "m.", abl_sg_n = "n.", abl_sg_f = "f.", abl_pl_m = "m.", abl_pl_n = "n.", abl_pl_f = "f.", voc_sg_m = "m.", voc_sg_n = "n.", voc_sg_f = "f.", voc_pl_m = "m.", voc_pl_n = "n.", voc_pl_f = "f.", } function export.adj(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de="num"}, ["gen"] = {por_defecto="mfn"}, ["nota"] = {}, } for form,_ in pairs(adj_lb) do params[form] = {lista=true} end params["dat_pl"] = {lista=true} params["abl_pl"] = {lista=true} params["loc_pl"] = {lista=true} local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) if args["dat_pl"][1] then args["dat_pl_m"] = deep_copy(args["dat_pl"]) args["dat_pl_n"] = deep_copy(args["dat_pl"]) args["dat_pl_f"] = deep_copy(args["dat_pl"]) end if args["abl_pl"][1] then args["abl_pl_m"] = deep_copy(args["abl_pl"]) args["abl_pl_n"] = deep_copy(args["abl_pl"]) args["abl_pl_f"] = deep_copy(args["abl_pl"]) end if args["loc_pl"][1] then args["loc_pl_m"] = deep_copy(args["loc_pl"]) args["loc_pl_n"] = deep_copy(args["loc_pl"]) args["loc_pl_f"] = deep_copy(args["loc_pl"]) end args["dat_pl"] = nil args["abl_pl"] = nil args["loc_pl"] = nil assert(not find(title, " "), "locuciones no soportadas aún") -- REVISAR local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") a = a or subarg b = b or "+" local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end local cb = adj_decl[typ] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) local formas_ = {} -- necesario crear otro arreglo para no modificar las claves durante la iteración for form,arr in pairs(data.forms) do local pref = match(form, "^(.*)_m$") if pref and not data.forms[pref.."_f"] then formas_[pref.."_f"] = deep_copy(arr) end if pref and not data.forms[pref.."_n"] then formas_[pref.."_n"] = deep_copy(arr) end formas_[form] = arr end data.forms = formas_ if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, adj_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local m = find(args["gen"], "m") local fem = find(args["gen"], "f") local n = find(args["gen"], "n") local forms = sobreescribir_formas(declinfo, args, false, {}, adj_lb) comprobar_defectivo(forms) forms = desactivar_formas(forms, function (form) return (form:find("pl") and nopl) or (form:find("sg") and nosg) or (form:find("m$") and not m) or (form:find("f$") and not fem) or (form:find("n$") and not n) end ) local raiz_m = f(forms["nom_sg_m"][1] or forms["nom_pl_m"][1] or "?") local raiz_f = f(forms["nom_sg_f"][1] or forms["nom_pl_f"][1] or "?") local raiz_n = f(forms["nom_sg_n"][1] or forms["nom_pl_n"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, adj_lb) local t = {} insert(t, {{"Singular", colspan=4}, header=true, color=COLOR_H}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg_m"], forms["nom_sg_f"], forms["nom_sg_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg_m"], forms["gen_sg_f"], forms["gen_sg_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg_m"], forms["dat_sg_f"], forms["dat_sg_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg_m"], forms["acc_sg_f"], forms["acc_sg_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg_m"], forms["abl_sg_f"], forms["abl_sg_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg_m"], forms["voc_sg_f"], forms["voc_sg_n"]}) insert(t, {{"Plural", colspan=4, header=true, color=COLOR_H}}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_pl_m"], forms["nom_pl_f"], forms["nom_pl_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_pl_m"], forms["gen_pl_f"], forms["gen_pl_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_pl_m"], forms["dat_pl_f"], forms["dat_pl_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_pl_m"], forms["acc_pl_f"], forms["acc_pl_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_pl_m"], forms["abl_pl_f"], forms["abl_pl_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_pl_m"], forms["voc_pl_f"], forms["voc_pl_n"]}) insert(t, {{args["nota"] or "", colspan=4}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_m..", "..raiz_f..", "..raiz_n.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local EGO, TU, IS, NOS, VOS, EI = 1, 2, 3, 4, 5, 6 local tostr = {"1", "2", "3", "4", "5", "6"} local PRONOMBRES = {"ego", "tū", "is, ea, id", "nōs", "vōs", "eī, eae, ea"} local PRONOMBRES_SUBJ = {"ut ego", "ut tū", "ut is, ut ea, ut id", "ut nōs", "ut vōs", "ut eī, ut eae, ut ea"} local PRONOMBRES_IMP = {"―", "(tū)", "(is, ea, id)", "―", "(vōs)", "(eī, eae, ea)"} local IMPERSONALES = {"", "", "(id)", "", "", ""} local function obtener_pronombre(forma, impers) local conj, p = match(forma, "^(.*)(%d)$") if not p then return nil end p = tonumber(p) if impers then return IMPERSONALES[p] else if find(conj, "^subj") then return PRONOMBRES_SUBJ[p] end if find(conj, "^imper") then return PRONOMBRES_IMP[p] end return PRONOMBRES[p] end end local sufijos = { ["1"] = { inf_act = {"āre","isse"}, inf_pas = {"ārī"}, part_act = {"āns","ūrus"}, part_pas = {"andus","us"}, ger = {"andī","andō","andum"}, sup = {"um","ū"}, ind_pres = {"ō","ās","at","āmus","ātis","ant"}, ind_imp = {"ābam","ābās","ābat","ābāmus","ābātis","ābant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ābō","ābis","ābit","ābimus","ābitis","ābunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","āris","ātur","āmur","āminī","antur", nil,"āre"}, ind_imp_pas = {"ābar","ābāris","ābātur","ābāmur","ābāminī","ābantur", nil,"ābāre"}, ind_fut_pas = {"ābor","āberis","ābitur","ābimur","ābiminī","ābuntur", nil,"ābere"}, subj_pres = {"em","ēs","et","ēmus","ētis","ent"}, subj_imp = {"ārem","ārēs","āret","ārēmus","ārētis","ārent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"er","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_imp_pas = {"ārer","ārēris","ārētur","ārēmur","ārēminī","ārentur", nil,"ārēre"}, imper_pres = {nil,"ā",nil,nil,"āte",nil}, imper_fut = {nil,"ātō","ātō",nil,"ātōte","antō"}, imper_pres_pas = {nil,"āre",nil,nil,"āminī",nil}, imper_fut_pas = {nil,"ātor","ātor",nil,nil,"antor"}, }, ["2"] = { inf_act = {"ēre","isse"}, inf_pas = {"ērī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"eō","ēs","et","ēmus","ētis","ent"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ēbō","ēbis","ēbit","ēbimus","ēbitis","ēbunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"eor","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ēbor","ēberis","ēbitur","ēbimur","ēbiminī","ēbuntur", nil,"ēbere"}, subj_pres = {"eam","eās","eat","eāmus","eātis","eant"}, subj_imp = {"ērem","ērēs","ēret","ērēmus","ērētis","ērent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ear","eāris","eātur","eāmur","eāminī","eantur", nil,"eāre"}, subj_imp_pas = {"ērer","ērēris","ērētur","ērēmur","ērēminī","ērentur", nil,"ērēre"}, imper_pres = {nil,"ē",nil,nil,"ēte",nil}, imper_fut = {nil,"ētō","ētō",nil,"ētōte","entō"}, imper_pres_pas = {nil,"ēre",nil,nil,"ēminī",nil}, imper_fut_pas = {nil,"ētor","ētor",nil,nil,"entor"}, }, ["3"] = { -- 3 (comparar [[capio]] con [[lego]], las raíces con capi- y leg- pero hay que eliminar la doble ii) inf_act = {"ere","isse"}, inf_pas = {"ī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", nil,"ere"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_pres = {"am","ās","at","āmus","ātis","ant"}, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", nil,"āre"}, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", nil,"erēre"}, imper_pres = {nil,"e",nil,nil,"ite",nil}, imper_fut = {nil,"itō","itō",nil,"itōte","untō"}, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil}, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor"}, }, ["3/4"] = { inf_act = {"ere","isse","īre","isse"}, inf_pas = {"ī","īrī"}, part_act = {"ēns","iēns","ūrus"}, part_pas = {"endus","iendus","us"}, ger = {"endī","endō","endum","iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt", "iō","īs",nil,"īmus","ītis","iunt" }, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant", "iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant" }, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent", "iam","iēs","iet","iēmus","iētis","ient" }, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", "ior","ere","ītur","īmur","īminī","iuntur", nil,"īris",nil,nil,nil,nil, nil,"īre" }, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", "iēbar","ēbāre","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāris",nil,nil,nil,nil, nil,"iēbāre" }, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", "iar","ēre","iētur","iēmur","iēminī","ientur", nil,"iēris",nil,nil,nil,nil, nil,"iēre" }, subj_pres = {"am","ās","at","āmus","ātis","ant", "iam","iās","iat","iāmus","iātis","iant", }, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent", "īrem","īrēs","īret","īrēmus","īrētis","īrent" }, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", "iar","āre","iātur","iāmur","iāminī","iantur", nil,"iāris",nil,nil,nil,nil, nil,"iāre" }, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", "īrer","erēre","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēris",nil,nil,nil,nil, nil,"īrēre" }, imper_pres = {nil,"e",nil,nil,"ite",nil, nil,"ī",nil,nil,"īte",nil }, imper_fut = {nil,"itō","itō",nil,"itōte","untō", nil,"ītō","ītō",nil,"ītōte","iuntō" }, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil, nil,"īre",nil,nil,"īminī",nil }, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor", nil,"ītor","ītor",nil,nil,"iuntor" }, }, ["4"] = { inf_act = {"īre","isse"}, inf_pas = {"īrī"}, part_act = {"iēns","ūrus"}, part_pas = {"iendus","us"}, ger = {"iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"iō","īs","it","īmus","ītis","iunt"}, ind_imp = {"iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"iam","iēs","iet","iēmus","iētis","ient"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"ior","īris","ītur","īmur","īminī","iuntur", nil,"īre"}, ind_imp_pas = {"iēbar","iēbāris","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāre"}, ind_fut_pas = {"iar","iēris","iētur","iēmur","iēminī","ientur", nil,"iēre"}, subj_pres = {"iam","iās","iat","iāmus","iātis","iant"}, subj_imp = {"īrem","īrēs","īret","īrēmus","īrētis","īrent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"iar","iāris","iātur","iāmur","iāminī","iantur", nil,"iāre"}, subj_imp_pas = {"īrer","īrēris","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēre"}, imper_pres = {nil,"ī",nil,nil,"īte",nil}, imper_fut = {nil,"ītō","ītō",nil,"ītōte","iuntō"}, imper_pres_pas = {nil,"īre",nil,nil,"īminī",nil}, imper_fut_pas = {nil,"ītor","ītor",nil,nil,"iuntor"}, } } local formas_no_personales = { inf_act = true, inf_pas = true, part_act = true, part_pas = true, ger = true, sup = true, } local formas_personales = { ind_pres = true, ind_imp = true, ind_perf = true, ind_pluperf = true, ind_fut = true, ind_fut_perf = true, ind_fut_sig = true, ind_pres_pas = true, ind_imp_pas = true, ind_fut_pas = true, subj_pres = true, subj_imp = true, subj_perf = true, subj_pluperf = true, subj_aor_sig = true, subj_pres_pas = true, subj_imp_pas = true, imper_pres = true, imper_fut = true, imper_pres_pas = true, imper_fut_pas = true, } local formas = merge(formas_no_personales, formas_personales) local verbos_irregulares = { {"aiō", {"aiō", "aiiō", "aijō", "ajō"}, { desactivar = {"inf_pas","part_pas","ger","sup","ind_pluperf","ind_fut","ind_fut_perf", "ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_perf","subj_pluperf","subj_pres_pas", "subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {"ai"}, nucleoperf = {"a"}, nucleosup = {}, nucleosigm = {}, inf_act = {"aiere"}, ind_pres = {nil,nil,nil,{}}, ind_perf = {{},nil,nil,{},{}}, subj_pres = {nil,nil,nil,{},{}}, subj_imp = {{},{},nil,{},{},{}}, imper_pres = {{},{"ai"},{},{},{},{}}, }}, {"cedo", {"cedo"}, { desactivar = {"inf_act","inf_pas","part_act","part_pas","ger","sup","ind_pluperf","ind_pres","ind_imp","ind_perf", "ind_fut","ind_fut_perf","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres","subj_imp","subj_perf", "subj_pluperf","subj_pres_pas","subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, imper_pres = {nil,{"cedo"},nil,nil,{"cette","cedile"},nil}, }}, {"edō", {"edō", "ëdō"}, { conj = "3", nucleopres = {"ed"}, nucleoperf = {"ed"}, nucleosup = {""}, nucleosigm = {}, desactivar = {}, inf_act = {"edere","ēsse"}, part_act = {"edēns","ēsūrus","ēssūrus","ēstūrus"}, part_pas = {"edendus","edundus","ēsus","ēssus","ēstus"}, sup = {"ēsum","ēssum","ēstum","ēsū","ēssū","ēstū"}, ind_pres = {nil,{"edis","ēs"},{"edit","ēst"},nil,{"editis","ēstis"},nil}, ind_pres_pas = {nil,{"ederis","edere","ēssis","ēsse"},{"editur","ēstur"}}, subj_pres = {{"edam","edim"},{"edās","edīs"},{"edat","edit","ēst"},{"edāmus","edīmus"},{"edātis","edītis"},{"edant","edint"}}, subj_imp = {{"ederem","ēssem"},{"ederēs","ēssēs"},{"ederet","ēsset"},{"ederēmus","ēssēmus"},{"ederētis","ēssētis"},{"ederent","ēssent"}}, subj_imp_pas = {{"ederer","ēsser"},{"ederēris","ederēre","ēssēris","ēssēre"},{"ederetur","ēssetur"},{"ederēmur","ēssēmur"},{"ederēminī","ēssēminī"},{"ederentur","ēssentur"}}, imper_pres = {nil,{"ede","ēs"},nil,nil,{"edite","ēste"},nil}, imper_fut = {nil,{"editō","ēstō"},{"editō","ēstō"},nil,{"editōte","ēstōte"},{"eduntō"}}, imper_pres_pas = {nil,{"edere","ēsse"},nil,nil,{"ediminī"},nil}, imper_fut_pas = {nil,{"editor","ēstor"},{"editor","ēstor"},nil,nil,{"eduntor"}}, }}, {"dīcō", {"dīcō"}, { conj = "3", nucleopres = {"dīc"}, nucleoperf = {"dīx"}, nucleosup = {"dict"}, nucleosigm = {"dīx"}, desactivar = {}, part_pas = {"dīcendus", "dīcundus", "dictus"}, imper_pres = {nil, {"dīc", "dīce"}}, inf_pas = {"dīcī", "dīcier{L}"}, }}, {"dō", {"dō"}, { conj = "1", nucleopres = {"d"}, nucleoperf = {"ded"}, nucleosup = {"dat"}, nucleosigm = {}, desactivar = {}, inf_act = {"dare","dedisse"}, inf_pas = {"darī"}, ind_pres = {nil,nil,nil,{"damus"},{"datis"},nil}, ind_imp = {{"dabam"},{"dabās"},{"dabat"},{"dabāmus"},{"dabātis"},{"dabant"}}, ind_fut = {{"dabō"},{"dabis"},{"dabit"},{"dabimus"},{"dabitis"},{"dabunt"}}, ind_imp_pas = {{"dabar"},{"dabāris","dabāre"},{"dabātur"},{"dabāmur"},{"dabāminī"},{"dabantur"}}, ind_fut_pas = {{"dabor"},{"daberis","dabere"},{"dabitur"},{"dabimur"},{"dabiminī"},{"dabuntur"}}, subj_imp = {{"darem"},{"darēs"},{"daret"},{"darēmus"},{"darētis"},{"darent"}}, subj_imp_pas = {{"darer"},{"darēris","darēre"},{"darētur"},{"darēmur"},{"darēminī"},{"darentur"}}, imper_pres = {nil,nil,nil,nil,{"date"},nil}, imper_fut = {nil,{"datō"},{"datō"},nil,{"datōte"},{"dantō"}}, imper_pres_pas = {nil,{"dare"},nil,nil,{"daminī"},nil}, imper_fut_pas = {nil,{"dator"},{"dator"},nil,nil,{"dator"}}, }}, {"dūcō", {"dūcō"}, { conj = "3", nucleopres = {"dūc"}, nucleoperf = {"dūx"}, nucleosup = {"duct"}, nucleosigm = {}, desactivar = {}, imper_pres = {nil, {"dūc", "dūce"}}, }}, {"eō", {"eō", "ëō"}, { conj = "4", nucleopres = {""}, nucleoperf = {""}, nucleosup = {""}, nucleosigm = {}, desactivar = {"imper_pres_pas"}, inf_act = {"īre","īsse","iisse","īvisse"}, inf_pas = {"īrī","īrier"}, part_act = {"iēns","itūrus"}, part_pas = {"eundum","itum"}, ger = {"eundī","eundō","eundum"}, sup = {"itum","itū"}, ind_pres = {{"eō"},{"īs"},{"it"},{"īmus"},{"ītis"},{"eunt"}}, ind_imp = {{"ībam"},{"ībās"},{"ībat"},{"ībāmus"},{"ībātis"},{"ībant"}}, ind_perf = {{"iī","īvī"},{"īstī","iistī","īvistī"},{"iit","īvit"},{"iimus","īvimus"},{"īstis","iistis","īvistis"},{"iērunt","iēre","īvērunt","īvēre"}}, ind_pluperf = {{"ieram","īveram"},{"ierās","īverās"},{"ierat","īverat"},{"ierāmus","īverāmus"},{"ierātis","īverātis"},{"ierant","īverant"}}, ind_fut = {{"ībō"},{"ībis"},{"ībit"},{"ībimus"},{"ībitis"},{"ībunt"}}, ind_fut_perf = {{"ierō","īverō"},{"ieris","īveris"},{"ierit","īverit"},{"ierimus","īverimus"},{"ieritis","īveritis"},{"ierint","īverint"}}, ind_fut_sig = {nil,nil,nil,nil,nil,nil}, ind_pres_pas = {{},{},{"ītur"},{},{},{}}, ind_imp_pas = {{},{},{"ībātur"},{},{},{}}, ind_fut_pas = {{},{},{"ībitur"},{},{},{}}, subj_pres = {{"eam"},{"eās"},{"eat"},{"eāmus"},{"eātis"},{"eant"}}, subj_imp = {{"īrem"},{"īrēs"},{"īret"},{"īrēmus"},{"īrētis"},{"īrent"}}, subj_perf = {{"ierim","īverim"},{"ierīs","īverīs"},{"ierit","īverit"},{"ierīmus","īverīmus"},{"ierītis","īverītis"},{"ierint","īverint"}}, subj_pluperf = {{"īssem","iissem","īvissem"},{"īssēs","iissēs","īvissēs"},{"īsset","iisset","īvisset"},{"īssēmus","iissēmus","īvissēmus"},{"īssētis","iissētis","īvissētis"},{"īssent","iissent","īvissent"}}, subj_aor_sig = {nil,nil,nil,nil,nil,nil}, subj_pres_pas = {{},{},{"eātur"},{},{},{}}, subj_imp_pas = {{},{},{"īrētur"},{},{},{}}, imper_pres = {nil,nil,nil,nil,nil,nil}, imper_fut = {nil,nil,nil,nil,nil,{"euntō"}}, imper_fut_pas = {nil,{},nil,nil,nil,{}}, }}, {"faciō", {"faciō"}, { conj = "3", I = true, inf_act = {"facere", "fāre{L}", "fēcisse"}, inf_pas = {"fierī"}, part_pas = {"faciendus", "faciundus", "factus"}, nucleopres = {"fac"}, nucleoperf = {"fēc"}, nucleosup = {"fact"}, nucleosigm = {"fax","faxs","facs"}, desactivar = {}, ind_pres_pas = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, ind_imp_pas = {{"fīēbam"},{"fīēbās"},{"fīēbat"},{"fīēbāmus"},{"fīēbātis"},{"fīēbant"}}, ind_fut_pas = {{"fīam"},{"fīēs"},{"fīet"},{"fīēmus"},{"fīētis"},{"fīent"}}, subj_pres_pas = {{"fīam"},{"fīās"},{"fīat"},{"fīāmus"},{"fīātis"},{"fīant"}}, subj_imp_pas = {{"fierem"},{"fierēs"},{"fieret"},{"fierēmus"},{"fierētis"},{"fierent"}}, imper_pres = {nil,{"fac","face"},nil,nil,nil,nil}, imper_pres_pas = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut_pas = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"ferō", {"ferō"}, { conj = "3", nucleopres = {"fer"}, nucleoperf = {"tul", "tetul{†}"}, nucleosup = {"lāt"}, nucleosigm = {}, desactivar = {}, inf_act = {"ferre", "tulisse", "tetulisse{†}"}, inf_pas = {"ferrī"}, ind_pres = {nil,{"fers"},{"fert"},nil,{"fertis"}}, ind_pres_pas = {nil,{"ferris","ferre"}}, subj_imp = {{"ferrem"},{"ferrēs"},{"ferret"},{"ferrēmus"},{"ferrētis"},{"ferrent"}}, subj_imp_pas = {{"ferrer"},{"ferrēris","ferrēre"},{"ferrētur"},{"ferrēmur"},{"ferrēminī"},{"ferrentur"}}, imper_pres = {nil,{"fer"},nil,nil,{"ferte"},nil}, imper_pres_pas = {nil,{"ferre"},nil,nil,nil,nil}, imper_fut = {nil,{"fertō"},{"fertō"},nil,{"fertōte"},{"feruntō"}}, imper_fut_pas = {nil,{"fertor"},{"fertor"},nil,nil,nil}, }}, {"fīō", {"fīō"}, { conj = "3", nucleopres = {"fī"}, nucleoperf = {}, nucleosup = {"fact"}, nucleosigm = {}, semidep = true, desactivar = {}, inf_act = {"fierī"}, ind_pres = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, imper_pres = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"inquam", {"inquam"}, { conj = "3", I = true, nucleopres = {"inqu"}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, nopasivo = true, desactivar = {"inf_act","inf_pas","part_pas","ger"}, ind_pres = {{"inquam"}}, }}, {"possum", {"possum"}, { conj = "3", nucleopres = {"pot"}, nucleoperf = {"pot"}, nucleosup = {}, nucleosigm = {}, pres = "possō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"posse","potesse{†}"}, part_act = {"potēns"}, ind_pres = {{"possum"},{"potes"},{"potest"},{"possumus"},{"potestis"},{"possunt"}}, ind_imp = {{"poteram"},{"poterās"},{"poterat"},{"poterāmus"},{"poterātis"},{"poterant"}}, ind_fut = {{"poterō"},{"poteris","potere"},{"poterit"},{"poterimus"},{"poteritis"},{"poterunt"}}, ind_perf = {{"potuī"},{"potuistī"},{"potuit"},{"potuimus"},{"potuistis"},{"potuērunt","potuēre"}}, ind_pluperf = {{"potueram"},{"potuerās"},{"potuerat"},{"potuerāmus"},{"potuerātis"},{"potuerant"}}, ind_fut_perf = {{"potuerō"},{"potueris"},{"potuerit"},{"potuerimus"},{"potueritis"},{"potuerunt"}}, subj_pres = {{"possem"},{"possēs"},{"possēt"},{"possēmus"},{"possētis"},{"possent"}}, subj_imp = {{"possim"},{"possīs"},{"possit"},{"possīmus"},{"possītis"},{"possint"}}, subj_perf = {{"potuerim"},{"potuerīs"},{"potuerit"},{"potuerīmus"},{"potuerītis"},{"potuerint"}}, subj_pluperf = {{"potuissem"},{"potuissēs"},{"potuisset"},{"potuissēmus"},{"potuissētis"},{"potuissent"}}, }}, {"sum", {"sum"}, { conj = "3", nucleopres = {"s"}, nucleoperf = {"fu"}, nucleosup = {}, nucleosigm = {}, pres = "sō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres_pas","imper_fut_pas"}, inf_act = {"esse"}, part_act = {"futūrus"}, ind_pres = {{"sum"},{"es"},{"est"},{"sumus"},{"estis"},{"sunt"}}, ind_imp = {{"eram"},{"erās"},{"erat"},{"erāmus"},{"erātis"},{"erant"}}, ind_fut = {{"erō"},{"eris","ere"},{"erit"},{"erimus"},{"eritis"},{"erunt"}}, subj_pres = {{"sim","siem","fuam{†}"},{"sīs","siēs","fuās{†}"},{"sit","siet","fuat{†}"},{"sīmus","siēmus","fuāmus{†}"},{"sītis","siētis","fuātis{†}"},{"sint","sient","fuant{†}"}}, subj_imp = {{"essem","forem"},{"essēs","forēs"},{"esset","foret"},{"essēmus","forēmus"},{"essētis","forētis"},{"essent","forent"}}, imper_pres = {nil,{"es"},nil,nil,{"este"},nil}, imper_fut = {nil,{"estō"},{"estō"},nil,{"estōte"},nil}, }}, {"mālō", {"mālō"}, { conj = "3", nucleopres = {"māl"}, nucleoperf = {"mālu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"mālle","māluisse"}, ind_pres = {{"mālō"},{"māvīs"},{"māvult"},{"mālumus"},{"māvultis"},{"mālunt"}}, subj_pres = {{"mālim"},{"mālīs"},{"mālit"},{"mālīmus"},{"mālītis"},{"mālint"}}, subj_imp = {{"māllem"},{"māllēs"},{"māllet"},{"māllēmus"},{"māllētis"},{"māllent"}}, }}, {"nōlō", {"nōlō"}, { conj = "3", nucleopres = {"nōl"}, nucleoperf = {"nōlu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"nōlle","nōluisse"}, ind_pres = {{"nōlō"},{"nōn vīs","nevīs{†}"},{"nōn vult","nōn volt","nevolt{†}"},{"nōlumus"},{"nōn vultis","nōn voltis","nōltis{†}"},{"nōlunt"}}, subj_pres = {{"nōlim"},{"nōlīs"},{"nōlit"},{"nōlīmus"},{"nōlītis"},{"nōlint"}}, subj_imp = {{"nōllem"},{"nōllēs"},{"nōllet"},{"nōllēmus"},{"nōllētis"},{"nōllent"}}, }}, {"volō", {"volō"}, { conj = "3", nucleopres = {"vol"}, nucleoperf = {"volu"}, nucleosup = {"volit"}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"velle","voluisse"}, ind_pres = {{"volō"},{"vīs"},{"vult","volt{†}"},{"volumus"},{"vultis","voltis{†}"},{"volunt"}}, subj_pres = {{"velim","volim{†}"},{"velīs","volīs{†}"},{"velit","volit{†}"},{"velīmus","volīmus{†}"},{"velītis","volītis{†}"},{"velint","volint{†}"}}, subj_imp = {{"vellem"},{"vellēs"},{"vellet"},{"vellēmus"},{"vellētis"},{"vellent"}}, }}, } local function combinar_prefijo_nucleosufijo(prefijo, nucleosufijo) return prefijo..nucleosufijo end local function combinar_nucleo_sufijo(nucleo, sufijo, agregar_i) if agregar_i and (not find(sufijo, "^[iī]")) and (sufijo ~= "e") and (not find(sufijo, "^er")) then return nucleo.."~i~"..sufijo end return nucleo..sufijo end local function agregar_forma(conjugado, conjinfo, forma) conjinfo[forma] = conjinfo[forma] or {} local sufijos_ = sufijos[conjinfo.conj][forma] local nucleos local prefijo if forma == "sup" then nucleos = conjinfo.nucleosup prefijo = conjinfo.prefijosup or conjinfo.prefijo elseif find(forma, "sig") then nucleos = conjinfo.nucleosigm prefijo = conjinfo.prefijosigm or conjinfo.prefijo elseif find(forma, "perf") then nucleos = conjinfo.nucleoperf prefijo = conjinfo.prefijoperf or conjinfo.prefijo else nucleos = conjinfo.nucleopres prefijo = conjinfo.prefijo end if formas_no_personales[forma] then if conjinfo[forma][1] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma]) do insert_if_not(conjugado[forma], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else for _, sufijo in ipairs(sufijos_) do local nucleos_ = nucleos if forma == "inf_act" and sufijo == "isse" then nucleos_ = conjinfo.nucleoperf elseif forma == "part_act" and sufijo == "ūrus" then nucleos_ = conjinfo.nucleosup elseif forma == "part_pas" and sufijo == "us" then nucleos_ = conjinfo.nucleosup end local agregar_i = conjinfo.I and nucleos_ == conjinfo.nucleopres for _,nucleo in ipairs(nucleos_) do insert_if_not(conjugado[forma], combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(nucleo, sufijo, agregar_i))) end end end return end for i = EGO, EI do local p = tostr[i] if conjinfo[forma][i] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma][i]) do insert_if_not(conjugado[forma..p], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else local k = i while sufijos_[k] do local agregar_i = conjinfo.I and nucleos == conjinfo.nucleopres for j, n in ipairs(nucleos) do local x = combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(n, sufijos_[k], agregar_i)) if conjinfo.always_sync_perf and (forma == "ind_perf" or forma == "ind_pluperf" or forma == "ind_fut_perf" or forma == "subj_perf" or forma == "subj_pluperf") then x = x:gsub("īvī", "iī") x = x:gsub("īvi", "ī") x = x:gsub("īve", "ī") x = x:gsub("īvē", "ē") end insert_if_not(conjugado[forma..p], x) end k = k + 6 end end end end local function get_subtype_by_ending(pres, conjinfo, specs) for _, spec in ipairs(specs) do local base = extract_base(pres, spec[1]) if base then for _,s in ipairs(spec[2]) do if conjinfo[s] == nil then conjinfo[s] = true end end return base end end error("Unrecognized ending for conjugation " .. conjinfo["conj"]) end local function detect_v_type_and_subtypes(conjinfo) local pres = conjinfo["v"] local conj_arg = conjinfo["conj"] pres = toNFC(pres) local base_conj_arg, auto_perf_supine = conj_arg:match("^([124]/?4?)(%+%+?)$") if base_conj_arg then if auto_perf_supine == "++" and base_conj_arg ~= "4" then error("Conjugation types 1++ and 2++ not allowed") end conj_arg = base_conj_arg end conjinfo.conj = conj_arg if conj_arg == "1" then local base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"at", {"impers"}}, {"ātur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "āv" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "āt" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "āss" end end elseif conj_arg == "2" then local base = get_subtype_by_ending(pres, conjinfo, { {"eō", {}}, {"eor", {"dep"}}, {"et", {"impers"}}, {"ētur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "u" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "it" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3" then local base if conjinfo.I == false then -- si explícitamente se indicó que no es del tipo -io, hay que excluir sufijos base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) else base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) end if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end assert(conjinfo["nucleoperf"][1], "especifique todos los núcleos para verbos de la tercera conjugación") assert(conjinfo["nucleosup"][1], "especifique todos los núcleos para verbos de la tercera conjugación") if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3/4" then local base base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "4" then local base = get_subtype_by_ending(pres, conjinfo, { {"iō", {}}, {"ior", {"dep"}}, {"it", {"impers"}}, {"ītur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "irreg" then for _,p in ipairs(verbos_irregulares) do for _,rx in ipairs(p[2]) do local pref, verb = match(conjinfo.v, "^(.*)("..rx..")$") if verb then conjinfo.v = verb conjinfo.prefijo = pref if conjinfo.nucleoperf[1] and conjinfo.nucleoperf[1] ~= "-" then -- [[ecfero]] conjinfo.prefijoperf = conjinfo.nucleoperf[1] conjinfo.nucleoperf = {} end if conjinfo.nucleosup[1] and conjinfo.nucleosup[1] ~= "-" then conjinfo.prefijosup = conjinfo.nucleosup[1] conjinfo.nucleosup = {} end if conjinfo.nucleosigm[1] and conjinfo.nucleosigm[1] ~= "-" then conjinfo.prefijosigm = conjinfo.nucleosigm[1] conjinfo.nucleosigm = {} end conjinfo.irreg = true conjinfo.conj = p[3].conj for k,val in pairs(p[3]) do if not conjinfo[k] or (type(conjinfo[k]) == "table" and not conjinfo[k][1]) then conjinfo[k] = deep_copy(val) end end return conjinfo end end end error("Unrecognized conjugation '" .. conj_arg .. "'") else error("Unrecognized conjugation '" .. conj_arg .. "'") end return conjinfo end function export.v(frame) local title_ = mw.title.getCurrentTitle() local tit = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {alias_de = "conj"}, [2] = {alias_de = "pres"}, [3] = {alias_de = "nucleoperf"}, [4] = {alias_de = "nucleosup"}, [5] = {alias_de = "nucleosigm"}, ["impers"] = {}, -- pas para formas pasivas solamente ["impersonal"] = {alias_de = "impers"}, ["dep"] = {tipo="bool"}, ["depon"] = {alias_de="dep"}, ["deponente"] = {alias_de="dep"}, ["semidep"] = {tipo="bool"}, ["semidepon"] = {alias_de="semidep"}, ["semideponente"] = {alias_de="semidep"}, ["sigm"] = {tipo="bool"}, ["nopasivo"] = {tipo="bool"}, ["soloperf"] = {tipo="bool"}, ["I"] = {tipo="bool"}, ["p3inf"] = {tipo="bool"}, -- sin uso ["poet_sync_perf"] = {tipo="bool"}, -- sin uso ["always_sync_perf"] = {tipo="bool"}, -- solo en [[saevio]] ["conj"] = {requerido=true}, ["pres"] = {requerido=true}, ["nucleopres"] = {lista = true}, ["nucleoperf"] = {lista = true}, ["nucleosup"] = {lista = true}, ["nucleosigm"] = {lista = true}, ["núcleopres"] = {alias_de="nucleopres"}, ["núcleoperf"] = {alias_de="nucleoperf"}, ["núcleosup"] = {alias_de="nucleosup"}, ["paradigma"] = {lista = true}, ["desactivarnucleos"] = {tipo="bool", por_defecto=true}, -- para [[-o]] ["nota"] = {}, } local conjugado = {} for forma,_ in pairs(formas_no_personales) do params[forma] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma] = {} end for forma,_ in pairs(formas_personales) do for i,s in ipairs(tostr) do params[forma..s] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma..s] = {} if i == 1 then params[forma] = {alias_de=forma..s} end end end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) assert(not find(tit, " "), "locuciones no soportadas aún") assert(not (args["dep"] and args["semidep"]), "un verbo no puede ser deponente y semideponente a la vez") local conjinfo = { conj = args.conj, prefijo="", v=args.pres, desactivar = {}, dep=args.dep, semidep=args.semidep, sigm=args.sigm, impers=args.impers, nopasivo=args.nopasivo, soloperf=args.soloperf, I=args.I, p3inf=args.p3inf, poet_sync_perf=args.poet_sync_perf, -- sin uso always_sync_perf=args.always_sync_perf, nucleopres = deep_copy(args.nucleopres), nucleoperf = deep_copy(args.nucleoperf), nucleosup = deep_copy(args.nucleosup), nucleosigm = deep_copy(args.nucleosigm) } conjinfo = detect_v_type_and_subtypes(conjinfo) if conjinfo.impers == true then conjinfo.impers = "3" end -- no puede ir conjinfo acá abajo porque si es un sufijo va a quedar "-" en la raíz, lo que anularía todas las formas conjugadas, tiene que venir directo de args if args.desactivarnucleos then if args.nucleopres[1] == "-" then conjinfo.nucleopres = {} end if args.nucleoperf[1] == "-" then conjinfo.nucleoperf = {} end if args.nucleosup[1] == "-" then conjinfo.nucleosup = {} end if args.nucleosigm[1] == "-" then conjinfo.nucleosigm = {} end end local es_irregular = conjinfo.irreg for _,d in ipairs(conjinfo.desactivar) do if formas_no_personales[d] then args[d] = {"no"} else args[d.."2"] = {"no"} end end for forma,_ in pairs(formas) do agregar_forma(conjugado, conjinfo, forma) end local resultante = sobreescribir_formas(conjugado, args) local mostrar_fut_sig = #resultante["ind_fut_sig1"] > 0 local mostrar_aor_sig = #resultante["subj_aor_sig1"] > 0 local defectivo = comprobar_defectivo(resultante, {"^imper", "_sig"}, tostr) local defect2 resultante, defect2 = desactivar_formas(resultante, function (form) return (conjinfo.nopasivo and form:find("_pas")) or (conjinfo.soloperf and not form:find("perf")) or (conjinfo.impers == "pas" and form:find("_pas[^3]")) or (conjinfo.impers == "pas3" and form:find("_pas[^3]")) or (conjinfo.impers == "pas36" and form:find("_pas[^36]")) end ) if defect2 then defectivo = true end -- por ahora innecesario -- local part_no_adj = {} -- for _,e in ipairs(resultante.part) do -- if (find(e, 'PART') or not find(e, 'ADJ')) and not find(e, "†") then -- insert(part_no_adj, gsub1(e, '%b{}', '')) -- end -- end local tit_pres = f(resultante["ind_pres1"][1] or "―") local tit_inf = f(resultante["inf_act"][1] or "―") local tit_perf = f(resultante["ind_perf1"][1] or "―") local tit_sup = f(resultante["sup"][1] or "―") resultante = agregar_enlaces(resultante, tit, normalizar_enlace) local es_impersonal = conjinfo.impers resultante = formatear_formas(resultante, function (x) return obtener_pronombre(x, es_impersonal) end) local impers = conjinfo.impers local cs, cs1, cs2, fila_pronombres_ind, fila_pronombres_subj, fila_pronombres_imper, mostrar_imper if impers == "3" then fila_pronombres_ind = {"", "(id)", color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", "(quod id)", color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", "(id)", color=COLOR_IMPER, header=true, class="pc"} cs = 2 elseif impers == "36" then error("no soportado actualmente") cs = 3 else fila_pronombres_ind = {"", PRONOMBRES[1], PRONOMBRES[2], PRONOMBRES[3], PRONOMBRES[4], PRONOMBRES[5], PRONOMBRES[6], color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", PRONOMBRES_SUBJ[1], PRONOMBRES_SUBJ[2], PRONOMBRES_SUBJ[3], PRONOMBRES_SUBJ[4], PRONOMBRES_SUBJ[5], PRONOMBRES_SUBJ[6], color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", PRONOMBRES_IMP[1], PRONOMBRES_IMP[2], PRONOMBRES_IMP[3], PRONOMBRES_IMP[4], PRONOMBRES_IMP[5], PRONOMBRES_IMP[6], color=COLOR_IMPER, header=true, class="pc"} cs = 7 mostrar_imper = true end cs1 = cs -- math.floor(cs / 2) -- cs2 = cs - cs1 local t = {} insert(t, {{"Formas no personales (verboides)", colspan=cs}, color=COLOR_H, header=true}) if impers == "3" then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else resultante.inf_act.colspan = cs1-1 resultante.inf_pas.colspan = cs1-1 resultante.part_act.colspan = cs1-1 resultante.part_pas.colspan = cs1-1 resultante.ger.colspan = cs1-1 resultante.sup.colspan = cs1-1 if conjinfo.dep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) elseif conjinfo.semidep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) end end local function ic(tiempo) if impers == "3" then return resultante[tiempo.."3"] elseif impers == "36" then return resultante[tiempo.."3"], resultante[tiempo.."6"] end return resultante[tiempo.."1"], resultante[tiempo.."2"], resultante[tiempo.."3"], resultante[tiempo.."4"], resultante[tiempo.."5"], resultante[tiempo.."6"] end insert(t, {{"Formas personales", colspan=cs}, color=COLOR_H, header=true}) insert(t, {{"Modo indicativo", colspan=cs}, color=COLOR_IND, header=true}) insert(t, fila_pronombres_ind) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end else insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) insert(t, {{"Pretérito perfecto", color=COLOR_IND, header=true}, ic("ind_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_IND, header=true}, ic("ind_pluperf")}) insert(t, {{"Futuro perfecto", color=COLOR_IND, header=true}, ic("ind_fut_perf")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) end insert(t, {{"Modo subjuntivo", colspan=cs}, color=COLOR_SUBJ, header=true}) insert(t, fila_pronombres_subj) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end else insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) insert(t, {{"Pretérito perfecto", color=COLOR_SUBJ, header=true}, ic("subj_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_SUBJ, header=true}, ic("subj_pluperf")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) end insert(t, {{"Modo imperativo", colspan=cs}, color=COLOR_IMPER, header=true}) insert(t, fila_pronombres_imper) if mostrar_imper then if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) else insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) insert(t, {{"Presente pasivo", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) end else insert(t, {{"Como verbo "..(impers == "3" and "impersonal" or "terciopersonal")..", ''"..tit.."'' CARECE de imperativo", color=COLOR_IMPER, header=true, colspan=cs}}) end insert(t, {{f("Leyenda: † arcaico, x no normativo, ~■~ cambio ortográfico, #■# irregularidad"), colspan=cs}}) args["nota"] = args["nota"] or "" if conjinfo.impers == "utc3" then args["nota"] = args["nota"].." NOTA: se usa también como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "umc3" then args["nota"] = args["nota"].." NOTA: se usa más como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "utc36" then args["nota"] = args["nota"].." NOTA: se usa también como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "umc36" then args["nota"] = args["nota"].." NOTA: se usa más como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "pas" or conjinfo.imeprs == "pas3" then args["nota"] = args["nota"].." NOTA: impersonal para las formas pasivas" end if conjinfo.impers == "pas36" then args["nota"] = args["nota"].." NOTA: formas pasivas terciopersonales (solamente tercera persona singular y plural)" end if conjinfo.soloperf then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas del perfecto y pluscuamperfecto con valor de presente, imperfecto o futuro" end if conjinfo.nopasivo then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas activas" end insert(t, {{args["nota"] and args["nota"] or "", colspan=cs}}) local cats = {} local subtits = {} local conj_str if conjinfo.conj == "1" then conj_str = "primera conjugación" elseif conjinfo.conj == "2" then conj_str = "segunda conjugación" elseif conjinfo.conj == "3" then conj_str = "tercera conjugación" elseif conjinfo.conj == "3/4" then conj_str = "tercera/cuarta conjugación" else conj_str = "cuarta conjugación" end insert(cats, "LA:Verbos de la "..conj_str) insert(subtits, conj_str) impers = impers or "" if impers == "3" or find(impers, "^u[tm]c3$") then insert(subtits, "impersonal") insert(cats, "LA:Verbos impersonales") end if defectivo then insert(subtits, "defectivo") insert(cats, "LA:Verbos defectivos") end if conjinfo.dep then insert(subtits, "deponente") insert(cats, "LA:Verbos deponentes") end if conjinfo.semidep then insert(subtits, "semideponente") insert(cats, "LA:Verbos semideponentes") end if es_irregular then insert(subtits, "irregular") insert(cats, "LA:Verbos irregulares") else insert(subtits, "regular") insert(cats, "LA:Verbos regulares") end return renderizar_tabla( frame, "'''Conjugación de ''"..tit_pres..", "..tit_inf..", "..tit_perf..", "..tit_sup.."'''''&emsp;&emsp;("..concat(subtits, ", ")..")", t, ns == 0 and cats or {}) end function export.adv(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { ["n"] = {}, ["nota"] = {alias_de = "n"}, ["comp"] = {lista = true}, ["comparativo"] = {alias_de = "comp"}, ["compnota"] = {lista = true}, ["sup"] = {lista = true}, ["superlativo"] = {alias_de = "sup"}, ["supnota"] = {lista = true}, } local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local head = args[1] local modo = args[2] local enc local cats = {} local cat_pref = "LA:Adverbios" if modo == "-" then enc = "sin comparativo ni superlativo" insert(cats, cat_pref.." incomparables") return renderizar_encabezado( frame, head, enc, args["n"], {}, ns == 0 and cats or {}, normalizar_enlace ) end local flex = {comp={},sup={}} local stem for _, suff in ipairs{"iter", "nter", "ter", "er", "iē", "ē", "rā", "im", "ō"} do stem = match(head, "^(.*)" .. suff .. "$") if stem ~= nil then local comp_suff, sup_suff = "ius", "issimē" if suff == "nter" then stem = stem .. "nt" end if suff == "rā" then comp_suff = "er" .. comp_suff sup_suff = "imē" end insert(flex.comp, stem .. comp_suff) insert(flex.sup, stem .. sup_suff) break end end if not stem and not args.comp[1] and not args.sup[1] then error("Unrecognized adverb type, recognized types are “-ē”, “-er”, “-ter”, “-iter”, “-im”, or “-ō”, “-ra” or specify irregular forms or “-” if incomparable.") end local formas, irr = sobreescribir_formas(flex, args) if args["comp"][1] == "no" then enc = "sin comparativo" insert(cats, cat_pref.." sin comparativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) elseif args["sup"][1] == "no" then enc = "sin superlativo" insert(cats, cat_pref.." sin superlativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end if irr then enc = f("#irregular#") insert(cats, cat_pref.." irregulares") end return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}, {"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end return export t9djmgme519sk7l09nsuqkbpsldgagf 6123559 6123558 2026-07-25T05:25:23Z Tmagc 158167 6123559 Scribunto text/plain -- FLEXIÓN DEL LATÍN -- Adaptado desde en.wikt por Tmagc local export = {} local unpack = unpack or table.unpack local insert = table.insert local concat = table.concat local m_table = require("Módulo:tabla") local keys_to_list = m_table.keysToList local insert_if_not = m_table.insertIfNot local deep_copy = m_table.deepCopy local contains = m_table.contains local merge = m_table.merge local m_str = require("Módulo:string") local u = m_str.char local match = m_str.match local sub = m_str.sub local gsub = m_str.gsub local split = m_str.split local gsplit = m_str.gsplit local find = m_str.find local m_str_avanzado = require("Módulo:string/avanzado") local toNFD = m_str_avanzado.toNFD local toNFC = m_str_avanzado.toNFC local m_flex = require("Módulo:flex") local f = m_flex.f local f_links = m_flex.f_links local parsear_arreglo = m_flex.parsear_arreglo local separar_palabras = m_flex.separar_palabras local combinar_copulativa = m_flex.combinar_copulativa local sobreescribir_formas = m_flex.sobreescribir_formas local desactivar_formas = m_flex.desactivar_formas local agregar_enlaces = m_flex.agregar_enlaces local formatear_formas = m_flex.formatear_formas local comprobar_defectivo = m_flex.comprobar_defectivo local renderizar_tabla = m_flex.renderizar_tabla local renderizar_encabezado = m_flex.renderizar_encabezado local COLOR_H = m_flex.COLOR_H local COLOR_NP = m_flex.COLOR_NP local COLOR_IND = m_flex.COLOR_IND local COLOR_SUBJ = m_flex.COLOR_SUBJ local COLOR_IMPER = m_flex.COLOR_IMPER local MACRON = u(0x304) local BREVE = u(0x306) local DIAER = u(0x308) local DBREVE = u(0x361) local ACCENT = "[" .. MACRON .. BREVE .. DIAER .. DBREVE .. "]" local VOWEL = "[aæeioœuyAÆEIOŒUY]" local cons_to_vowel = { ["j"] = "i", ["J"] = "I", ["v"] = "u", ["V"] = "U", } local function normalizar_enlace(x) x = toNFD(x) x = gsub(x, ACCENT, "") return toNFC(x) end local function join(a, b) a, b = toNFD(a), toNFD(b) -- If the first part ends in "j" or "v", convert it to "i" or "u" unless -- the second part begins with a vowel. if not match(b, "^" .. VOWEL) then a = gsub(a, "[jvJV]$", cons_to_vowel) end return toNFC(a..b) end local function add_form(decl, slot, stem, suf) if type(slot) == "string" then slot = {slot} end for _,slt in ipairs(slot) do if type(decl[slt]) == "nil" or decl[slt] == "" then decl[slt] = {} elseif type(decl[slt]) == "string" then decl[slt] = {decl[slt]} end insert_if_not(decl[slt], join(stem, suf)) end end local function remove_forms(decl, forms) for form,_ in pairs(decl) do for _,rx in ipairs(forms) do if form:find(rx) then forms[form] = {} break end end end end local function merge_forms(forms, forms2, keys) keys = keys or forms2 for key,arr in pairs(keys) do if not forms[key] then forms[key] = {} end if type(forms2[key]) == "string" then insert_if_not(forms[key], forms2[key]) elseif type(forms2[key]) == "table" then for _,a in ipairs(forms2[key]) do insert_if_not(forms[key], a) end end end end local noun_decl = {} noun_decl["0"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = stem forms["dat_sg"] = stem forms["acc_sg"] = stem forms["abl_sg"] = stem forms["voc_sg"] = stem forms["nom_pl"] = stem forms["gen_pl"] = stem forms["dat_pl"] = stem forms["acc_pl"] = stem forms["abl_pl"] = stem forms["voc_pl"] = stem -- with locative if data.loc then forms["loc_sg"] = stem forms["loc_pl"] = stem end end local function alt_gen_pl_in_um(stem, forms, types, subtitles, i_stem) if types.genplum then add_form(forms, "gen_pl", stem, (i_stem and "i" or "") .. "um") elseif types.not_genplum then -- FIXME: not a contraction. -- insert_if_not(subtitles, "uncontracted genitive plural") end end noun_decl["1"] = function(data, args) local forms, types, loc, subtitles = data.forms, data.types, data.loc, data.subtitles local stem = args[1] -- normal 1st local nom_sg = "a" local gen_loc_sg = "ae" local dat_sg = "ae" local acc_sg = "am" local abl_sg = "ā" local voc_sg = "a" local nom_voc_pl = "ae" local gen_pl = "ārum" local dat_abl_loc_pl = "īs" local acc_pl = "ās" insert_if_not(data.title, "primera declinación") insert_if_not(data.categories, "LA:Sustantivos de la primera declinación") -- ām if types.am then nom_sg = "ām" acc_sg = "ām" abl_sg = {"ām", "ā"} voc_sg = "ām" -- all Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") --Greek Ma if types.Ma then nom_sg = "ās" acc_sg = "ān" voc_sg = "ā" -- Greek Me elseif types.Me then nom_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" -- Greek else nom_sg = "ē" gen_loc_sg = "ēs" acc_sg = "ēn" abl_sg = "ē" voc_sg = "ē" end end -- ābus if types.abus then dat_abl_loc_pl = "ābus" end add_form(forms, "nom_sg", stem, nom_sg) add_form(forms, "gen_sg", stem, gen_loc_sg) add_form(forms, "dat_sg", stem, dat_sg) add_form(forms, "acc_sg", stem, acc_sg) add_form(forms, "abl_sg", stem, abl_sg) add_form(forms, "voc_sg", stem, voc_sg) add_form(forms, {"nom_pl", "voc_pl"}, stem, nom_voc_pl) add_form(forms, "gen_pl", stem, gen_pl) add_form(forms, {"dat_pl", "abl_pl"}, stem, dat_abl_loc_pl) add_form(forms, "acc_pl", stem, acc_pl) -- with locative if loc then add_form(forms, "loc_sg", stem, gen_loc_sg) add_form(forms, "loc_pl", stem, dat_abl_loc_pl) end end noun_decl["2"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "segunda declinación") insert_if_not(data.categories, "LA:Sustantivos de la segunda declinación") -- normal 2nd forms["nom_sg"] = stem1 .. "us" forms["gen_sg"] = stem1 .. "ī" forms["dat_sg"] = stem1 .. "ō" forms["acc_sg"] = stem1 .. "um" forms["abl_sg"] = stem1 .. "ō" forms["voc_sg"] = stem1 .. "e" forms["nom_pl"] = stem1 .. "ī" forms["gen_pl"] = stem1 .. "ōrum" forms["dat_pl"] = stem1 .. "īs" forms["acc_pl"] = stem1 .. "ōs" forms["abl_pl"] = stem1 .. "īs" forms["voc_pl"] = stem1 .. "ī" -- all neuter if types.N then forms["nom_sg"] = stem1 .. "um" forms["voc_sg"] = stem1 .. "um" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- neuter ium if types.ium then forms["nom_sg"] = stem1 .. "ium" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" forms["voc_sg"] = stem1 .. "ium" forms["nom_pl"] = stem1 .. "ia" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "ia" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "ia" -- neuter us, plural a elseif types.a then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "a" forms["acc_pl"] = stem1 .. "a" forms["voc_pl"] = stem1 .. "a" -- -vom (aevom, etc.) elseif types.vom then forms["nom_sg"] = stem1 .. "om" forms["acc_sg"] = stem1 .. "om" forms["voc_sg"] = stem1 .. "om" -- neuter Greek in -os (cētos) elseif types.Greek and types.us then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "os" forms["voc_sg"] = stem1 .. "os" forms["nom_pl"] = stem1 .. "ē" forms["gen_pl"] = stem1 .. "ōn" forms["acc_pl"] = stem1 .. "ē" forms["voc_pl"] = stem1 .. "ē" -- neuter Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "on" forms["acc_sg"] = stem1 .. "on" forms["voc_sg"] = stem1 .. "on" -- neuter us elseif types.us then forms["nom_sg"] = stem1 .. "us" forms["acc_sg"] = stem1 .. "us" forms["voc_sg"] = stem1 .. "us" forms["nom_pl"] = stem1 .. "ī" forms["acc_pl"] = stem1 .. "ōs" forms["voc_pl"] = stem1 .. "ī" end -- er elseif types.er then forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "ī" forms["dat_sg"] = stem2 .. "ō" forms["acc_sg"] = stem2 .. "um" forms["abl_sg"] = stem2 .. "ō" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ī" forms["gen_pl"] = stem2 .. "ōrum" forms["dat_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "ōs" forms["abl_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "ī" -- ius elseif types.ius then forms["nom_sg"] = stem1 .. "ius" forms["gen_sg"] = {stem1 .. "iī", stem1 .. "ī{†}"} forms["dat_sg"] = stem1 .. "iō" forms["acc_sg"] = stem1 .. "ium" forms["abl_sg"] = stem1 .. "iō" if types.voci then -- Only for proper names and fīlius, genius forms["voc_sg"] = stem1 .. "ī" else forms["voc_sg"] = stem1 .. "ie" end forms["nom_pl"] = stem1 .. "iī" forms["gen_pl"] = stem1 .. "iōrum" forms["dat_pl"] = stem1 .. "iīs" forms["acc_pl"] = stem1 .. "iōs" forms["abl_pl"] = stem1 .. "iīs" forms["voc_pl"] = stem1 .. "iī" -- -vos (servos, etc.) elseif types.vos then forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "om" -- Greek elseif types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "os" forms["acc_sg"] = stem1 .. "on" if data.num == "pl" then forms["nom_pl"] = stem1 .. "oe" forms["voc_pl"] = stem1 .. "oe" else forms["nom_pl"] = {stem1 .. "ī", stem1 .. "oe"} forms["voc_pl"] = {stem1 .. "ī", stem1 .. "oe"} end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- with -um genitive plural alt_gen_pl_in_um(stem2, forms, types, subtitles, types.ius or types.ium) -- with locative if data.loc then if types.ius or types.ium then forms["loc_sg"] = stem2 .. "iī" forms["loc_pl"] = stem2 .. "iīs" else forms["loc_sg"] = stem2 .. "ī" forms["loc_pl"] = stem2 .. "īs" end end end local acc_sg_i_stem_subtypes = { acc_im = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [abl -ī]; -- cannabis, senapis, sinapis [abl -e, -ī] acc_sg = {"im"}, title = {"accusative singular in ''-im''"}, }, acc_im_in = { -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [abl -ī]; -- Baetis, Tigris [acc -e, -ī] acc_sg = {"im", "in"}, title = {"accusative singular in ''-im'' or ''-in''"}, }, acc_im_in_em = { -- e.g. tigris, river Līris acc_sg = {"im", "in", "em"}, title = {"accusative singular in ''-im'', ''-in'' or ''-em''"}, }, acc_im_em = { acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or ''-em''"}, }, acc_im_occ_em = { -- febris, pelvis, puppis, restis, securis, turris [abl -ī, -e] acc_sg = {"im", "em"}, title = {"accusative singular in ''-im'' or occasionally ''-em''"}, }, acc_em_im = { -- aqualis, clavis, lens, navis [abl -e, -ī]; -- cutis, restis [abl -e] acc_sg = {"em", "im"}, title = {"accusative singular in ''-em'' or ''-im''"}, }, } local abl_sg_i_stem_subtypes = { abl_i = { -- amussis, basis, buris, cucumis, gummis, mephitis, paraphrasis, poesis, ravis, sitis, tussis, (vis) [acc -im]; -- cities, rivers, gods, e.g. Bilbilis, Syrtis, Tiberis, Anubis, Osiris [acc -im or -in]; -- canalis "water pipe", months in -is or -er, nouns originally i-stem adjectives such as aedilis, affinis, bipennis, familiaris, sodalis, volucris, etc. [acc -em] abl_sg = {"ī"}, title = {"ablative singular in ''-ī''"}, }, abl_i_e = { -- febris, pelvis, puppis, restis, securis, turris [acc -im, -em] abl_sg = {"ī", "e"}, title = {"ablative singular in ''-ī'' or ''-e''"}, }, abl_e_i = { -- cannabis, senapis, sinapis [acc -im]; -- Baetis, Tigris [acc -im, -in]; -- aqualis, clavis, lens, navis [acc -em, -im]; -- finis, mugilis, occiput, pugil, rus, supellex, vectis [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or ''-ī''"}, }, abl_e_occ_i = { -- amnis, anguis, avis, civis, classis, fustis, ignis, imber, orbis, pars, postis, sors, unguis, vesper [acc -em] abl_sg = {"e", "ī"}, title = {"ablative singular in ''-e'' or occasionally ''-ī''"}, }, } local function extract_stem(form, ending) local base = match(form, "^(.*)" .. ending .. "$") if not base then error("Form " .. form .. " should end in -" .. ending) end return base end local function count_vowels(stem) return select(2, toNFD(stem):gsub("[aeiouyAEIOUY]", "")) end noun_decl["3"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem1, stem2 = args[1], args[2] -- local function non_i_stem_type() -- return (count_vowels(stem1) > count_vowels(stem2) and "parisyllabic" or "imparisyllabic") .. " non-i-stem" -- end insert_if_not(data.title, "tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") --normal 3rd forms["nom_sg"] = stem1 forms["gen_sg"] = stem2 .. "is" forms["dat_sg"] = stem2 .. "ī" forms["acc_sg"] = stem2 .. "em" forms["abl_sg"] = stem2 .. "e" forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 .. "ēs" forms["gen_pl"] = stem2 .. "um" forms["dat_pl"] = stem2 .. "ibus" forms["acc_pl"] = stem2 .. "ēs" forms["abl_pl"] = stem2 .. "ibus" forms["voc_pl"] = stem2 .. "ēs" local acc_sg_i_stem_subtype = false local not_acc_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if acc_sg_i_stem_subtypes[subtype] then acc_sg_i_stem_subtype = true break end end for acc_sg_subtype, _ in pairs(acc_sg_i_stem_subtypes) do if types["not_" .. acc_sg_subtype] then not_acc_sg_i_stem_subtype = true break end end local abl_sg_i_stem_subtype = false local not_abl_sg_i_stem_subtype = false for subtype, _ in pairs(types) do if abl_sg_i_stem_subtypes[subtype] then abl_sg_i_stem_subtype = true break end end for abl_sg_subtype, _ in pairs(abl_sg_i_stem_subtypes) do if types["not_" .. abl_sg_subtype] then not_abl_sg_i_stem_subtype = true break end end -- all Greek if types.Greek then insert_if_not(data.title, "griego") insert_if_not(data.categories, "LA:Sustantivos griegos") -- Greek er if types.er then stem1 = extract_stem(stem1, "ēr") forms["nom_sg"] = stem1 .. "ēr" forms["gen_sg"] = stem1 .. "eris" forms["dat_sg"] = stem1 .. "erī" forms["acc_sg"] = {stem1 .. "era", stem1 .. "erem"} forms["abl_sg"] = stem1 .. "ere" forms["voc_sg"] = stem1 .. "ēr" forms["nom_pl"] = stem1 .. "erēs" forms["gen_pl"] = stem1 .. "erum" forms["dat_pl"] = stem1 .. "eribus" forms["acc_pl"] = stem1 .. "erēs" forms["abl_pl"] = stem1 .. "eribus" forms["voc_pl"] = stem1 .. "erēs" -- Greek on elseif types.on then stem1 = extract_stem(stem1, "ōn") forms["nom_sg"] = stem1 .. "ōn" forms["gen_sg"] = {stem1 .. "ontis", stem1 .. "ontos"} forms["dat_sg"] = stem1 .. "ontī" forms["acc_sg"] = stem1 .. "onta" forms["abl_sg"] = stem1 .. "onte" forms["voc_sg"] = stem1 .. "ōn" forms["nom_pl"] = stem1 .. "ontēs" forms["gen_pl"] = {stem1 .. "ontum", stem1 .. "ontium"} forms["dat_pl"] = stem1 .. "ontibus" forms["acc_pl"] = {stem1 .. "ontēs", stem1 .. "ontās"} forms["abl_pl"] = stem1 .. "ontibus" forms["voc_pl"] = stem1 .. "ontēs" -- Greek i-stem elseif types.I then forms["gen_sg"] = {stem2 .. "is", stem2 .. "eōs", stem2 .. "ios"} forms["acc_sg"] = {stem2 .. "im", stem2 .. "in", stem2 .. "em{MED}"} forms["abl_sg"] = {stem2 .. "ī", stem2 .. "e{MED}"} forms["voc_sg"] = {stem2 .. "is", stem2 .. "i"} forms["nom_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["gen_pl"] = {stem2 .. "ium", stem2 .. "eōn"} forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} forms["voc_pl"] = {stem2 .. "ēs", stem2 .. "eis"} if types.poetic_esi then forms["dat_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} forms["abl_pl"] = {stem2 .. "ibus", stem2 .. "esi{L}"} end -- normal Greek else forms["gen_sg"] = stem2 .. "os" if match(toNFD(stem2), "[yY]" .. ACCENT .. "*$") then forms["acc_sg"] = stem2 .. "n" else forms["acc_sg"] = stem2 .. "a" end forms["nom_pl"] = stem2 .. "es" forms["acc_pl"] = stem2 .. "as" forms["voc_pl"] = stem2 .. "es" if match(toNFD(stem1), "[iyIY]" .. ACCENT .. "*s$") then -- Per Hiley, words in -is and -ys have a poetic vocative -- without the -s, but otherwise the vocative is the same -- as the nominative. forms["voc_sg"] = {stem1, (stem1:gsub("s$", "")).."{L}"} end end elseif types.not_Greek then insert_if_not(data.title, "no griego") end -- polis if types.polis then stem1 = extract_stem(stem1, "polis") insert_if_not(data.title, "parcialmente griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = stem1 .. "polis" forms["gen_sg"] = stem1 .. "polis" forms["dat_sg"] = stem1 .. "polī" forms["acc_sg"] = {stem1 .. "polim", stem1 .. "polin"} forms["abl_sg"] = stem1 .. "polī" forms["voc_sg"] = {stem1 .. "polis", stem1 .. "polī"} end -- all neuter if types.N then forms["acc_sg"] = stem1 -- neuter I stem if types.I then -- pure variety if types.pure then forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "ia" forms["gen_pl"] = stem2 .. "ium" forms["acc_pl"] = stem2 .. "ia" forms["voc_pl"] = stem2 .. "ia" -- non-pure variety (rare) else forms["nom_pl"] = stem2 .. "a" forms["gen_pl"] = {stem2 .. "ium", stem2 .. "um"} forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- normal neuter else forms["nom_pl"] = stem2 .. "a" forms["acc_pl"] = stem2 .. "a" forms["voc_pl"] = stem2 .. "a" end -- I stem elseif types.I or acc_sg_i_stem_subtype or abl_sg_i_stem_subtype then forms["gen_pl"] = stem2 .. "ium" -- Per Allen and Greenough, Hiley and others, the acc_pl in -īs -- applied originally to all i-stem nouns, and was current as an -- alternative form up through Caesar. forms["acc_pl"] = {stem2 .. "ēs", stem2 .. "īs"} -- pure variety if types.pure then forms["acc_sg"] = stem2 .. "im" forms["abl_sg"] = stem2 .. "ī" forms["nom_pl"] = stem2 .. "īs" forms["acc_pl"] = stem2 .. "īs" forms["voc_pl"] = stem2 .. "īs" end local num = data.num for subtype, _ in pairs(types) do local acc_sg_i_stem_props = acc_sg_i_stem_subtypes[subtype] if acc_sg_i_stem_props then forms["acc_sg"] = {} for _, ending in ipairs(acc_sg_i_stem_props.acc_sg) do insert_if_not(forms["acc_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(acc_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end -- FIXME: needs to be done for neuter nouns as well. for subtype, _ in pairs(types) do local abl_sg_i_stem_props = abl_sg_i_stem_subtypes[subtype] if abl_sg_i_stem_props then forms["abl_sg"] = {} for _, ending in ipairs(abl_sg_i_stem_props.abl_sg) do insert_if_not(forms["abl_sg"], stem2 .. ending) end -- if num ~= "pl" then -- for _, t in ipairs(abl_sg_i_stem_props.title) do -- insert_if_not(subtitles, t) -- end -- end break end end end -- with locative if data.loc then -- As far as I can tell, in general both dative singular and -- ablative singular could be used for the third-declension locative, -- with different time periods preferring different forms. -- http://dcc.dickinson.edu/grammar/latin/3rd-declension-locative-case -- mentions rūrī along with either Carthāginī or Carthāgine. -- Wikipedia in https://en.wikipedia.org/wiki/Locative_case#Latin -- says this: -- -- In archaic times, the locative singular of third declension nouns -- was still interchangeable between ablative and dative forms, but in -- the Augustan Period the use of the ablative form became fixed. -- Therefore, both forms "rūrī" and "rūre" may be encountered. -- -- Lewis and Short confirm this. local loc_sg = forms["dat_sg"] if type(loc_sg) == "table" then loc_sg = deep_copy(loc_sg) else loc_sg = {loc_sg} end local abl_sg = forms["abl_sg"] if type(abl_sg) == "table" then for _, form in ipairs(abl_sg) do insert_if_not(loc_sg, deep_copy(form)) end else insert_if_not(loc_sg, abl_sg) end forms["loc_sg"] = loc_sg forms["loc_pl"] = deep_copy(forms["abl_pl"]) --The following is what we used to have, but I simply cannot believe it. --if types.Greek and not types.s then -- forms["loc_pl"] = stem2 .. "ēs" --end end end noun_decl["4"] = function(data, args) local forms, types, subtitles, notes = data.forms, data.types, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "cuarta declinación") insert_if_not(data.categories, "LA:Sustantivos de la cuarta declinación") -- normal 4th forms["nom_sg"] = stem .. "us" forms["gen_sg"] = stem .. "ūs" forms["dat_sg"] = stem .. "uī" forms["acc_sg"] = stem .. "um" forms["abl_sg"] = stem .. "ū" forms["voc_sg"] = stem .. "us" forms["nom_pl"] = stem .. "ūs" forms["gen_pl"] = stem .. "uum" forms["dat_pl"] = stem .. "ibus" forms["acc_pl"] = stem .. "ūs" forms["abl_pl"] = stem .. "ibus" forms["voc_pl"] = stem .. "ūs" if types.echo then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end add_form(forms, "acc_sg", stem, "ōn") elseif types.Callisto then for slot in pairs(forms) do if slot ~= "gen_sg" then forms[slot] = stem .. "ō" end end end -- neuter if types.N then forms["nom_sg"] = stem .. "ū̆{?}" forms["gen_sg"] = {stem .. "ūs{C}", stem .. "ū{S}"} forms["dat_sg"] = {stem .. "uī{C}", stem .. "ū{S}"} forms["acc_sg"] = stem .. "ū̆{?}" forms["voc_sg"] = stem .. "ū̆{?}" forms["nom_pl"] = stem .. "ua" forms["acc_pl"] = stem .. "ua" forms["voc_pl"] = stem .. "ua" end -- ubus if types.ubus then forms["dat_pl"] = stem .. "ubus" forms["abl_pl"] = stem .. "ubus" end -- with locative if data.loc then forms["loc_sg"] = forms["abl_sg"] forms["loc_pl"] = forms["abl_pl"] end end noun_decl["5"] = function(data, args) local forms, types = data.forms, data.types local stem = args[1] insert_if_not(data.title, "quinta declinación") insert_if_not(data.categories, "LA:Sustantivos de la quinta declinación") -- ies if types.i then stem = stem .. "i" end forms["nom_sg"] = stem .. "ēs" forms["gen_sg"] = stem .. "eī" forms["dat_sg"] = stem .. "eī" forms["acc_sg"] = stem .. "em" forms["abl_sg"] = stem .. "ē" forms["voc_sg"] = stem .. "ēs" forms["nom_pl"] = stem .. "ēs" forms["gen_pl"] = stem .. "ērum" forms["dat_pl"] = stem .. "ēbus" forms["acc_pl"] = stem .. "ēs" forms["abl_pl"] = stem .. "ēbus" forms["voc_pl"] = stem .. "ēs" -- ies if types.i then forms["gen_sg"] = stem .. "ēī" forms["dat_sg"] = stem .. "ēī" end --with locative if data.loc then forms["loc_sg"] = stem .. "ē" forms["loc_pl"] = stem .. "ēbus" end end noun_decl["sgpl"] = function(data, args) local forms = data.forms local stem1, stem2 = args[1], args[2] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem1 forms["gen_sg"] = stem1 forms["dat_sg"] = stem1 forms["acc_sg"] = stem1 forms["abl_sg"] = stem1 forms["voc_sg"] = stem1 forms["nom_pl"] = stem2 forms["gen_pl"] = stem2 forms["dat_pl"] = stem2 forms["acc_pl"] = stem2 forms["abl_pl"] = stem2 forms["voc_pl"] = stem2 -- with locative if data.loc then forms["loc_sg"] = stem1 forms["loc_pl"] = stem2 end end noun_decl["indecl"] = function(data, args) local forms = data.forms local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(data.categories, "LA:Sustantivos indeclinables") forms["nom_sg"] = stem forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = stem forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} -- with locative (for multiword terms) if data.loc then forms["loc_sg"] = {} forms["loc_pl"] = {} end data.num = "sg" end noun_decl["irreg"] = function(data, args) local forms, subtitles, notes = data.forms, data.subtitles, data.notes local stem = args[1] insert_if_not(data.title, "irregular") insert_if_not(data.categories, "LA:Sustantivos irregulares") forms["nom_sg"] = {} forms["gen_sg"] = {} forms["dat_sg"] = {} forms["acc_sg"] = {} forms["abl_sg"] = {} forms["voc_sg"] = {} forms["nom_pl"] = {} forms["gen_pl"] = {} forms["dat_pl"] = {} forms["acc_pl"] = {} forms["abl_pl"] = {} forms["voc_pl"] = {} if stem == "bōs" then data.decl = "3" local stem1, stem2 = "bōs", "bov" noun_decl["3"](data, {stem1, stem2}) add_form(forms, "abl_sg", stem2, "īd{†}") add_form(forms, "gen_pl", "bo", "um") add_form(forms, "gen_pl", stem2, "erum") add_form(forms, "dat_pl", "", "bōbus") add_form(forms, "dat_pl", "", "būbus") add_form(forms, "abl_pl", "", "bōbus") add_form(forms, "abl_pl", "", "būbus") elseif stem:match("^[dD]eus$") then data.decl = "2" local dD = stem:sub(1, 1) forms["nom_sg"] = dD .. "eus" forms["gen_sg"] = dD .. "eī" forms["dat_sg"] = dD .. "eō" forms["acc_sg"] = dD .. "eum" forms["abl_sg"] = dD .. "eō" forms["voc_sg"] = {dD .. "eus", dD .. "ee"} if stem == "deus" then forms["nom_pl"] = {"dī", "diī", "deī"} forms["gen_pl"] = {"deōrum", "deum"} forms["dat_pl"] = {"dīs", "diīs", "deīs"} forms["acc_pl"] = "deōs" forms["abl_pl"] = {"dīs", "diīs", "deīs"} forms["voc_pl"] = {"dī", "diī", "deī"} end elseif stem == "domus" then data.decl = "4,2" insert_if_not(data.title, "cuarta/segunda declinación") forms["nom_sg"] = "domus" forms["gen_sg"] = {"domūs", "domī"} forms["dat_sg"] = {"domuī", "domō", "domū"} forms["acc_sg"] = "domum" forms["abl_sg"] = {"domū", "domō"} forms["voc_sg"] = "domus" forms["loc_sg"] = "domī" forms["nom_pl"] = "domūs" forms["gen_pl"] = {"domuum", "domōrum"} forms["dat_pl"] = "domibus" forms["acc_pl"] = {"domūs", "domōs"} forms["abl_pl"] = "domibus" forms["voc_pl"] = "domūs" forms["loc_pl"] = {} data.loc = true elseif match(stem, "^[IÏJ]ēs[uū]" .. BREVE .. "?s$") then local ij = sub(stem, 1, 1) local uu = match(stem, "[uū]" .. BREVE .. "?") forms["nom_sg"] = stem forms["gen_sg"] = ij .. "ēsū" forms["dat_sg"] = ij .. "ēsū" forms["acc_sg"] = ij .. "ēs" .. uu .. "m" forms["abl_sg"] = ij .. "ēsū" forms["voc_sg"] = ij .. "ēsū" data.num = "sg" elseif stem == "Mōsēs" or stem == "Moesēs" or match(stem, "^M[oō]" .. BREVE .. "?[īȳ]sēs$") then local mos = sub(stem, 1, -3) forms["nom_sg"] = stem forms["gen_sg"] = {mos .. "ī", mos .. "ēī", mos .. "is", mos .. "ēn", mos .. "eōs"} forms["dat_sg"] = mos .. "ī" forms["acc_sg"] = {mos .. "ēn", mos .. "em"} forms["abl_sg"] = {mos .. "e", mos .. "ēn", mos .. "ī"} forms["voc_sg"] = {mos .. "ēs", mos .. "ē"} data.num = "sg" elseif stem:match("^[ij]ūgerum$") then data.decl = "2,3" local ij = stem:sub(1, 1) insert_if_not(data.title, "segunda/tercera declinación híbrido") forms["nom_sg"] = ij .. "ūgerum" forms["gen_sg"] = ij .. "ūgerī" forms["dat_sg"] = ij .. "ūgerō" forms["acc_sg"] = ij .. "ūgerum" forms["abl_sg"] = ij .. "ūgerō" forms["voc_sg"] = ij .. "ūgerum" forms["nom_pl"] = ij .. "ūgera" forms["gen_pl"] = ij .. "ūgerum" forms["dat_pl"] = ij .. "ūgeribus" forms["acc_pl"] = ij .. "ūgera" forms["abl_pl"] = {ij .. "ūgeribus", ij .. "ūgerīs{†}"} forms["voc_pl"] = ij .. "ūgera" elseif stem == "sūs" then data.decl = "3" forms["nom_sg"] = "sūs" forms["gen_sg"] = "suis" forms["dat_sg"] = "suī" forms["acc_sg"] = "suem" forms["abl_sg"] = "sue" forms["voc_sg"] = "sūs" forms["nom_pl"] = "suēs" forms["gen_pl"] = "suum" forms["dat_pl"] = {"suibus", "sūbus", "subus"} forms["acc_pl"] = "suēs" forms["abl_pl"] = {"suibus", "sūbus", "subus"} forms["voc_pl"] = "suēs" elseif stem == "ēthos" then data.decl = "3" insert_if_not(data.title, "tercera declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "ēthos" forms["gen_sg"] = "ētheos" forms["acc_sg"] = "ēthos" forms["voc_sg"] = "ēthos" forms["nom_pl"] = {"ēthea", "ēthē"} forms["dat_pl"] = {"ēthesi", "ēthesin"} forms["acc_pl"] = {"ēthea", "ēthē"} forms["abl_pl"] = {"ēthesi", "ēthesin"} forms["voc_pl"] = {"ēthea", "ēthē"} elseif stem == "Athōs" then data.decl = "2" insert_if_not(data.title, "segunda declinación, griego") insert_if_not(data.categories, "LA:Sustantivos griegos") forms["nom_sg"] = "Athōs" forms["gen_sg"] = "Athō" forms["dat_sg"] = "Athō" forms["acc_sg"] = {"Athō", "Athōn"} forms["abl_sg"] = "Athō" forms["voc_sg"] = "Athōs" data.num = "sg" elseif stem:match("^[uv]ēnum$") then data.decl = "4,2" local uv = stem:sub(1, 1) insert_if_not(data.title, "cuarta/segunda declinación, defectivo") forms["dat_sg"] = {uv .. "ēnuī", uv .. "ēnō"} forms["acc_sg"] = uv .. "ēnum" data.num = "sg" elseif stem:match("^[uv]īs$") then data.decl = "3" local uv = stem:sub(1, 1) insert_if_not(data.title, "defectivo") forms["nom_sg"] = uv .. "īs" forms["gen_sg"] = uv .. "īs" forms["dat_sg"] = uv .. "ī" forms["acc_sg"] = uv .. "im" forms["abl_sg"] = uv .. "ī" forms["voc_sg"] = uv .. "īs" forms["nom_pl"] = uv .. "īrēs" forms["gen_pl"] = uv .. "īrium" forms["dat_pl"] = uv .. "īribus" forms["acc_pl"] = {uv .. "īrēs", uv .. "īrīs"} forms["abl_pl"] = uv .. "īribus" forms["voc_pl"] = uv .. "īrēs" else error("Stem " .. stem .. " not recognized.") end end local adj_decl = {} adj_decl["0+"] = function(data, args) local forms, categories = data.forms, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = stem forms["gen_sg_m"] = stem forms["gen_pl_m"] = stem forms["dat_sg_m"] = stem forms["dat_pl_m"] = stem forms["acc_sg_m"] = stem forms["acc_pl_m"] = stem forms["abl_sg_m"] = stem forms["abl_pl_m"] = stem forms["voc_sg_m"] = stem forms["voc_pl_m"] = stem forms["loc_sg_m"] = stem forms["loc_pl_m"] = stem end adj_decl["1&2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera y segunda declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local original if types.er then local final2 = stem:sub(-2) if final2 == "er" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") elseif final2 == "ur" then -- insert_if_not(categories, "LA:Sustantivos de la primera declinación") -- insert_if_not(categories, "LA:Sustantivos de la segunda declinación") else error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem) end stem, original = args[2], stem end local us = "us" local a_sf = "a" local um = "um" local ae_gsf = "ae" local am = "am" local a_macron = "ā" local i_pl = stem .. "ī" if types.greekA or types.greekE then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") if types.greekA then us = "os" um = "on" am = "ān" else us = "os" a_sf = "ē" um = "on" ae_gsf = "ēs" am = "ēn" a_macron = "ē" end i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = original or (stem .. us) forms["nom_sg_f"] = stem .. a_sf forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_f"] = stem .. ae_gsf forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_f"] = stem .. "ae" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_f"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_f"] = stem .. am forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_f"] = stem .. a_macron forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_f"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = original or (stem .. "e") forms["voc_sg_f"] = stem .. a_sf forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" if types.ius then insert_if_not(data.title, "pronominal") --insert_if_not(subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''") forms["gen_sg_m"] = stem .. "ī̆us" forms["gen_sg_f"] = stem .. "ī̆us" forms["gen_sg_n"] = stem .. "ī̆us" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_f"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" elseif types.not_ius then insert_if_not(data.title, "no pronominal") --insert_if_not(subtitles, "with normal genitive and dative singular") end if stem == "me" then forms["voc_sg_m"] = "mī" end if types.ic then --insert_if_not(subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''") local oc = "oc" local oc_macron = "ōc" if stem == "ill" then oc = "uc" oc_macron = "ūc" end forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = stem .. oc forms["nom_pl_n"] = stem .. "aec" forms["gen_sg_m"] = stem .. "uius" forms["gen_sg_f"] = stem .. "uius" forms["gen_sg_n"] = stem .. "uius" forms["dat_sg_m"] = stem .. "uic" forms["dat_sg_f"] = stem .. "uic" forms["dat_sg_n"] = stem .. "uic" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = stem .. oc forms["acc_pl_n"] = stem .. "aec" forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. oc_macron forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} end if types.distr then if stem:sub(-1) == "n" then forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum{R}"} forms["gen_pl_f"] = {stem .. "um", stem .. "ārum{R}"} forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum{R}"} else error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem) end end forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["1-1+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "primera declinación") insert_if_not(categories, "LA:Adjetivos de la primera declinación") forms["nom_sg_m"] = stem .. "a" forms["nom_pl_m"] = stem .. "ae" forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ae" forms["gen_pl_m"] = stem .. "ārum" forms["dat_sg_m"] = stem .. "ae" forms["dat_pl_m"] = stem .. "īs" forms["acc_sg_m"] = stem .. "am" forms["acc_sg_n"] = stem .. "a" forms["acc_pl_m"] = stem .. "ās" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ā" forms["abl_pl_m"] = stem .. "īs" forms["voc_sg_m"] = stem .. "a" forms["voc_pl_m"] = stem .. "ae" forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["2-2+"] = function(data, args) local forms, types, pos, subtitles, categories = data.forms, data.types, data.pos, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "segunda declinación") insert_if_not(categories, "LA:Adjetivos de la segunda declinación") local us = "us" local um = "um" local i_pl = stem .. "ī" if types.greek then insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Sustantivos griegos") us = "os" um = "on" i_pl = {i_pl, stem .. "oe"} end forms["nom_sg_m"] = stem .. us forms["nom_sg_n"] = stem .. um forms["nom_pl_m"] = i_pl forms["nom_pl_n"] = stem .. "a" forms["gen_sg_m"] = stem .. "ī" forms["gen_sg_n"] = stem .. "ī" forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_sg_m"] = stem .. "ō" forms["dat_sg_n"] = stem .. "ō" forms["dat_pl_m"] = stem .. "īs" forms["dat_pl_n"] = stem .. "īs" forms["acc_sg_m"] = stem .. um forms["acc_sg_n"] = stem .. um forms["acc_pl_m"] = stem .. "ōs" forms["acc_pl_n"] = stem .. "a" forms["abl_sg_m"] = stem .. "ō" forms["abl_sg_n"] = stem .. "ō" forms["abl_pl_m"] = stem .. "īs" forms["abl_pl_n"] = stem .. "īs" forms["voc_sg_m"] = stem .. "e" forms["voc_sg_n"] = stem .. um forms["voc_pl_m"] = i_pl forms["voc_pl_n"] = stem .. "a" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end local function abl_i_e(...) local function update_slot(forms, slot, f, do_copy) if not forms[slot] then return do_copy elseif do_copy then f = deep_copy(f) end forms[slot] = f return true end function abl_i_e(stem, forms, types) local f, do_copy if types["abl_e_i"] then f = {stem .. "e", stem .. "ī"} elseif types["abl_i_e"] then f = {stem .. "ī", stem .. "e"} else return end do_copy = update_slot(forms, "abl_sg_m", f, do_copy) do_copy = update_slot(forms, "abl_sg_f", f, do_copy) -- Neuter doesn't take -e with i-stems. if not types.I then update_slot(forms, "abl_sg_n", f, do_copy) end end return abl_i_e(...) end adj_decl["3-1+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) if types.par then forms["nom_pl_n"] = stem2 .. "a" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["abl_sg_m"] = stem2 .. "e" forms["abl_sg_n"] = stem2 .. "e" forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"} -- Really? forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"} -- Why does this happen? forms["acc_pl_n"] = stem2 .. "a" forms["voc_pl_n"] = stem2 .. "a" end local es_base = stem1:match("^(.-)ēs$") if es_base and es_base == stem2 then if types.greek then forms["nom_sg_n"] = {stem2 .. "ē̆s{?}"} forms["acc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_m"] = {stem2 .. "ē̆s{?}"} forms["voc_sg_n"] = {stem2 .. "ē̆s{?}"} forms["nom_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["acc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["voc_pl_n"] = {stem2 .. "a{?}", stem2 .. "ia{?}"} forms["abl_sg_m"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["abl_sg_n"] = {stem2 .. "e{?}", stem2 .. "ī{?}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["gen_pl_m"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} forms["gen_pl_n"] = {stem2 .. "um{?}", stem2 .. "ium{?}"} insert_if_not(data.title, "griego") insert_if_not(categories, "LA:Adjetivos griegos") elseif types.not_greek then insert_if_not(data.title, "no griego") end end end adj_decl["3-def+"] = function(data, args) local forms, types, pos, subtitles, notes, categories = data.forms, data.types, data.pos, data.subtitles, data.notes, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, defectivo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") forms["nom_sg_m"] = stem1 forms["nom_sg_n"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 forms["acc_pl_m"] = stem2 .. "ēs" forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" forms["voc_sg_m"] = stem1 forms["voc_sg_n"] = stem1 forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" if types.tor then insert_if_not(data.title, "tercera declinación, solo en masculino") insert_if_not(categories, "LA:Adjetivos solo en masculino") remove_forms(forms, {"_f$", "_n$"}) forms["nom_sg_m"] = stem1 forms["gen_sg_m"] = stem2 .. "is" forms["dat_sg_m"] = stem2 .. "ī" forms["acc_sg_m"] = stem2 .. "em" forms["abl_sg_m"] = stem2 .. "e" forms["voc_sg_m"] = stem1 forms["nom_pl_m"] = stem2 .. "ēs" forms["gen_pl_m"] = stem2 .. "um" forms["dat_pl_m"] = stem2 .. "ibus" forms["acc_pl_m"] = stem2 .. "ēs" forms["abl_pl_m"] = stem2 .. "ibus" forms["voc_pl_m"] = stem2 .. "ēs" end if types.trix then insert_if_not(data.title, "tercera declinación, solo en femenino o en neutro plural") insert_if_not(categories, "LA:Adjetivos solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en neutro") remove_forms(forms, {"_m$", "sg_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.trixf then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = stem2 .. "is" forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = stem2 .. "em" forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"} forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = stem2 .. "ēs" forms["gen_pl_f"] = stem2 .. "ium" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = stem2 .. "ēs" forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = stem2 .. "ēs" end if types.idis then insert_if_not(data.title, "tercera declinación, solo en femenino") insert_if_not(categories, "LA:Adjetivos solo en femenino") remove_forms(forms, {"_m$","_n$"}) forms["nom_sg_f"] = stem1 forms["gen_sg_f"] = {stem2 .. "is", stem2 .. "os"} forms["dat_sg_f"] = stem2 .. "ī" forms["acc_sg_f"] = {stem2 .. "em", stem2 .. "a"} forms["abl_sg_f"] = stem2 .. "e" forms["voc_sg_f"] = stem1 forms["nom_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} forms["gen_pl_f"] = stem2 .. "um" forms["dat_pl_f"] = stem2 .. "ibus" forms["acc_pl_f"] = {stem2 .. "ēs", stem2 .. "as"} forms["abl_pl_f"] = stem2 .. "ibus" forms["voc_pl_f"] = {stem2 .. "ēs", stem2 .. "es"} end forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-C+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1 = args[1] local stem2 = stem1 .. "ōr" insert_if_not(data.title, "tercera declinación, comparativo") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos comparativos") forms["nom_sg_m"] = stem1 .. "or" forms["nom_sg_n"] = stem1 .. "us" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "a" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "um" forms["gen_pl_n"] = stem2 .. "um" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_n"] = stem1 .. "us" forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} forms["acc_pl_n"] = stem2 .. "a" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" abl_i_e(stem2, forms, types) forms["voc_sg_m"] = stem1 .. "or" forms["voc_sg_n"] = stem1 .. "us" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "a" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-P+"] = function(data, args) local forms, notes = data.forms, data.notes local stem2 = args[2] adj_decl["3-1+"](data, args) insert_if_not(data.title, "tercera declinación, participio") insert_if_not(data.categories, "LA:Adjetivos de la tercera declinación") forms["abl_sg_m"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["abl_sg_n"] = {stem2 .. "e{PART}", stem2 .. "ī{ADJ}"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"} end adj_decl["3-2+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem = args[1] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación, dos terminaciones") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con dos terminaciones") forms["nom_sg_m"] = stem .. "is" forms["nom_sg_n"] = stem .. "e" forms["nom_pl_m"] = stem .. "ēs" forms["nom_pl_n"] = stem .. "ia" forms["gen_sg_m"] = stem .. "is" forms["gen_sg_n"] = stem .. "is" forms["gen_pl_m"] = stem .. "ium" forms["gen_pl_n"] = stem .. "ium" forms["dat_sg_m"] = stem .. "ī" forms["dat_sg_n"] = stem .. "ī" forms["dat_pl_m"] = stem .. "ibus" forms["dat_pl_n"] = stem .. "ibus" forms["acc_sg_m"] = stem .. "em" forms["acc_sg_n"] = stem .. "e" forms["acc_pl_m"] = {stem .. "īs", stem .. "ēs"} forms["acc_pl_n"] = stem .. "ia" forms["abl_sg_m"] = stem .. "ī" forms["abl_sg_n"] = stem .. "ī" forms["abl_pl_m"] = stem .. "ibus" forms["abl_pl_n"] = stem .. "ibus" -- abl_i_e(stem, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem .. "is" forms["voc_sg_n"] = stem .. "e" forms["voc_pl_m"] = stem .. "ēs" forms["voc_pl_n"] = stem .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["3-3+"] = function(data, args) local forms, types, pos, categories = data.forms, data.types, data.pos, data.categories local stem1, stem2 = args[1], args[2] -- local singpos = singularize(pos) insert_if_not(data.title, "tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación") insert_if_not(categories, "LA:Adjetivos de la tercera declinación con tres terminaciones") forms["nom_sg_m"] = stem1 forms["nom_sg_f"] = stem2 .. "is" forms["nom_sg_n"] = stem2 .. "e" forms["nom_pl_m"] = stem2 .. "ēs" forms["nom_pl_f"] = stem2 .. "ēs" forms["nom_pl_n"] = stem2 .. "ia" forms["gen_sg_m"] = stem2 .. "is" forms["gen_sg_f"] = stem2 .. "is" forms["gen_sg_n"] = stem2 .. "is" forms["gen_pl_m"] = stem2 .. "ium" forms["gen_pl_f"] = stem2 .. "ium" forms["gen_pl_n"] = stem2 .. "ium" forms["dat_sg_m"] = stem2 .. "ī" forms["dat_sg_f"] = stem2 .. "ī" forms["dat_sg_n"] = stem2 .. "ī" forms["dat_pl_m"] = stem2 .. "ibus" forms["dat_pl_f"] = stem2 .. "ibus" forms["dat_pl_n"] = stem2 .. "ibus" forms["acc_sg_m"] = stem2 .. "em" forms["acc_sg_f"] = stem2 .. "em" forms["acc_sg_n"] = stem2 .. "e" forms["acc_pl_m"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_f"] = {stem2 .. "īs", stem2 .. "ēs"} forms["acc_pl_n"] = stem2 .. "ia" forms["abl_sg_m"] = stem2 .. "ī" forms["abl_sg_f"] = stem2 .. "ī" forms["abl_sg_n"] = stem2 .. "ī" forms["abl_pl_m"] = stem2 .. "ibus" forms["abl_pl_f"] = stem2 .. "ibus" forms["abl_pl_n"] = stem2 .. "ibus" -- abl_i_e(stem2, forms, types) -- enable once [[Module:la-nominal]] has ben updated forms["voc_sg_m"] = stem1 forms["voc_sg_f"] = stem2 .. "is" forms["voc_sg_n"] = stem2 .. "e" forms["voc_pl_m"] = stem2 .. "ēs" forms["voc_pl_f"] = stem2 .. "ēs" forms["voc_pl_n"] = stem2 .. "ia" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) end adj_decl["indecl+"] = function(data, args) local forms, subtitles, categories = data.forms, data.subtitles, data.categories local stem = args[1] insert_if_not(data.title, "indeclinable") insert_if_not(categories, "LA:Adjetivos indeclinables") forms["nom_sg_m"] = stem forms["nom_pl_m"] = {} forms["gen_sg_m"] = {} forms["gen_pl_m"] = {} forms["dat_sg_m"] = {} forms["dat_pl_m"] = {} forms["acc_sg_m"] = stem forms["acc_pl_m"] = {} forms["abl_sg_m"] = {} forms["abl_pl_m"] = {} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) end adj_decl["irreg+"] = function(data,args) local forms, types, pos, notes, categories = data.forms, data.types, data.pos, data.notes, data.categories local arg1 = args[1] insert_if_not(data.title, "irregular") insert_if_not(categories, "LA:Adjetivos irregulares") if arg1 == "duo" or arg1 == "ambō" then local stem = sub(arg1, 1, -2) -- data.title = stem == "amb" and "irregular adjective" or "numeral" data.num = "pl" local stem_with_o = stem .. (stem == "amb" and "ō" or "o") forms["nom_pl_m"] = stem_with_o forms["nom_pl_f"] = stem .. "ae" forms["nom_pl_n"] = stem_with_o forms["gen_pl_m"] = stem .. "ōrum" forms["gen_pl_f"] = stem .. "ārum" forms["gen_pl_n"] = stem .. "ōrum" forms["dat_pl_m"] = stem .. "ōbus" forms["dat_pl_f"] = stem .. "ābus" forms["dat_pl_n"] = stem .. "ōbus" forms["acc_pl_m"] = {stem .. "ōs", stem_with_o} forms["acc_pl_f"] = stem .. "ās" forms["acc_pl_n"] = stem_with_o forms["abl_pl_m"] = stem .. "ōbus" forms["abl_pl_f"] = stem .. "ābus" forms["abl_pl_n"] = stem .. "ōbus" forms["voc_pl_m"] = stem_with_o forms["voc_pl_f"] = stem .. "ae" forms["voc_pl_n"] = stem_with_o if stem == "du" then forms["gen_pl_m"] = {forms["gen_pl_m"], "duum", "duom{†}"} forms["gen_pl_n"] = {forms["gen_pl_n"], "duum", "duom{†}"} end elseif arg1:sub(-6) == "mīlle" then insert_if_not(data.title, "numeral semiindeclinable") local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "le" forms["nom_pl_m"] = {stem .. "ia", stem .. "lia"} forms["gen_sg_m"] = stem .. "le" forms["gen_pl_m"] = {stem .. "ium", stem .. "lium"} forms["dat_sg_m"] = stem .. "le" forms["dat_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["acc_sg_m"] = stem .. "le" forms["acc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["abl_sg_m"] = stem .. "le" forms["abl_pl_m"] = {stem .. "ibus", stem .. "libus"} forms["voc_sg_m"] = stem .. "le" forms["voc_pl_m"] = {stem .. "ia", stem .. "lia"} forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) elseif arg1 == "ille" or arg1 == "iste" or arg1 == "ipse" or arg1 == "olle" then local stem = arg1:sub(1, -2) types.ius = true adj_decl["1&2+"](data, {stem}) insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) forms["nom_sg_m"] = arg1 if arg1 == "ipse" then add_form(forms, "nom_sg_n", stem, "ud{MED}") add_form(forms, "acc_sg_n", stem, "ud{MED}") else forms["nom_sg_n"] = stem .. "ud" forms["acc_sg_n"] = stem .. "ud" end forms["voc_sg_m"] = {} forms["voc_sg_f"] = {} forms["voc_sg_n"] = {} forms["voc_pl_m"] = {} forms["voc_pl_f"] = {} forms["voc_pl_n"] = {} elseif arg1 == "illic" or arg1 == "istic" or arg1 == "isthic" then insert_if_not(data.title, "demostrativo") -- .. " " .. singularize(data.pos) local stem = arg1:sub(1, -3) forms["nom_sg_m"] = stem .. "ic" forms["nom_sg_f"] = stem .. "aec" forms["nom_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["gen_sg_m"] = stem .. "ī̆usce" forms["gen_sg_f"] = stem .. "ī̆usce" forms["gen_sg_n"] = stem .. "ī̆usce" forms["dat_sg_m"] = stem .. "īc" forms["dat_sg_f"] = stem .. "īc" forms["dat_sg_n"] = stem .. "īc" forms["acc_sg_m"] = stem .. "unc" forms["acc_sg_f"] = stem .. "anc" forms["acc_sg_n"] = {stem .. "uc", stem .. "ucce", stem .. "oc"} forms["abl_sg_m"] = stem .. "ōc" forms["abl_sg_f"] = stem .. "āc" forms["abl_sg_n"] = stem .. "ōc" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["nom_pl_m"] = stem .. "īsce" forms["nom_pl_f"] = stem .. "aec" forms["nom_pl_n"] = stem .. "aec" forms["gen_pl_m"] = stem .. "ōrunc{?}" forms["gen_pl_f"] = stem .. "ārunc{?}" forms["gen_ok_n"] = stem .. "ōrunc{?}" forms["dat_pl_m"] = stem .. "īsce" forms["dat_pl_f"] = stem .. "īsce" forms["dat_pl_n"] = stem .. "īsce" forms["acc_pl_m"] = stem .. "ōsce" forms["acc_pl_f"] = stem .. "āsce" forms["acc_pl_n"] = stem .. "aec" forms["abl_pl_m"] = stem .. "īsce" forms["abl_pl_f"] = stem .. "īsce" forms["abl_pl_n"] = stem .. "īsce" forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "hice" then insert_if_not(data.title, "demostrativo") -- .. " pronoun" forms["nom_sg_m"] = "hice" forms["nom_sg_f"] = "haece" forms["nom_sg_n"] = "hoce" forms["nom_pl_m"] = "hīce" forms["nom_pl_f"] = "haece" forms["nom_pl_n"] = "haece" forms["gen_sg_m"] = "huiusce" forms["gen_sg_f"] = "huiusce" forms["gen_sg_n"] = "huiusce" forms["gen_pl_m"] = {"hōrunce", "hōrumce"} forms["gen_pl_f"] = {"hārunce", "hārumce"} forms["gen_pl_n"] = {"hōrunce", "hōrumce"} forms["dat_sg_m"] = "huīce" forms["dat_sg_f"] = "huīce" forms["dat_sg_n"] = "huīce" forms["dat_pl_m"] = "hīsce" forms["dat_pl_f"] = "hīsce" forms["dat_pl_n"] = "hīsce" forms["acc_sg_m"] = "hunce" forms["acc_sg_f"] = "hance" forms["acc_sg_n"] = "hoce" forms["acc_pl_m"] = "hōsce" forms["acc_pl_f"] = "hāsce" forms["acc_pl_n"] = "haece" forms["abl_sg_m"] = "hōce" forms["abl_sg_f"] = "hāce" forms["abl_sg_n"] = "hōce" forms["abl_pl_m"] = "hīsce" forms["abl_pl_f"] = "hīsce" forms["abl_pl_n"] = "hīsce" forms["loc_sg_m"] = deep_copy(forms["gen_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["gen_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["gen_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_f"] = deep_copy(forms["abl_pl_f"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif arg1 == "plūs" then insert_if_not(data.title, "comparativo") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación") insert_if_not(data.categories, "LA:Sustantivos de la tercera declinación con una terminación") data.note = "Ninguna de las formas en singular se usaron en latín clásico" forms["nom_sg_n"] = "plūs" forms["nom_pl_m"] = "plūrēs" forms["nom_pl_n"] = "plūra" forms["gen_sg_m"] = "plūris" forms["gen_sg_n"] = "plūris" forms["gen_pl_m"] = "plūrium" forms["gen_pl_n"] = "plūrium" forms["dat_sg_m"] = "plūrī" forms["dat_sg_n"] = "plūrī" forms["dat_pl_m"] = "plūribus" forms["dat_pl_n"] = "plūribus" forms["acc_sg_m"] = "plūrem" forms["acc_sg_f"] = "plūrem" forms["acc_sg_n"] = "plūs" forms["acc_pl_m"] = {"plūrēs", "plūrīs"} forms["acc_pl_n"] = "plūra" forms["abl_sg_m"] = {"plūrī", "plūre"} forms["abl_sg_f"] = {"plūrī", "plūre"} forms["abl_sg_n"] = {"plūrī", "plūre"} forms["abl_pl_m"] = "plūribus" forms["abl_pl_n"] = "plūribus" forms["voc_sg_n"] = "plūs" forms["voc_pl_m"] = "plūrēs" forms["voc_pl_n"] = "plūra" forms["loc_sg_m"] = deep_copy(forms["abl_sg_m"]) forms["loc_sg_f"] = deep_copy(forms["abl_sg_f"]) forms["loc_sg_n"] = deep_copy(forms["abl_sg_n"]) forms["loc_pl_m"] = deep_copy(forms["abl_pl_m"]) forms["loc_pl_n"] = deep_copy(forms["abl_pl_n"]) elseif match(arg1, "^egō̆?$") or arg1 == "nōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "nōs" forms["gen_sg_m"] = "meī" forms["gen_pl_m"] = {"nostrī", "nostrum"} forms["dat_sg_m"] = "mihī̆" forms["dat_pl_m"] = "nōbīs" forms["acc_sg_m"] = {"mē", "mēmē"} forms["acc_pl_m"] = "nōs" forms["abl_sg_m"] = {"mē", "mēmē"} forms["abl_pl_m"] = "nōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "nōs" elseif arg1 == "tū" or arg1 == "vōs" then insert_if_not(data.title, "pronombre nominativo") forms["nom_sg_m"] = arg1 forms["nom_pl_m"] = "vōs" forms["gen_sg_m"] = "tuī" forms["gen_pl_m"] = {"vestrī", "vestrum"} forms["dat_sg_m"] = "tibī̆" forms["dat_pl_m"] = "vōbīs" forms["acc_sg_m"] = {"tē", "tētē"} forms["acc_pl_m"] = "vōs" forms["abl_sg_m"] = {"tē", "tētē"} forms["abl_pl_m"] = "vōbīs" forms["voc_sg_m"] = arg1 forms["voc_pl_m"] = "vōs" elseif arg1 == "suī" then insert_if_not(data.title, "pronombre reflexivo") forms["nom_sg_m"] = {} forms["nom_pl_m"] = {} forms["gen_sg_m"] = arg1 forms["gen_pl_m"] = forms["gen_sg_m"] forms["dat_sg_m"] = "sibī̆" forms["dat_pl_m"] = forms["dat_sg_m"] forms["acc_sg_m"] = {"sē", "sēsē"} forms["acc_pl_m"] = {"sē", "sēsē"} forms["abl_sg_m"] = {"sē", "sēsē"} forms["abl_pl_m"] = {"sē", "sēsē"} forms["voc_sg_m"] = {} forms["voc_pl_m"] = {} elseif arg1 == "is" or arg1 == "īdem" then insert_if_not(data.title, "pronombre demostrativo") forms["nom_sg_m"] = "is" forms["nom_sg_f"] = "ea" forms["nom_sg_n"] = "id" forms["nom_pl_m"] = {"iī", "eī", "ī"} forms["nom_pl_f"] = "eae" forms["nom_pl_n"] = "ea" forms["gen_sg_m"] = {"eius", "ejus"} forms["gen_sg_f"] = {"eius", "ejus"} forms["gen_sg_n"] = {"eius", "ejus"} forms["gen_pl_m"] = {"eōrum", "eum"} forms["gen_pl_f"] = "eārum" forms["gen_pl_n"] = {"eōrum", "eum"} forms["dat_sg_m"] = {"eī", "e͡i", "ēī"} forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"} forms["dat_sg_n"] = {"eī", "e͡i", "ēī"} forms["dat_pl_m"] = {"iīs", "eīs", "īs"} forms["dat_pl_f"] = {"iīs", "eīs", "īs", "eābus"} forms["dat_pl_n"] = {"iīs", "eīs", "īs"} forms["acc_sg_m"] = "eum" forms["acc_sg_f"] = "eam" forms["acc_sg_n"] = "id" forms["acc_pl_m"] = "eōs" forms["acc_pl_f"] = "eās" forms["acc_pl_n"] = "ea" forms["abl_sg_m"] = "eō" forms["abl_sg_f"] = "eā" forms["abl_sg_n"] = "eō" forms["abl_pl_m"] = {"iīs", "eīs", "īs"} forms["abl_pl_f"] = {"iīs", "eīs", "īs"} forms["abl_pl_n"] = {"iīs", "eīs", "īs"} if arg1 == "īdem" then forms["nom_sg_m"] = "ī" forms["nom_sg_n"] = "i" forms["acc_sg_n"] = "i" end elseif arg1 == "quis" or arg1 == "quī" then data.note = "La forma ''qua'' es preferida frente a ''quae'' cuando se usa como indefinido" local id = "id" if arg1 == "quī" then insert_if_not(data.title, "determinante relativo/interrogativo") id = "od" forms["nom_sg_m"] = {"quī", "quis", "quei{†}"} forms["nom_sg_f"] = {"quae", "qua"} forms["acc_sg_f"] = "quam" forms["abl_sg_m"] = "quō" forms["abl_sg_f"] = "quā" forms["abl_sg_n"] = "quō" else insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = {"quis", "quī"} forms["nom_sg_f"] = {"quae", "qua", "quis{†}"} forms["acc_sg_f"] = {"quam", "quem{†}"} forms["abl_sg_m"] = {"quō", "quī"} forms["abl_sg_f"] = {"quā", "quī"} forms["abl_sg_n"] = {"quō", "quī"} end forms["nom_sg_n"] = "qu"..id forms["nom_pl_m"] = {"quī", "quei{†}"} forms["nom_pl_f"] = "quae" forms["nom_pl_n"] = {"quae", "qua"} forms["gen_sg_m"] = {"cuius", "quoius{†}"} forms["gen_sg_f"] = {"cuius", "quoius{†}"} forms["gen_sg_n"] = {"cuius", "quoius{†}"} forms["gen_pl_m"] = "quōrum" forms["gen_pl_f"] = "quārum" forms["gen_pl_n"] = "quōrum" forms["dat_sg_m"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_f"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_sg_n"] = {"cui", "quoi{†}", "quoiei{†}"} forms["dat_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["dat_pl_n"] = {"quibus", "quīs", "queis{†}"} forms["acc_sg_m"] = "quem" forms["acc_sg_n"] = "qu"..id forms["acc_pl_m"] = "quōs" forms["acc_pl_f"] = "quās" forms["acc_pl_n"] = {"quae", "qua"} forms["abl_pl_m"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_f"] = {"quibus", "quīs", "queis{†}"} forms["abl_pl_n"] = {"quibus", "quīs", "queis{†}"} elseif arg1 == "aliquī" then insert_if_not(data.title, "determinante indefinido") forms["nom_sg_m"] = {"aliquī{DET/ADJ}", "aliquis{PRON/SUST}"} forms["nom_sg_f"] = {"aliqua", "aliquae{R}"} forms["nom_sg_n"] = "aliquod" forms["nom_pl_m"] = "aliquī" forms["nom_pl_f"] = "aliquae" forms["nom_pl_n"] = "aliqua" forms["gen_sg_m"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_f"] = {"alicuius", "aliquoius{†}"} forms["gen_sg_n"] = {"alicuius", "aliquoius{†}"} forms["gen_pl_m"] = "aliquōrum" forms["gen_pl_f"] = "aliquārum" forms["gen_pl_n"] = "aliquōrum" forms["dat_sg_m"] = {"alicui", "aliquoi{†}"} forms["dat_sg_f"] = {"alicui", "aliquoi{†}"} forms["dat_sg_n"] = {"alicui", "aliquoi{†}"} forms["dat_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["dat_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["acc_sg_m"] = "aliquem" forms["acc_sg_f"] = "aliquam" forms["acc_sg_n"] = "aliquod" forms["acc_pl_m"] = "aliquōs" forms["acc_pl_f"] = "aliquās" forms["acc_pl_n"] = "aliqua" forms["abl_sg_m"] = "aliquō" forms["abl_sg_f"] = "aliquā" forms["abl_sg_n"] = "aliquō" forms["abl_pl_m"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_f"] = {"aliquīs", "aliquibus", "aliqueis{†}"} forms["abl_pl_n"] = {"aliquīs", "aliquibus", "aliqueis{†}"} elseif arg1 == "quisquam" then insert_if_not(data.title, "determinante indefinido, concordancia en negativo") data.note = "En latín clásico, era preferidas las formas de ''ūllus'' en lugar de las esta voz para el femenino y el neutro." forms["nom_sg_m"] = "quisquam" forms["nom_sg_f"] = {"quaequam", "quisquam{†}"} forms["nom_sg_n"] = "quodquam" forms["nom_pl_m"] = "quīquam" forms["nom_pl_f"] = "quaequam" forms["nom_pl_n"] = "quaequam" forms["gen_sg_m"] = "cuiusquam" forms["gen_sg_f"] = "cuiusquam" forms["gen_sg_n"] = "cuiusquam" forms["gen_pl_m"] = "quōrumquam" forms["gen_pl_f"] = "quārumquam" forms["gen_pl_n"] = "quōrumquam" forms["dat_sg_m"] = "cuiquam" forms["dat_sg_f"] = "cuiquam" forms["dat_sg_n"] = "cuiquam" forms["dat_pl_m"] = "quibusquam" forms["dat_pl_f"] = "quibusquam" forms["dat_pl_n"] = "quibusquam" forms["acc_sg_m"] = "quemquam" forms["acc_sg_f"] = {"quamquam", "quemquam{†}"} forms["acc_sg_n"] = "quodquam" forms["acc_pl_m"] = "quōsquam" forms["acc_pl_f"] = "quāsquam" forms["acc_pl_n"] = "quaequam" forms["abl_sg_m"] = {"quōquam", "quīquam{†}"} forms["abl_sg_f"] = "quāquam" forms["abl_sg_n"] = "quōquam" forms["abl_pl_m"] = "quibusquam" forms["abl_pl_f"] = "quibusquam" forms["abl_pl_n"] = "quibusquam" forms["voc_sg_m"] = "quisquam" forms["voc_sg_f"] = "quaequam" forms["voc_sg_n"] = "quodquam" forms["voc_pl_m"] = "quīquam" forms["voc_pl_f"] = "quaequam" forms["voc_pl_n"] = "quaequam" elseif arg1 == "quisquis" then insert_if_not(data.title, "pronombre relativo/interrogativo") forms["nom_sg_m"] = "quisquis" forms["nom_sg_f"] = "quisquis" forms["nom_sg_n"] = {"quidquid", "quicquid"} forms["nom_pl_m"] = "quīquī" forms["nom_pl_f"] = "quaequae" forms["nom_pl_n"] = "quaequae" forms["gen_sg_m"] = "cuiuscuius" forms["gen_sg_f"] = "cuiuscuius" forms["gen_sg_n"] = "cuiuscuius" forms["gen_pl_m"] = "quōrumquōrum" forms["gen_pl_f"] = "quārumquārum" forms["gen_pl_n"] = "quōrumquōrum" forms["dat_sg_m"] = "cuicui" forms["dat_sg_f"] = "cuicui" forms["dat_sg_n"] = "cuicui" forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"} forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"} forms["acc_sg_m"] = "quemquem" forms["acc_sg_f"] = "quamquam" forms["acc_sg_n"] = {"quidquid", "quicquid"} forms["acc_pl_m"] = "quōsquōs" forms["acc_pl_f"] = "quāsquās" forms["acc_pl_n"] = "quaequae" forms["abl_sg_m"] = "quōquō" forms["abl_sg_f"] = "quāquā" forms["abl_sg_n"] = "quōquō" forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"} forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"} forms["voc_sg_m"] = "quisquis" forms["voc_sg_f"] = "quisquis" forms["voc_sg_n"] = {"quidquid", "quicquid"} forms["voc_pl_m"] = "quīquī" forms["voc_pl_f"] = "quaequae" forms["voc_pl_n"] = "quaequae" elseif arg1 == "ecquis" then insert_if_not(data.title, "pronombre interrogativo") forms["nom_sg_m"] = {"ecquis", "ecquī"} forms["nom_sg_f"] = {"ecqua", "ecquae"} forms["nom_sg_n"] = "ecquid" forms["nom_pl_m"] = "ecquī" forms["nom_pl_f"] = "ecquae" forms["nom_pl_n"] = {"ecqua", "ecquae"} forms["gen_sg_m"] = "eccuius" forms["gen_sg_f"] = "eccuius" forms["gen_sg_n"] = "eccuius" forms["dat_sg_m"] = "eccui" forms["dat_sg_f"] = "eccui" forms["dat_sg_n"] = "eccui" forms["acc_sg_m"] = "ecquem" forms["acc_sg_f"] = "ecquam" forms["acc_sg_n"] = "ecquod" forms["acc_pl_m"] = "ecquōs" forms["acc_pl_f"] = "ecquās" forms["acc_pl_n"] = {"ecqua", "ecquae"} forms["abl_sg_m"] = {"ecquō", "ecquī"} forms["abl_sg_f"] = {"ecquā", "ecquī"} forms["abl_sg_n"] = {"ecquō", "ecquī"} elseif arg1 == "quīdam" then insert_if_not(data.title, "pronombre indefinido") forms["nom_sg_m"] = "quīdam" forms["nom_sg_f"] = "quaedam" forms["nom_sg_n"] = "quiddam" forms["nom_pl_m"] = {"quīdam", "quēsdam{†}"} forms["nom_pl_f"] = "quaedam" forms["nom_pl_n"] = "quaedam" forms["gen_sg_m"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_f"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_sg_n"] = {"cuiusdam", "quoiusdam{†}"} forms["gen_pl_m"] = {"quōrundam", "quōrumdam"} forms["gen_pl_f"] = {"quārundam", "quārumdam"} forms["gen_pl_n"] = {"quōrundam", "quōrumdam"} forms["dat_sg_m"] = {"cuidam", "quoidam{†}"} forms["dat_sg_f"] = {"cuidam", "quoidam{†}"} forms["dat_sg_n"] = {"cuidam", "quoidam{†}"} forms["dat_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["dat_pl_n"] = {"quibusdam", "quīsdam{†}"} forms["acc_sg_m"] = {"quendam", "quemdam"} forms["acc_sg_f"] = {"quandam", "quamdam"} forms["acc_sg_n"] = "quiddam" forms["acc_pl_m"] = {"quōsdam", "quēsdam{†}"} forms["acc_pl_f"] = "quāsdam" forms["acc_pl_n"] = "quaedam" forms["abl_sg_m"] = "quōdam" forms["abl_sg_f"] = "quādam" forms["abl_sg_n"] = "quōdam" forms["abl_pl_m"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_f"] = {"quibusdam", "quīsdam{†}"} forms["abl_pl_n"] = {"quibusdam", "quīsdam{†}"} elseif arg1 == "nēmō" then insert_if_not(data.title, "Determinante y pronombre, concordancia en negativo") forms["nom_sg_m"] = "nēmō" forms["nom_sg_f"] = "nēmō" forms["gen_sg_m"] = {"nūllī̆us", "nēminis{R}"} forms["gen_sg_f"] = {"nūllī̆us", "nēminis{R}"} forms["dat_sg_m"] = "nēminī" forms["dat_sg_f"] = "nēminī" forms["acc_sg_m"] = "nēminem" forms["acc_sg_f"] = "nēminem" forms["abl_sg_m"] = {"nūllō", "nēmine{R}"} forms["abl_sg_f"] = {"nūllā", "nēmine{R}"} else error('adjective ' .. arg1 .. ' not recognized') end end local function extract_base(lemma, ending) if ending:find("(", nil, true) then return match(lemma, ending) end return match(lemma, "^(.*)" .. ending .. "$") end local function get_noun_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local subtypes = ending_and_subtypes[2] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. -- In addition, M or F as a subtype is canceled by N, and -- vice-versa, but M doesn't cancel F or vice-versa; instead, -- we simply ignore the conflicting gender specification when -- constructing the combination of specified and inferred subtypes. -- The reason for this is that neuters have distinct declensions -- from masculines and feminines, but masculines and feminines have -- the same declension, and various nouns in Latin that are -- normally masculine are exceptionally feminine and vice-versa -- (nauta, agricola, fraxinus, malus "apple tree", manus, rēs, -- etc.). -- -- In addition, sg as a subtype is canceled by pl and vice-versa. -- It's also possible to specify both, which will override sg but -- not cancel it (in the sense that it won't prevent the relevant -- rule from matching). For example, there's a rule specifying that -- lemmas beginning with a capital letter and ending in -ius take -- the ius.voci.sg subtypes. Specifying such a lemma with the -- subtype both will result in the ius.voci.both subtypes, whereas -- specifying such a lemma with the subtype pl will cause this rule -- not to match, and it will fall through to a less specific rule -- that returns just the ius subtype, which will be combined with -- the explicitly specified pl subtype to produce ius.pl. if specified_subtypes["-" .. subtype] or subtype == "N" and (specified_subtypes.M or specified_subtypes.F) or (subtype == "M" or subtype == "F") and specified_subtypes.N or subtype == "sg" and specified_subtypes.pl or subtype == "pl" and specified_subtypes.sg then not_this_subtype = true break end end end if not not_this_subtype then if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] local base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending == stem2 then return base, stem2, subtypes end else local base = extract_base(lemma, ending) if base then return base, stem2, subtypes end end end end if decltype then error("Unrecognized ending for declension-" .. decltype .. " noun: " .. lemma) end return lemma, stem2, keys_to_list(specified_subtypes) end local patterns = { {"[mM]a", "%0t"}, {"e", ""}, {"([aoAO])([lr])", "%1" .. MACRON .. "%2"}, {"[eE]l", "%0l"}, {"([mM])en", "%1in"}, {"([tT]ūd)ō", "%1in"}, {"([gG])ō", "%1in"}, {"[ōŌ]", "%1n"}, {"er", "r"}, {"[ēi]s", ""}, {"([āēīōūȳĀĒĪŌŪȲ]n)s", function(v) return (gsub(toNFD(v), MACRON, "") .. "t") end}, {"([cC])eps", "%1ipit"}, {"([bp])s", "%1"}, {"us", "or"}, {"s", "t"}, {"ex", "ic"}, {"x", "c"}, } local function make_stem2(stem) local n for _, pattern in ipairs(patterns) do local key = pattern[1] stem, n = gsub(stem, key .. "$", pattern[2]) if n > 0 then -- debug_track("la-utilities/" .. key) REVISAR return toNFC(stem) end end -- debug_track("la-utilities") REVISAR return stem end local function detect_noun_subtype(lemma, stem2, typ, subtypes) local base, _ if typ == "1" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ām", {"F", "am"}}, {"ās", {"M", "Greek", "Ma"}}, {"ēs", {"M", "Greek", "Me"}}, {"ē", {"F", "Greek"}}, {"ae", {"F", "pl"}}, {"a", {"F"}}, }) elseif typ == "2" then local detected_subtypes lemma, stem2, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(.*r)$", {"M", "er"}}, {"^(.*v)os$", {"M", "vos"}}, {"^(.*v)om$", {"N", "vom"}}, -- If the lemma ends in -os and the user said N or -M, then the -- following won't apply, and the second (neuter) -os will applly. {"os", {"M", "Greek"}}, {"os", {"N", "Greek", "us"}}, {"on", {"N", "Greek"}}, -- -ius beginning with a capital letter is assumed a proper name, -- and takes the voci subtype (vocative in -ī) along with the ius -- subtype and sg-only. Other nouns in -ius just take the ius -- subtype. Explicitly specify "sg" so that if .pl is given, -- this rule won't apply. {"^(%u.*)ius$", {"M", "ius", "voci", "sg"}}, {"ius", {"M", "ius"}}, {"ium", {"N", "ium"}}, -- If the lemma ends in -us and the user said N or -M, then the -- following won't apply, and the second (neuter) -us will applly. {"us", {"M"}}, {"us", {"N", "us"}}, {"um", {"N"}}, {"iī", {"M", "ius", "pl"}}, {"ia", {"N", "ium", "pl"}}, -- If the lemma ends in -ī and the user said N or -M, then the -- following won't apply, and the second (neuter) -ī will applly. {"ī", {"M", "pl"}}, {"ī", {"N", "us", "pl"}}, {"oe", {"M", "Greek", "pl"}}, {"a", {"N", "pl"}}, }) stem2 = stem2 or lemma return lemma, stem2, detected_subtypes elseif typ == "3" then if subtypes.pl then if subtypes.Greek then base = lemma:match("^(.*)erēs$") if base then return base .. "ēr", base .. "er", {"er"} end base = lemma:match("^(.*)ontēs$") if base then return base .. "ōn", base .. "ont", {"on"} end base = lemma:match("^(.*)es$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural Greek noun: " .. lemma) end base = lemma:match("^(.*)ia$") if base then return base, stem2 or base, {"N", "I", "pure"} end base = lemma:match("^(.*)a$") if base then return base, stem2 or base, {"N"} end base = lemma:match("^(.*)ēs$") if base then return base, stem2 or base, {} end error("Unrecognized ending for declension-3 plural noun: " .. lemma) end stem2 = stem2 or make_stem2(lemma) local detected_subtypes if subtypes.Greek then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"is", ""}, {"I"}}, {"ēr", {"er"}}, {"ōn", {"on"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} end if not subtypes.N then base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"^(%u.*pol)is$", ""}, {"F", "polis", "sg", "loc"}}, {{"tūdō", "tūdin"}, {"F"}}, {{"tās", "tāt"}, {"F"}}, {{"tūs", "tūt"}, {"F"}}, {{"tiō", "tiōn"}, {"F"}}, {{"siō", "siōn"}, {"F"}}, {{"xiō", "xiōn"}, {"F"}}, {{"gō", "gin"}, {"F"}}, {{"or", "ōr"}, {"M"}}, {{"tr[iī]x", "trīc"}, {"F"}}, {{"is", ""}, {"I"}}, {{"^(%l.*)ēs$", ""}, {"I"}}, }) if base then return lemma, stem2, detected_subtypes end end base, _, detected_subtypes = get_noun_subtype_by_ending(lemma, stem2, nil, subtypes, { {{"us", "or"}, {"N"}}, {{"us", "er"}, {"N"}}, {{"ma", "mat"}, {"N"}}, {{"men", "min"}, {"N"}}, {{"^(%u.*)e$", ""}, {"N", "sg"}}, {{"e", ""}, {"N", "I", "pure"}}, {{"al", "āl"}, {"N", "I", "pure"}}, {{"ar", "ār"}, {"N", "I", "pure"}}, }) if base then return lemma, stem2, detected_subtypes end return lemma, stem2, {} elseif typ == "4" then if subtypes.echo or subtypes.Callisto then base = lemma:match("^(.*)ō$") if not base then error("Declension-4 noun of subtype .echo or .Callisto should end in -ō: " .. lemma) end if subtypes.Callisto then return base, nil, {"F", "sg"} else return base, nil, {"F"} end end return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", {"M"}}, {"ū̆", {"N"}}, {"ūs", {"M", "pl"}}, {"ua", {"N", "pl"}}, }) elseif typ == "5" then return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"iēs", {"F", "i"}}, {"iēs", {"F", "i", "pl"}}, {"ēs", {"F"}}, {"ēs", {"F", "pl"}}, }) elseif typ == "sgpl" then return lemma, stem2, {} elseif typ == "irreg" and lemma == "domus" then -- [[domus]] auto-sets data.loc = true, but we need to know this -- before declining the noun so we can propagate it to other segments. return lemma, nil, {"loc"} elseif typ == "indecl" or typ == "irreg" and ( lemma == "Deus" or match(lemma, "^[IJ]ēs[uū]s$") or lemma == "Athōs" or lemma == "vēnum" ) then -- Indeclinable nouns, and certain irregular nouns, set data.num = "sg", -- but we need to know this before declining the noun so we can -- propagate it to other segments. return get_noun_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", {"both"}}, {"", {"sg"}}, {"", {"pl"}}, }) elseif typ == "indecl" or typ == "irreg" then return lemma, nil, {} else return nil, nil, {} end end -- Given ENDINGS_AND_SUBTYPES (a list of four-tuples of ENDING, RETTYPE, -- SUBTYPES, PROCESS_RETVAL), check each ENDING in turn against LEMMA and -- STEM2. If it matches, return a four-tuple BASE, STEM2, RETTYPE, NEW_SUBTYPES -- where BASE is normally the remainder of LEMMA minus the ending, STEM2 is -- as passed in, RETTYPE is as passed in, and NEW_SUBTYPES is the same as -- SUBTYPES minus any subtypes beginning with a hyphen. If no endings match, -- throw an error if DECLTYPPE is non-nil, mentioning the DECLTYPE -- (user-specified declension); but if DECLTYPE is nil, just return the tuple -- nil, nil, nil, nil. -- -- In order for a given entry to match, ENDING must match and also the subtypes -- in SUBTYPES (a list) must not be incompatible with the passed-in -- user-specified subtypes SPECIFIED_SUBTYPES (a set, i.e. a table where the -- keys are strings and the value is always true). "Incompatible" means that -- a given SUBTYPE is specified in either one and -SUBTYPE in the other, or -- that "pl" is found in SPECIFIED_SUBTYPES and not in SUBTYPES. -- -- The ending spec in ENDINGS_AND_SUBTYPES is one of the following: -- -- 1. A simple string, e.g. "tūdō", specifying an ending. -- 2. A regex that should match the entire lemma (it should be anchored at -- the beginning with ^ and at the end with $), and contains a single -- capturing group to match the base. -- 3. A pair {SIMPLE_STRING_OR_REGEX, STEM2_ENDING} where -- SIMPLE_STRING_OR_REGEX is one of the previous two possibilities and -- STEM2_ENDING is a string specifying the corresponding ending that must -- be present in STEM2. If this form is used, the combination of -- base + STEM2_ENDING must exactly match STEM2 in order for this entry -- to be considered a match. An example is {"is", ""}, which will match -- lemma == "follis", stem2 == "foll", but not lemma == "lapis", -- stem2 == "lapid". -- -- If PROCESS_STEM2 is given and the returned STEM2 would be nil, call -- process_stem2(BASE) to get the STEM2 to return. local function get_adj_type_and_subtype_by_ending(lemma, stem2, decltype, specified_subtypes, endings_and_subtypes, process_stem2) for _, ending_and_subtypes in ipairs(endings_and_subtypes) do local ending = ending_and_subtypes[1] local rettype = ending_and_subtypes[2] local subtypes = ending_and_subtypes[3] local process_retval = ending_and_subtypes[4] local not_this_subtype = false if ( specified_subtypes.pl and not contains(subtypes, "pl") or contains(subtypes, "both") and not specified_subtypes.both ) then -- We now require that plurale tantum terms specify a plural-form lemma. -- The autodetected subtypes will include 'pl' for such lemmas; if not, -- we fail this entry. Additionally, if the rule contains 'both', it -- must be explicitly specified to match. not_this_subtype = true else for _, subtype in ipairs(subtypes) do -- A subtype is directly canceled by specifying -SUBTYPE. if specified_subtypes["-" .. subtype] then not_this_subtype = true break end -- A subtype is canceled if the user specified SUBTYPE and -- -SUBTYPE is given in the to-be-returned subtypes. local must_not_be_present = subtype:match("^%-(.*)$") if must_not_be_present and specified_subtypes[must_not_be_present] then not_this_subtype = true break end end end if not not_this_subtype then local base if type(ending) == "table" then local lemma_ending = ending[1] local stem2_ending = ending[2] base = extract_base(lemma, lemma_ending) if base and base .. stem2_ending ~= stem2 then base = nil end else base = extract_base(lemma, ending) end if base then -- Remove subtypes of the form -SUBTYPE from the subtypes -- to be returned. local new_subtypes = {} for _, subtype in ipairs(subtypes) do if subtype:sub(1, 1) ~= "-" then insert(new_subtypes, subtype) end end if process_retval then base, stem2 = process_retval(base, stem2) end if process_stem2 then stem2 = stem2 or process_stem2(base) end return base, stem2, rettype, new_subtypes end end end if not decltype then return lemma, stem2, nil, keys_to_list(specified_subtypes) elseif decltype == "" then error("Unrecognized ending for adjective: " .. lemma) else error("Unrecognized ending for declension-" .. decltype .. " adjective: " .. lemma) end end -- Autodetect the type and subtype of an adjective given all the information -- specified by the user: lemma, stem2, declension type and specified subtypes. -- Four values are returned: the lemma base (i.e. the stem of the lemma, as -- required by the declension functions), the value of stem2 to pass to the -- declension function, the declension type and the autodetected subtypes. -- Note that this will not detect a given subtype if -SUBTYPE is specified for -- any subtype that would be returned, or if SUBTYPE is specified and -SUBTYPE -- is among the subtypes that would be returned (such subtypes are filtered out -- of the returned subtypes). local function detect_adj_type_and_subtype(lemma, stem2, typ, subtypes) local function base_as_stem2(base, stem2) return base, base end local function constant_base(baseval) return function(base, stem2) return baseval, nil end end local function decl12_stem2(base) return base end local function decl3_stem2(base) return make_stem2(base) end local decl12_entries = { {"us", "1&2+", {}}, {"a", "1&2+", {}}, {"um", "1&2+", {}}, {"ī", "1&2+", {"pl"}}, {"ae", "1&2+", {"pl"}}, {"a", "1&2+", {"pl"}}, -- Nearly all -os adjectives are greekA {"os", "1&2+", {"greekA", "-greekE"}}, {"os", "1&2+", {"greekE", "-greekA"}}, {"ē", "1&2+", {"greekE", "-greekA"}}, {"on", "1&2+", {"greekA", "-greekE"}}, {"on", "1&2+", {"greekE", "-greekA"}}, {"^(.*er)$", "1&2+", {"er"}}, {"^(.*ur)$", "1&2+", {"er"}}, {"^(h)ic$", "1&2+", {"ic"}}, } local decl3_entries = { {"^(.*er)$", "3-3+", {"I"}}, {"^(.*er)$", "3-3+", {}}, {"is", "3-2+", {"I"}}, {"is", "3-2+", {}}, {"e", "3-2+", {"I"}}, {"e", "3-2+", {}}, {"^(.*[ij])or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(.*[ij])or$", "3-C+", {}}, {"^(min)or$", "3-C+", {"abl_e_i", "-abl_i_e"}}, {"^(min)or$", "3-C+", {}}, {"^(.*trīx)$", "3-def+", {"trix", "abl_i_e", "-abl_e_i"}}, {"^(.*trīx)$", "3-def+", {"trix"}}, {"^(.*tor)$", "3-def+", {"tor", "abl_i_e", "-abl_e_i"}}, {"^(.*tor)$", "3-def+", {"tor"}}, -- Detect -ēs as 3-1 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like quadripēs, volucripēs). -- Essentially, for declension-3 adjectives, we require that -- .pl is given if the lemma is plural. -- -- Most 3-1 adjectives are i-stem (e.g. audāx) so we require -I -- to be given with non-i-stem adjectives. The first entry below -- will apply when -I isn't given, the second when it is given. {"^(.*ēs)$", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"I"}}, {"^(.*ēs)$", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"^(.*ēs)$", "3-1+", {"par"}}, {"^(.*[ij])ōrēs$", "3-C+", {"pl"}}, {"^(min)ōrēs$", "3-C+", {"pl"}}, -- If .pl with -ēs, we don't know if the adjective is 3-1, 3-2 -- or 3-3. Since 3-2 is probably the most common, we infer it -- (as well as the fact that these adjectives *are* in a sense -- 3-2 since they have a distinct neuter in -(i)a. Note that -- we have two entries here; the first one will apply unless -- -I is given, and will infer an i-stem adjective; the second -- one will apply otherwise (and infer a non-i-stem 3-1 adjective). {"ēs", "3-2+", {"pl", "I"}, base_as_stem2}, {"ēs", "3-1+", {"pl", "par"}, base_as_stem2}, -- Same for neuters. {"ia", "3-2+", {"pl", "I"}, base_as_stem2}, {"a", "3-1+", {"pl", "par"}, base_as_stem2}, -- As above for -ēs but for miscellaneous singulars. {"", "3-1+", {"I", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"I"}}, {"", "3-1+", {"par", "abl_i_e", "-abl_e_i"}}, {"", "3-1+", {"par"}}, } local function get_subtypes_and_endings(typ, f) local subtypes_and_endings = {} for _, v in ipairs(decl3_entries) do if f(v) then v = deep_copy(v) v[2] = typ insert(subtypes_and_endings, v) end end return subtypes_and_endings end local function compare(spec) return spec[2] == typ end if typ == "+" then local base, new_stem2, rettype, new_subtypes = get_adj_type_and_subtype_by_ending(lemma, stem2, nil, subtypes, decl12_entries, decl12_stem2) if rettype then return base, new_stem2, rettype, new_subtypes else return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) end elseif typ == "3+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl3_entries, decl3_stem2) elseif typ == "1&2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, decl12_entries, decl12_stem2) elseif typ == "1-1+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"a", typ, {}}, {"ae", typ, {"pl"}}, }) elseif typ == "2-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"us", typ, {}}, {"um", typ, {}}, {"ī", typ, {"pl"}}, {"a", typ, {"pl"}}, {"os", typ, {"greek"}}, {"on", typ, {"greek"}}, {"oe", typ, {"greek", "pl"}}, }) elseif typ == "3-1+" then -- Use the specs from `decl3_entries`, but add the two i-stem 3-2+ specs when plural-only, as they're the same when 3-1+. local subtypes_and_endings = get_subtypes_and_endings(typ, function(spec) local spec1, spec2 = spec[1], spec[2] return spec2 == typ or (spec2 == "3-2+" and spec1 == "ēs" or spec1 == "ia") end) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-def+" then -- Like 3-1+ but defective in gender local subtypes_and_endings = get_subtypes_and_endings(typ, compare) insert(subtypes_and_endings, {"", typ, {"I"}}) insert(subtypes_and_endings, {"", typ, {"par"}}) return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, subtypes_and_endings, decl3_stem2) elseif typ == "3-2+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"is", typ, {}}, {"e", typ, {}}, -- Detect -ēs as 3-2 without auto-inferring .pl if .pl -- not specified. If we don't do this, the later entry for -- -ēs will auto-infer .pl whenever -ēs is specified (which -- won't work for adjectives like isoscelēs). Essentially, -- for declension-3 adjectives, we require that .pl is given -- if the lemma is plural. {"ēs", typ, {}}, {"ēs", typ, {"pl"}}, {"ia", typ, {"pl"}}, }, decl3_stem2) elseif typ == "3-3+" or typ == "3-P+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"ēs", typ, {"pl"}, base_as_stem2}, {"ia", typ, {"pl"}, base_as_stem2}, {"", typ, {}}, }, decl3_stem2) elseif typ == "3-C+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, get_subtypes_and_endings(typ, compare), decl3_stem2) elseif typ == "irreg+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"^(duo)$", typ, {"pl"}}, {"^(ambō)$", typ, {"pl"}}, {"^(mīll?ia)$", typ, {"N", "pl"}, constant_base("mīlle")}, -- match ea {"^(ea)$", typ, {}, constant_base("is")}, -- match id {"^(id)$", typ, {}, constant_base("is")}, -- match plural eī, iī {"^([ei]ī)$", typ, {"pl"}, constant_base("is")}, -- match plural ea, eae {"^(eae?)$", typ, {"pl"}, constant_base("is")}, -- match eadem {"^(eadem)$", typ, {}, constant_base("īdem")}, -- match īdem, idem {"^([īi]dem)$", typ, {}, constant_base("īdem")}, -- match plural īdem {"^(īdem)$", typ, {"pl"}}, -- match plural eadem, eaedem {"^(eae?dem)$", typ, {"pl"}, constant_base("īdem")}, -- match illa, ipsa, ista; it doesn't matter if we overmatch because -- we'll get an error as we use the stem itself in the returned base {"^(i[lps][lst])a$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match illud, istud; as above, it doesn't matter if we overmatch {"^(i[ls][lt])ud$", typ, {}, function(base, stem2) return base .. "e", nil end}, -- match ipsum {"^(ipsum)$", typ, {}, constant_base("ipse")}, -- match plural illī, ipsī, istī; as above, it doesn't matter if we -- overmatch {"^(i[lps][lst])ī$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- match plural illa, illae, ipsa, ipsae, ista, istae; as above, it -- doesn't matter if we overmatch {"^(i[lps][lst])ae?$", typ, {"pl"}, function(base, stem2) return base .. "e", nil end}, -- Detect quī as non-plural unless .pl specified. {"^(quī)$", typ, {}}, -- Otherwise detect quī as plural. {"^(quī)$", typ, {"pl"}}, -- Same for quae. {"^(quae)$", typ, {}, constant_base("quī")}, {"^(quae)$", typ, {"pl"}, constant_base("quī")}, {"^(quid)$", typ, {}, constant_base("quis")}, {"^(quod)$", typ, {}, constant_base("quī")}, {"^(qui[cd]quid)$", typ, {}, constant_base("quisquis")}, {"^(quīquī)$", typ, {"pl"}, constant_base("quisquis")}, {"^(quaequae)$", typ, {"pl"}, constant_base("quisquis")}, -- match all remaining lemmas in lemma form {"", typ, {}}, }) elseif typ == "indecl+" then return get_adj_type_and_subtype_by_ending(lemma, stem2, typ, subtypes, { {"", typ, {"both"}}, {"", typ, {"sg"}}, {"", typ, {"pl"}}, }) else -- 0+ return lemma, nil, typ, {} end end local noun_lb = { nom_sg = "sg.", gen_sg = "sg.", dat_sg = "sg.", acc_sg = "sg.", abl_sg = "sg.", voc_sg = "sg.", loc_sg = "sg.", nom_pl = "pl.", gen_pl = "pl.", dat_pl = "pl.", acc_pl = "pl.", abl_pl = "pl.", voc_pl = "pl.", loc_pl = "pl." } function export.sust(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de = "num"}, ["nota"] = {}, } for form,_ in pairs(noun_lb) do params[form] = {lista=true} end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local genero local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, detected_subtypes = detect_noun_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end if not genero then if types.M then genero = "m" end if types.N then genero = "n" end if types.F then genero = "f" end end local es_adj if not r1 and genero then local typ r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) if r1 then c = typ es_adj = true end end assert(r1, "forma no reconocida: "..r[1]) local cb = es_adj and adj_decl[c] or noun_decl[c] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) if es_adj then local forms_ = {} for form,arr in pairs(data.forms) do local f1, f2 = form:match("^(.*)(_"..genero..")$") if f1 then forms_[f1] = arr end end data.forms = forms_ end if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, noun_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if declinfo["loc_sg"] and #declinfo["loc_sg"] == 0 then declinfo["loc_sg"] = nil end if declinfo["loc_pl"] and #declinfo["loc_pl"] == 0 then declinfo["loc_pl"] = nil end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local forms = sobreescribir_formas(declinfo, args, false, {}) comprobar_defectivo(forms, {}) forms = desactivar_formas(forms, function (form) return (form:find("pl$") and nopl) or (form:find("sg$") and nosg) end ) local raiz_nom = f(forms["nom_sg"][1] or forms["nom_pl"][1] or "?") local raiz_gen = f(forms["gen_sg"][1] or forms["gen_pl"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, noun_lb) local t = {} insert(t, {{""}, {"Singular"}, {"Plural"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg"], forms["nom_pl"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg"], forms["gen_pl"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg"], forms["dat_pl"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg"], forms["acc_pl"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg"], forms["abl_pl"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg"], forms["voc_pl"]}) if (forms["loc_sg"] and forms["loc_sg"][1]) or (forms["loc_pl"] and forms["loc_pl"][1]) then insert(t, {{"Locativo", header=true, color=COLOR_H}, forms["loc_sg"], forms["loc_pl"]}) end insert(t, {{args["nota"] or "", colspan=3}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_nom..", "..raiz_gen.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local adj_lb = { nom_sg_m = "m.", nom_sg_n = "n.", nom_sg_f = "f.", nom_pl_m = "m.", nom_pl_n = "n.", nom_pl_f = "f.", gen_sg_m = "m.", gen_sg_n = "n.", gen_sg_f = "f.", gen_pl_m = "m.", gen_pl_n = "n.", gen_pl_f = "f.", dat_sg_m = "m.", dat_sg_n = "n.", dat_sg_f = "f.", dat_pl_m = "m.", dat_pl_n = "n.", dat_pl_f = "f.", acc_sg_m = "m.", acc_sg_n = "n.", acc_sg_f = "f.", acc_pl_m = "m.", acc_pl_n = "n.", acc_pl_f = "f.", abl_sg_m = "m.", abl_sg_n = "n.", abl_sg_f = "f.", abl_pl_m = "m.", abl_pl_n = "n.", abl_pl_f = "f.", voc_sg_m = "m.", voc_sg_n = "n.", voc_sg_f = "f.", voc_pl_m = "m.", voc_pl_n = "n.", voc_pl_f = "f.", } function export.adj(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {requerido=true}, ["alt"] = {}, ["num"] = {por_defecto = ""}, ["núm"] = {alias_de="num"}, ["gen"] = {por_defecto="mfn"}, ["nota"] = {}, } for form,_ in pairs(adj_lb) do params[form] = {lista=true} end params["dat_pl"] = {lista=true} params["abl_pl"] = {lista=true} params["loc_pl"] = {lista=true} local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) if args["dat_pl"][1] then args["dat_pl_m"] = deep_copy(args["dat_pl"]) args["dat_pl_n"] = deep_copy(args["dat_pl"]) args["dat_pl_f"] = deep_copy(args["dat_pl"]) end if args["abl_pl"][1] then args["abl_pl_m"] = deep_copy(args["abl_pl"]) args["abl_pl_n"] = deep_copy(args["abl_pl"]) args["abl_pl_f"] = deep_copy(args["abl_pl"]) end if args["loc_pl"][1] then args["loc_pl_m"] = deep_copy(args["loc_pl"]) args["loc_pl_n"] = deep_copy(args["loc_pl"]) args["loc_pl_f"] = deep_copy(args["loc_pl"]) end args["dat_pl"] = nil args["abl_pl"] = nil args["loc_pl"] = nil assert(not find(title, " "), "locuciones no soportadas aún") -- REVISAR local tpalabras = {} for _,p in ipairs(args) do p = match(p, "^(.-);") or p local a, b = match(p, "^(.-)%.(.*)$") assert(b, "error en especificaciones de palabra") local r1 = match(a, "^([^/]+)/") if not r1 then r1 = a end if r1 == "idem" or r1 == "īdem" then -- REVISAR: parche para idem que internamente lo declina como si fuera "i" insert(tpalabras, "ī") else insert(tpalabras, r1) end end local palabras, separadores = separar_palabras(title, concat(tpalabras, "-")) local M = 1 local declinfo local titles = {} local cats = {} local nosg, nopl = true, true for _,arg in ipairs(args) do local formas = {} for subarg in gsplit(arg, ";") do local types = {} local a, b = match(subarg, "^(.-)%.(.*)$") a = a or subarg b = b or "+" local c, d = match(b, "^(.-)%.(.*)$") if d then for spec in gsplit(d, "%.") do spec = gsub(spec, "(.)%-", "%1_") types[spec] = true end end c = c or b local r = split(a, "/") local r1, r2, typ, detected_subtypes = detect_adj_type_and_subtype(r[1], r[2], c, types) for _, subtype in ipairs(detected_subtypes) do if types["-" .. subtype] then -- if a "cancel subtype" spec is given, remove the cancel spec -- and don't apply the subtype types["-" .. subtype] = nil elseif (subtype == "M" or subtype == "F" or subtype == "N") and (types.M or types.F or types.N) then -- if gender already specified, don't create conflicting gender spec elseif (subtype == "sg" or subtype == "pl" or subtype == "both") and (types.sg or types.pl or types.both) then -- if number restriction already specified, don't create conflicting -- number restriction spec else types[subtype] = true end end local cb = adj_decl[typ] assert(cb, "Especifique el tipo de sustantivo correcto en el primer parámetro") local data = {forms={}, types=types, pos="", subtitles="", notes="", categories=cats, title=titles, loc=types.loc, num=args.num} cb(data, {r1, r2}) local formas_ = {} -- necesario crear otro arreglo para no modificar las claves durante la iteración for form,arr in pairs(data.forms) do local pref = match(form, "^(.*)_m$") if pref and not data.forms[pref.."_f"] then formas_[pref.."_f"] = deep_copy(arr) end if pref and not data.forms[pref.."_n"] then formas_[pref.."_n"] = deep_copy(arr) end formas_[form] = arr end data.forms = formas_ if not types.sg then nopl = false end if not types.pl then nosg = false end if types.sg then for key,_ in pairs(data.forms) do if key:find("_pl") then data.forms[key] = {} end end end if types.pl then for key,_ in pairs(data.forms) do if key:find("_sg") then data.forms[key] = {} end end end merge_forms(formas, data.forms, adj_lb) end if not declinfo then declinfo = formas else declinfo = combinar_copulativa(declinfo, formas, separadores[M]) M = M + 1 end end if nosg == false then nosg = find(args["num"], "p") end if nopl == false then nopl = find(args["num"], "s") end local m = find(args["gen"], "m") local fem = find(args["gen"], "f") local n = find(args["gen"], "n") local forms = sobreescribir_formas(declinfo, args, false, {}, adj_lb) comprobar_defectivo(forms) forms = desactivar_formas(forms, function (form) return (form:find("pl") and nopl) or (form:find("sg") and nosg) or (form:find("m$") and not m) or (form:find("f$") and not fem) or (form:find("n$") and not n) end ) local raiz_m = f(forms["nom_sg_m"][1] or forms["nom_pl_m"][1] or "?") local raiz_f = f(forms["nom_sg_f"][1] or forms["nom_pl_f"][1] or "?") local raiz_n = f(forms["nom_sg_n"][1] or forms["nom_pl_n"][1] or "?") forms = agregar_enlaces(forms, title, normalizar_enlace) forms = formatear_formas(forms, adj_lb) local t = {} insert(t, {{"Singular", colspan=4}, header=true, color=COLOR_H}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_sg_m"], forms["nom_sg_f"], forms["nom_sg_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_sg_m"], forms["gen_sg_f"], forms["gen_sg_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_sg_m"], forms["dat_sg_f"], forms["dat_sg_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_sg_m"], forms["acc_sg_f"], forms["acc_sg_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_sg_m"], forms["abl_sg_f"], forms["abl_sg_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_sg_m"], forms["voc_sg_f"], forms["voc_sg_n"]}) insert(t, {{"Plural", colspan=4, header=true, color=COLOR_H}}) insert(t, {{""}, {"Masculino"}, {"Femenino"}, {"Neutro"}, header=true, color=COLOR_H, class="pc"}) insert(t, {{"Nominativo", header=true, color=COLOR_H}, forms["nom_pl_m"], forms["nom_pl_f"], forms["nom_pl_n"]}) insert(t, {{"Genitivo", header=true, color=COLOR_H}, forms["gen_pl_m"], forms["gen_pl_f"], forms["gen_pl_n"]}) insert(t, {{"Dativo", header=true, color=COLOR_H}, forms["dat_pl_m"], forms["dat_pl_f"], forms["dat_pl_n"]}) insert(t, {{"Acusativo", header=true, color=COLOR_H}, forms["acc_pl_m"], forms["acc_pl_f"], forms["acc_pl_n"]}) insert(t, {{"Ablativo", header=true, color=COLOR_H}, forms["abl_pl_m"], forms["abl_pl_f"], forms["abl_pl_n"]}) insert(t, {{"Vocativo", header=true, color=COLOR_H}, forms["voc_pl_m"], forms["voc_pl_f"], forms["voc_pl_n"]}) insert(t, {{args["nota"] or "", colspan=4}}) return renderizar_tabla( frame, "'''Declinación de ''"..raiz_m..", "..raiz_f..", "..raiz_n.."'''''&emsp;&emsp;tipo: "..concat(titles, ", "), t, ns == 0 and cats or {} ) end local EGO, TU, IS, NOS, VOS, EI = 1, 2, 3, 4, 5, 6 local tostr = {"1", "2", "3", "4", "5", "6"} local PRONOMBRES = {"ego", "tū", "is, ea, id", "nōs", "vōs", "eī, eae, ea"} local PRONOMBRES_SUBJ = {"ut ego", "ut tū", "ut is, ut ea, ut id", "ut nōs", "ut vōs", "ut eī, ut eae, ut ea"} local PRONOMBRES_IMP = {"―", "(tū)", "(is, ea, id)", "―", "(vōs)", "(eī, eae, ea)"} local IMPERSONALES = {"", "", "(id)", "", "", ""} local function obtener_pronombre(forma, impers) local conj, p = match(forma, "^(.*)(%d)$") if not p then return nil end p = tonumber(p) if impers then return IMPERSONALES[p] else if find(conj, "^subj") then return PRONOMBRES_SUBJ[p] end if find(conj, "^imper") then return PRONOMBRES_IMP[p] end return PRONOMBRES[p] end end local sufijos = { ["1"] = { inf_act = {"āre","isse"}, inf_pas = {"ārī"}, part_act = {"āns","ūrus"}, part_pas = {"andus","us"}, ger = {"andī","andō","andum"}, sup = {"um","ū"}, ind_pres = {"ō","ās","at","āmus","ātis","ant"}, ind_imp = {"ābam","ābās","ābat","ābāmus","ābātis","ābant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ābō","ābis","ābit","ābimus","ābitis","ābunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","āris","ātur","āmur","āminī","antur", nil,"āre"}, ind_imp_pas = {"ābar","ābāris","ābātur","ābāmur","ābāminī","ābantur", nil,"ābāre"}, ind_fut_pas = {"ābor","āberis","ābitur","ābimur","ābiminī","ābuntur", nil,"ābere"}, subj_pres = {"em","ēs","et","ēmus","ētis","ent"}, subj_imp = {"ārem","ārēs","āret","ārēmus","ārētis","ārent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"er","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_imp_pas = {"ārer","ārēris","ārētur","ārēmur","ārēminī","ārentur", nil,"ārēre"}, imper_pres = {nil,"ā",nil,nil,"āte",nil}, imper_fut = {nil,"ātō","ātō",nil,"ātōte","antō"}, imper_pres_pas = {nil,"āre",nil,nil,"āminī",nil}, imper_fut_pas = {nil,"ātor","ātor",nil,nil,"antor"}, }, ["2"] = { inf_act = {"ēre","isse"}, inf_pas = {"ērī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"eō","ēs","et","ēmus","ētis","ent"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"ēbō","ēbis","ēbit","ēbimus","ēbitis","ēbunt"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"eor","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ēbor","ēberis","ēbitur","ēbimur","ēbiminī","ēbuntur", nil,"ēbere"}, subj_pres = {"eam","eās","eat","eāmus","eātis","eant"}, subj_imp = {"ērem","ērēs","ēret","ērēmus","ērētis","ērent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ear","eāris","eātur","eāmur","eāminī","eantur", nil,"eāre"}, subj_imp_pas = {"ērer","ērēris","ērētur","ērēmur","ērēminī","ērentur", nil,"ērēre"}, imper_pres = {nil,"ē",nil,nil,"ēte",nil}, imper_fut = {nil,"ētō","ētō",nil,"ētōte","entō"}, imper_pres_pas = {nil,"ēre",nil,nil,"ēminī",nil}, imper_fut_pas = {nil,"ētor","ētor",nil,nil,"entor"}, }, ["3"] = { -- 3 (comparar [[capio]] con [[lego]], las raíces con capi- y leg- pero hay que eliminar la doble ii) inf_act = {"ere","isse"}, inf_pas = {"ī"}, part_act = {"ēns","ūrus"}, part_pas = {"endus","us"}, ger = {"endī","endō","endum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt"}, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", nil,"ere"}, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", nil,"ēbāre"}, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", nil,"ēre"}, subj_pres = {"am","ās","at","āmus","ātis","ant"}, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", nil,"āre"}, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", nil,"erēre"}, imper_pres = {nil,"e",nil,nil,"ite",nil}, imper_fut = {nil,"itō","itō",nil,"itōte","untō"}, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil}, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor"}, }, ["3/4"] = { inf_act = {"ere","isse","īre","isse"}, inf_pas = {"ī","īrī"}, part_act = {"ēns","iēns","ūrus"}, part_pas = {"endus","iendus","us"}, ger = {"endī","endō","endum","iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"ō","is","it","imus","itis","unt", "iō","īs",nil,"īmus","ītis","iunt" }, ind_imp = {"ēbam","ēbās","ēbat","ēbāmus","ēbātis","ēbant", "iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant" }, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"am","ēs","ēt","ēmus","ētis","ent", "iam","iēs","iet","iēmus","iētis","ient" }, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"or","eris","itur","imur","iminī","untur", "ior","ere","ītur","īmur","īminī","iuntur", nil,"īris",nil,nil,nil,nil, nil,"īre" }, ind_imp_pas = {"ēbar","ēbāris","ēbātur","ēbāmur","ēbāminī","ēbantur", "iēbar","ēbāre","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāris",nil,nil,nil,nil, nil,"iēbāre" }, ind_fut_pas = {"ar","ēris","ētur","ēmur","ēminī","entur", "iar","ēre","iētur","iēmur","iēminī","ientur", nil,"iēris",nil,nil,nil,nil, nil,"iēre" }, subj_pres = {"am","ās","at","āmus","ātis","ant", "iam","iās","iat","iāmus","iātis","iant", }, subj_imp = {"erem","erēs","eret","erēmus","erētis","erent", "īrem","īrēs","īret","īrēmus","īrētis","īrent" }, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"ar","āris","ātur","āmur","āminī","antur", "iar","āre","iātur","iāmur","iāminī","iantur", nil,"iāris",nil,nil,nil,nil, nil,"iāre" }, subj_imp_pas = {"erer","erēris","erētur","erēmur","erēminī","erentur", "īrer","erēre","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēris",nil,nil,nil,nil, nil,"īrēre" }, imper_pres = {nil,"e",nil,nil,"ite",nil, nil,"ī",nil,nil,"īte",nil }, imper_fut = {nil,"itō","itō",nil,"itōte","untō", nil,"ītō","ītō",nil,"ītōte","iuntō" }, imper_pres_pas = {nil,"ere",nil,nil,"iminī",nil, nil,"īre",nil,nil,"īminī",nil }, imper_fut_pas = {nil,"itor","itor",nil,nil,"untor", nil,"ītor","ītor",nil,nil,"iuntor" }, }, ["4"] = { inf_act = {"īre","isse"}, inf_pas = {"īrī"}, part_act = {"iēns","ūrus"}, part_pas = {"iendus","us"}, ger = {"iendī","iendō","iendum"}, sup = {"um","ū"}, ind_pres = {"iō","īs","it","īmus","ītis","iunt"}, ind_imp = {"iēbam","iēbās","iēbat","iēbāmus","iēbātis","iēbant"}, ind_perf = {"ī","istī","it","imus","istis","ērunt", nil,nil,nil,nil,nil,"ēre"}, ind_pluperf = {"eram","erās","erat","erāmus","erātis","erant"}, ind_fut = {"iam","iēs","iet","iēmus","iētis","ient"}, ind_fut_perf = {"erō","eris","erit","erimus","eritis","erint"}, ind_fut_sig = {"ō","is","it","imus","itis","int"}, ind_pres_pas = {"ior","īris","ītur","īmur","īminī","iuntur", nil,"īre"}, ind_imp_pas = {"iēbar","iēbāris","iēbātur","iēbāmur","iēbāminī","iēbantur", nil,"iēbāre"}, ind_fut_pas = {"iar","iēris","iētur","iēmur","iēminī","ientur", nil,"iēre"}, subj_pres = {"iam","iās","iat","iāmus","iātis","iant"}, subj_imp = {"īrem","īrēs","īret","īrēmus","īrētis","īrent"}, subj_perf = {"erim","erīs","erit","erīmus","erītis","erint"}, subj_pluperf = {"issem","issēs","isset","issēmus","issētis","issent"}, subj_aor_sig = {"im","īs","īt","īmus","ītis","int"}, subj_pres_pas = {"iar","iāris","iātur","iāmur","iāminī","iantur", nil,"iāre"}, subj_imp_pas = {"īrer","īrēris","īrētur","īrēmur","īrēminī","īrentur", nil,"īrēre"}, imper_pres = {nil,"ī",nil,nil,"īte",nil}, imper_fut = {nil,"ītō","ītō",nil,"ītōte","iuntō"}, imper_pres_pas = {nil,"īre",nil,nil,"īminī",nil}, imper_fut_pas = {nil,"ītor","ītor",nil,nil,"iuntor"}, } } local formas_no_personales = { inf_act = true, inf_pas = true, part_act = true, part_pas = true, ger = true, sup = true, } local formas_personales = { ind_pres = true, ind_imp = true, ind_perf = true, ind_pluperf = true, ind_fut = true, ind_fut_perf = true, ind_fut_sig = true, ind_pres_pas = true, ind_imp_pas = true, ind_fut_pas = true, subj_pres = true, subj_imp = true, subj_perf = true, subj_pluperf = true, subj_aor_sig = true, subj_pres_pas = true, subj_imp_pas = true, imper_pres = true, imper_fut = true, imper_pres_pas = true, imper_fut_pas = true, } local formas = merge(formas_no_personales, formas_personales) local verbos_irregulares = { {"aiō", {"aiō", "aiiō", "aijō", "ajō"}, { desactivar = {"inf_pas","part_pas","ger","sup","ind_pluperf","ind_fut","ind_fut_perf", "ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_perf","subj_pluperf","subj_pres_pas", "subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {"ai"}, nucleoperf = {"a"}, nucleosup = {}, nucleosigm = {}, inf_act = {"aiere"}, ind_pres = {nil,nil,nil,{}}, ind_perf = {{},nil,nil,{},{}}, subj_pres = {nil,nil,nil,{},{}}, subj_imp = {{},{},nil,{},{},{}}, imper_pres = {{},{"ai"},{},{},{},{}}, }}, {"cedo", {"cedo"}, { desactivar = {"inf_act","inf_pas","part_act","part_pas","ger","sup","ind_pluperf","ind_pres","ind_imp","ind_perf", "ind_fut","ind_fut_perf","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres","subj_imp","subj_perf", "subj_pluperf","subj_pres_pas","subj_imp_pas","imper_fut","imper_pres_pas","imper_fut_pas" }, conj = "3", nucleopres = {}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, imper_pres = {nil,{"cedo"},nil,nil,{"cette","cedile"},nil}, }}, {"edō", {"edō", "ëdō"}, { conj = "3", nucleopres = {"ed"}, nucleoperf = {"ēd"}, nucleosup = {""}, nucleosigm = {}, desactivar = {}, inf_act = {"edere","ēsse"}, part_act = {"edēns","ēsūrus","ēssūrus","ēstūrus"}, part_pas = {"edendus","edundus","ēsus","ēssus","ēstus"}, sup = {"ēsum","ēssum","ēstum","ēsū","ēssū","ēstū"}, ind_pres = {nil,{"edis","ēs"},{"edit","ēst"},nil,{"editis","ēstis"},nil}, ind_pres_pas = {nil,{"ederis","edere","ēssis","ēsse"},{"editur","ēstur"}}, subj_pres = {{"edam","edim"},{"edās","edīs"},{"edat","edit","ēst"},{"edāmus","edīmus"},{"edātis","edītis"},{"edant","edint"}}, subj_imp = {{"ederem","ēssem"},{"ederēs","ēssēs"},{"ederet","ēsset"},{"ederēmus","ēssēmus"},{"ederētis","ēssētis"},{"ederent","ēssent"}}, subj_imp_pas = {{"ederer","ēsser"},{"ederēris","ederēre","ēssēris","ēssēre"},{"ederetur","ēssetur"},{"ederēmur","ēssēmur"},{"ederēminī","ēssēminī"},{"ederentur","ēssentur"}}, imper_pres = {nil,{"ede","ēs"},nil,nil,{"edite","ēste"},nil}, imper_fut = {nil,{"editō","ēstō"},{"editō","ēstō"},nil,{"editōte","ēstōte"},{"eduntō"}}, imper_pres_pas = {nil,{"edere","ēsse"},nil,nil,{"ediminī"},nil}, imper_fut_pas = {nil,{"editor","ēstor"},{"editor","ēstor"},nil,nil,{"eduntor"}}, }}, {"dīcō", {"dīcō"}, { conj = "3", nucleopres = {"dīc"}, nucleoperf = {"dīx"}, nucleosup = {"dict"}, nucleosigm = {"dīx"}, desactivar = {}, part_pas = {"dīcendus", "dīcundus", "dictus"}, imper_pres = {nil, {"dīc", "dīce"}}, inf_pas = {"dīcī", "dīcier{L}"}, }}, {"dō", {"dō"}, { conj = "1", nucleopres = {"d"}, nucleoperf = {"ded"}, nucleosup = {"dat"}, nucleosigm = {}, desactivar = {}, inf_act = {"dare","dedisse"}, inf_pas = {"darī"}, ind_pres = {nil,nil,nil,{"damus"},{"datis"},nil}, ind_imp = {{"dabam"},{"dabās"},{"dabat"},{"dabāmus"},{"dabātis"},{"dabant"}}, ind_fut = {{"dabō"},{"dabis"},{"dabit"},{"dabimus"},{"dabitis"},{"dabunt"}}, ind_imp_pas = {{"dabar"},{"dabāris","dabāre"},{"dabātur"},{"dabāmur"},{"dabāminī"},{"dabantur"}}, ind_fut_pas = {{"dabor"},{"daberis","dabere"},{"dabitur"},{"dabimur"},{"dabiminī"},{"dabuntur"}}, subj_imp = {{"darem"},{"darēs"},{"daret"},{"darēmus"},{"darētis"},{"darent"}}, subj_imp_pas = {{"darer"},{"darēris","darēre"},{"darētur"},{"darēmur"},{"darēminī"},{"darentur"}}, imper_pres = {nil,nil,nil,nil,{"date"},nil}, imper_fut = {nil,{"datō"},{"datō"},nil,{"datōte"},{"dantō"}}, imper_pres_pas = {nil,{"dare"},nil,nil,{"daminī"},nil}, imper_fut_pas = {nil,{"dator"},{"dator"},nil,nil,{"dator"}}, }}, {"dūcō", {"dūcō"}, { conj = "3", nucleopres = {"dūc"}, nucleoperf = {"dūx"}, nucleosup = {"duct"}, nucleosigm = {}, desactivar = {}, imper_pres = {nil, {"dūc", "dūce"}}, }}, {"eō", {"eō", "ëō"}, { conj = "4", nucleopres = {""}, nucleoperf = {""}, nucleosup = {""}, nucleosigm = {}, desactivar = {"imper_pres_pas"}, inf_act = {"īre","īsse","iisse","īvisse"}, inf_pas = {"īrī","īrier"}, part_act = {"iēns","itūrus"}, part_pas = {"eundum","itum"}, ger = {"eundī","eundō","eundum"}, sup = {"itum","itū"}, ind_pres = {{"eō"},{"īs"},{"it"},{"īmus"},{"ītis"},{"eunt"}}, ind_imp = {{"ībam"},{"ībās"},{"ībat"},{"ībāmus"},{"ībātis"},{"ībant"}}, ind_perf = {{"iī","īvī"},{"īstī","iistī","īvistī"},{"iit","īvit"},{"iimus","īvimus"},{"īstis","iistis","īvistis"},{"iērunt","iēre","īvērunt","īvēre"}}, ind_pluperf = {{"ieram","īveram"},{"ierās","īverās"},{"ierat","īverat"},{"ierāmus","īverāmus"},{"ierātis","īverātis"},{"ierant","īverant"}}, ind_fut = {{"ībō"},{"ībis"},{"ībit"},{"ībimus"},{"ībitis"},{"ībunt"}}, ind_fut_perf = {{"ierō","īverō"},{"ieris","īveris"},{"ierit","īverit"},{"ierimus","īverimus"},{"ieritis","īveritis"},{"ierint","īverint"}}, ind_fut_sig = {nil,nil,nil,nil,nil,nil}, ind_pres_pas = {{},{},{"ītur"},{},{},{}}, ind_imp_pas = {{},{},{"ībātur"},{},{},{}}, ind_fut_pas = {{},{},{"ībitur"},{},{},{}}, subj_pres = {{"eam"},{"eās"},{"eat"},{"eāmus"},{"eātis"},{"eant"}}, subj_imp = {{"īrem"},{"īrēs"},{"īret"},{"īrēmus"},{"īrētis"},{"īrent"}}, subj_perf = {{"ierim","īverim"},{"ierīs","īverīs"},{"ierit","īverit"},{"ierīmus","īverīmus"},{"ierītis","īverītis"},{"ierint","īverint"}}, subj_pluperf = {{"īssem","iissem","īvissem"},{"īssēs","iissēs","īvissēs"},{"īsset","iisset","īvisset"},{"īssēmus","iissēmus","īvissēmus"},{"īssētis","iissētis","īvissētis"},{"īssent","iissent","īvissent"}}, subj_aor_sig = {nil,nil,nil,nil,nil,nil}, subj_pres_pas = {{},{},{"eātur"},{},{},{}}, subj_imp_pas = {{},{},{"īrētur"},{},{},{}}, imper_pres = {nil,nil,nil,nil,nil,nil}, imper_fut = {nil,nil,nil,nil,nil,{"euntō"}}, imper_fut_pas = {nil,{},nil,nil,nil,{}}, }}, {"faciō", {"faciō"}, { conj = "3", I = true, inf_act = {"facere", "fāre{L}", "fēcisse"}, inf_pas = {"fierī"}, part_pas = {"faciendus", "faciundus", "factus"}, nucleopres = {"fac"}, nucleoperf = {"fēc"}, nucleosup = {"fact"}, nucleosigm = {"fax","faxs","facs"}, desactivar = {}, ind_pres_pas = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, ind_imp_pas = {{"fīēbam"},{"fīēbās"},{"fīēbat"},{"fīēbāmus"},{"fīēbātis"},{"fīēbant"}}, ind_fut_pas = {{"fīam"},{"fīēs"},{"fīet"},{"fīēmus"},{"fīētis"},{"fīent"}}, subj_pres_pas = {{"fīam"},{"fīās"},{"fīat"},{"fīāmus"},{"fīātis"},{"fīant"}}, subj_imp_pas = {{"fierem"},{"fierēs"},{"fieret"},{"fierēmus"},{"fierētis"},{"fierent"}}, imper_pres = {nil,{"fac","face"},nil,nil,nil,nil}, imper_pres_pas = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut_pas = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"ferō", {"ferō"}, { conj = "3", nucleopres = {"fer"}, nucleoperf = {"tul", "tetul{†}"}, nucleosup = {"lāt"}, nucleosigm = {}, desactivar = {}, inf_act = {"ferre", "tulisse", "tetulisse{†}"}, inf_pas = {"ferrī"}, ind_pres = {nil,{"fers"},{"fert"},nil,{"fertis"}}, ind_pres_pas = {nil,{"ferris","ferre"}}, subj_imp = {{"ferrem"},{"ferrēs"},{"ferret"},{"ferrēmus"},{"ferrētis"},{"ferrent"}}, subj_imp_pas = {{"ferrer"},{"ferrēris","ferrēre"},{"ferrētur"},{"ferrēmur"},{"ferrēminī"},{"ferrentur"}}, imper_pres = {nil,{"fer"},nil,nil,{"ferte"},nil}, imper_pres_pas = {nil,{"ferre"},nil,nil,nil,nil}, imper_fut = {nil,{"fertō"},{"fertō"},nil,{"fertōte"},{"feruntō"}}, imper_fut_pas = {nil,{"fertor"},{"fertor"},nil,nil,nil}, }}, {"fīō", {"fīō"}, { conj = "3", nucleopres = {"fī"}, nucleoperf = {}, nucleosup = {"fact"}, nucleosigm = {}, semidep = true, desactivar = {}, inf_act = {"fierī"}, ind_pres = {{"fīō"},{"fīs"},{"fit"},{"fīmus"},{"fītis"},{"fīunt"}}, imper_pres = {nil,{"fī"},nil,nil,{"fīte"},nil}, imper_fut = {nil,{"fītō"},{"fītō"},nil,{"fītōte"},{"fīuntō"}}, }}, {"inquam", {"inquam"}, { conj = "3", I = true, nucleopres = {"inqu"}, nucleoperf = {}, nucleosup = {}, nucleosigm = {}, nopasivo = true, desactivar = {"inf_act","inf_pas","part_pas","ger"}, ind_pres = {{"inquam"}}, }}, {"possum", {"possum"}, { conj = "3", nucleopres = {"pot"}, nucleoperf = {"pot"}, nucleosup = {}, nucleosigm = {}, pres = "possō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"posse","potesse{†}"}, part_act = {"potēns"}, ind_pres = {{"possum"},{"potes"},{"potest"},{"possumus"},{"potestis"},{"possunt"}}, ind_imp = {{"poteram"},{"poterās"},{"poterat"},{"poterāmus"},{"poterātis"},{"poterant"}}, ind_fut = {{"poterō"},{"poteris","potere"},{"poterit"},{"poterimus"},{"poteritis"},{"poterunt"}}, ind_perf = {{"potuī"},{"potuistī"},{"potuit"},{"potuimus"},{"potuistis"},{"potuērunt","potuēre"}}, ind_pluperf = {{"potueram"},{"potuerās"},{"potuerat"},{"potuerāmus"},{"potuerātis"},{"potuerant"}}, ind_fut_perf = {{"potuerō"},{"potueris"},{"potuerit"},{"potuerimus"},{"potueritis"},{"potuerunt"}}, subj_pres = {{"possem"},{"possēs"},{"possēt"},{"possēmus"},{"possētis"},{"possent"}}, subj_imp = {{"possim"},{"possīs"},{"possit"},{"possīmus"},{"possītis"},{"possint"}}, subj_perf = {{"potuerim"},{"potuerīs"},{"potuerit"},{"potuerīmus"},{"potuerītis"},{"potuerint"}}, subj_pluperf = {{"potuissem"},{"potuissēs"},{"potuisset"},{"potuissēmus"},{"potuissētis"},{"potuissent"}}, }}, {"sum", {"sum"}, { conj = "3", nucleopres = {"s"}, nucleoperf = {"fu"}, nucleosup = {}, nucleosigm = {}, pres = "sō", desactivar = {"inf_pas","part_pas","ger","sup","ind_pres_pas","ind_imp_pas","ind_fut_pas", "subj_pres_pas","subj_imp_pas","imper_pres_pas","imper_fut_pas"}, inf_act = {"esse"}, part_act = {"futūrus"}, ind_pres = {{"sum"},{"es"},{"est"},{"sumus"},{"estis"},{"sunt"}}, ind_imp = {{"eram"},{"erās"},{"erat"},{"erāmus"},{"erātis"},{"erant"}}, ind_fut = {{"erō"},{"eris","ere"},{"erit"},{"erimus"},{"eritis"},{"erunt"}}, subj_pres = {{"sim","siem","fuam{†}"},{"sīs","siēs","fuās{†}"},{"sit","siet","fuat{†}"},{"sīmus","siēmus","fuāmus{†}"},{"sītis","siētis","fuātis{†}"},{"sint","sient","fuant{†}"}}, subj_imp = {{"essem","forem"},{"essēs","forēs"},{"esset","foret"},{"essēmus","forēmus"},{"essētis","forētis"},{"essent","forent"}}, imper_pres = {nil,{"es"},nil,nil,{"este"},nil}, imper_fut = {nil,{"estō"},{"estō"},nil,{"estōte"},nil}, }}, {"mālō", {"mālō"}, { conj = "3", nucleopres = {"māl"}, nucleoperf = {"mālu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"mālle","māluisse"}, ind_pres = {{"mālō"},{"māvīs"},{"māvult"},{"mālumus"},{"māvultis"},{"mālunt"}}, subj_pres = {{"mālim"},{"mālīs"},{"mālit"},{"mālīmus"},{"mālītis"},{"mālint"}}, subj_imp = {{"māllem"},{"māllēs"},{"māllet"},{"māllēmus"},{"māllētis"},{"māllent"}}, }}, {"nōlō", {"nōlō"}, { conj = "3", nucleopres = {"nōl"}, nucleoperf = {"nōlu"}, nucleosup = {}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"nōlle","nōluisse"}, ind_pres = {{"nōlō"},{"nōn vīs","nevīs{†}"},{"nōn vult","nōn volt","nevolt{†}"},{"nōlumus"},{"nōn vultis","nōn voltis","nōltis{†}"},{"nōlunt"}}, subj_pres = {{"nōlim"},{"nōlīs"},{"nōlit"},{"nōlīmus"},{"nōlītis"},{"nōlint"}}, subj_imp = {{"nōllem"},{"nōllēs"},{"nōllet"},{"nōllēmus"},{"nōllētis"},{"nōllent"}}, }}, {"volō", {"volō"}, { conj = "3", nucleopres = {"vol"}, nucleoperf = {"volu"}, nucleosup = {"volit"}, nucleosigm = {}, desactivar = {"sup","ger","inf_pas","part_pas","ind_pres_pas","ind_imp_pas","ind_fut_pas","subj_pres_pas","subj_imp_pas", "imper_pres","imper_fut","imper_pres_pas","imper_fut_pas"}, inf_act = {"velle","voluisse"}, ind_pres = {{"volō"},{"vīs"},{"vult","volt{†}"},{"volumus"},{"vultis","voltis{†}"},{"volunt"}}, subj_pres = {{"velim","volim{†}"},{"velīs","volīs{†}"},{"velit","volit{†}"},{"velīmus","volīmus{†}"},{"velītis","volītis{†}"},{"velint","volint{†}"}}, subj_imp = {{"vellem"},{"vellēs"},{"vellet"},{"vellēmus"},{"vellētis"},{"vellent"}}, }}, } local function combinar_prefijo_nucleosufijo(prefijo, nucleosufijo) return prefijo..nucleosufijo end local function combinar_nucleo_sufijo(nucleo, sufijo, agregar_i) if agregar_i and (not find(sufijo, "^[iī]")) and (sufijo ~= "e") and (not find(sufijo, "^er")) then return nucleo.."~i~"..sufijo end return nucleo..sufijo end local function agregar_forma(conjugado, conjinfo, forma) conjinfo[forma] = conjinfo[forma] or {} local sufijos_ = sufijos[conjinfo.conj][forma] local nucleos local prefijo if forma == "sup" then nucleos = conjinfo.nucleosup prefijo = conjinfo.prefijosup or conjinfo.prefijo elseif find(forma, "sig") then nucleos = conjinfo.nucleosigm prefijo = conjinfo.prefijosigm or conjinfo.prefijo elseif find(forma, "perf") then nucleos = conjinfo.nucleoperf prefijo = conjinfo.prefijoperf or conjinfo.prefijo else nucleos = conjinfo.nucleopres prefijo = conjinfo.prefijo end if formas_no_personales[forma] then if conjinfo[forma][1] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma]) do insert_if_not(conjugado[forma], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else for _, sufijo in ipairs(sufijos_) do local nucleos_ = nucleos if forma == "inf_act" and sufijo == "isse" then nucleos_ = conjinfo.nucleoperf elseif forma == "part_act" and sufijo == "ūrus" then nucleos_ = conjinfo.nucleosup elseif forma == "part_pas" and sufijo == "us" then nucleos_ = conjinfo.nucleosup end local agregar_i = conjinfo.I and nucleos_ == conjinfo.nucleopres for _,nucleo in ipairs(nucleos_) do insert_if_not(conjugado[forma], combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(nucleo, sufijo, agregar_i))) end end end return end for i = EGO, EI do local p = tostr[i] if conjinfo[forma][i] then if nucleos and #nucleos > 0 then for _, fm in ipairs(conjinfo[forma][i]) do insert_if_not(conjugado[forma..p], "#"..combinar_prefijo_nucleosufijo(prefijo, fm).."#") end end else local k = i while sufijos_[k] do local agregar_i = conjinfo.I and nucleos == conjinfo.nucleopres for j, n in ipairs(nucleos) do local x = combinar_prefijo_nucleosufijo(prefijo, combinar_nucleo_sufijo(n, sufijos_[k], agregar_i)) if conjinfo.always_sync_perf and (forma == "ind_perf" or forma == "ind_pluperf" or forma == "ind_fut_perf" or forma == "subj_perf" or forma == "subj_pluperf") then x = x:gsub("īvī", "iī") x = x:gsub("īvi", "ī") x = x:gsub("īve", "ī") x = x:gsub("īvē", "ē") end insert_if_not(conjugado[forma..p], x) end k = k + 6 end end end end local function get_subtype_by_ending(pres, conjinfo, specs) for _, spec in ipairs(specs) do local base = extract_base(pres, spec[1]) if base then for _,s in ipairs(spec[2]) do if conjinfo[s] == nil then conjinfo[s] = true end end return base end end error("Unrecognized ending for conjugation " .. conjinfo["conj"]) end local function detect_v_type_and_subtypes(conjinfo) local pres = conjinfo["v"] local conj_arg = conjinfo["conj"] pres = toNFC(pres) local base_conj_arg, auto_perf_supine = conj_arg:match("^([124]/?4?)(%+%+?)$") if base_conj_arg then if auto_perf_supine == "++" and base_conj_arg ~= "4" then error("Conjugation types 1++ and 2++ not allowed") end conj_arg = base_conj_arg end conjinfo.conj = conj_arg if conj_arg == "1" then local base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"at", {"impers"}}, {"ātur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "āv" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "āt" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "āss" end end elseif conj_arg == "2" then local base = get_subtype_by_ending(pres, conjinfo, { {"eō", {}}, {"eor", {"dep"}}, {"et", {"impers"}}, {"ētur", {"dep", "impers"}}, {"ī", {"nopres"}}, {"it", {"nopres", "impers"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if auto_perf_supine then if not conjinfo["nucleoperf"][1] then conjinfo["nucleoperf"][1] = base .. "u" end if not conjinfo["nucleosup"][1] then conjinfo["nucleosup"][1] = base .. "it" end end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3" then local base if conjinfo.I == false then -- si explícitamente se indicó que no es del tipo -io, hay que excluir sufijos base = get_subtype_by_ending(pres, conjinfo, { {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) else base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, {"ō", {}}, {"or", {"dep"}}, {"it", {"impers"}}, {"itur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) end if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end assert(conjinfo["nucleoperf"][1], "especifique todos los núcleos para verbos de la tercera conjugación") assert(conjinfo["nucleosup"][1], "especifique todos los núcleos para verbos de la tercera conjugación") if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "ēss" end end elseif conj_arg == "3/4" then local base base = get_subtype_by_ending(pres, conjinfo, { {"iō", {"I"}}, {"ior", {"dep", "I"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "4" then local base = get_subtype_by_ending(pres, conjinfo, { {"iō", {}}, {"ior", {"dep"}}, {"it", {"impers"}}, {"ītur", {"dep", "impers"}}, {"ī", {"nopres"}}, }) if not conjinfo["nucleopres"][1] then conjinfo["nucleopres"][1] = base end if not conjinfo["nucleoperf"][1] and conjinfo["nopres"] then conjinfo["nucleoperf"][1] = base end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "++" then conjinfo["nucleoperf"][1] = base .. "īv" conjinfo["nucleoperf"][2] = base .. "i" end if not conjinfo["nucleoperf"][1] and auto_perf_supine == "+" then conjinfo["nucleoperf"][1] = base .. "īv" end if not conjinfo["nucleosup"][1] and auto_perf_supine then conjinfo["nucleosup"][1] = base .. "īt" end if conjinfo.sigm then if not conjinfo["nucleosigm"][1] then conjinfo["nucleosigm"][1] = base .. "īss" end end elseif conj_arg == "irreg" then for _,p in ipairs(verbos_irregulares) do for _,rx in ipairs(p[2]) do local pref, verb = match(conjinfo.v, "^(.*)("..rx..")$") if verb then conjinfo.v = verb conjinfo.prefijo = pref if conjinfo.nucleoperf[1] and conjinfo.nucleoperf[1] ~= "-" then -- [[ecfero]] conjinfo.prefijoperf = conjinfo.nucleoperf[1] conjinfo.nucleoperf = {} end if conjinfo.nucleosup[1] and conjinfo.nucleosup[1] ~= "-" then conjinfo.prefijosup = conjinfo.nucleosup[1] conjinfo.nucleosup = {} end if conjinfo.nucleosigm[1] and conjinfo.nucleosigm[1] ~= "-" then conjinfo.prefijosigm = conjinfo.nucleosigm[1] conjinfo.nucleosigm = {} end conjinfo.irreg = true conjinfo.conj = p[3].conj for k,val in pairs(p[3]) do if not conjinfo[k] or (type(conjinfo[k]) == "table" and not conjinfo[k][1]) then conjinfo[k] = deep_copy(val) end end return conjinfo end end end error("Unrecognized conjugation '" .. conj_arg .. "'") else error("Unrecognized conjugation '" .. conj_arg .. "'") end return conjinfo end function export.v(frame) local title_ = mw.title.getCurrentTitle() local tit = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { [1] = {alias_de = "conj"}, [2] = {alias_de = "pres"}, [3] = {alias_de = "nucleoperf"}, [4] = {alias_de = "nucleosup"}, [5] = {alias_de = "nucleosigm"}, ["impers"] = {}, -- pas para formas pasivas solamente ["impersonal"] = {alias_de = "impers"}, ["dep"] = {tipo="bool"}, ["depon"] = {alias_de="dep"}, ["deponente"] = {alias_de="dep"}, ["semidep"] = {tipo="bool"}, ["semidepon"] = {alias_de="semidep"}, ["semideponente"] = {alias_de="semidep"}, ["sigm"] = {tipo="bool"}, ["nopasivo"] = {tipo="bool"}, ["soloperf"] = {tipo="bool"}, ["I"] = {tipo="bool"}, ["p3inf"] = {tipo="bool"}, -- sin uso ["poet_sync_perf"] = {tipo="bool"}, -- sin uso ["always_sync_perf"] = {tipo="bool"}, -- solo en [[saevio]] ["conj"] = {requerido=true}, ["pres"] = {requerido=true}, ["nucleopres"] = {lista = true}, ["nucleoperf"] = {lista = true}, ["nucleosup"] = {lista = true}, ["nucleosigm"] = {lista = true}, ["núcleopres"] = {alias_de="nucleopres"}, ["núcleoperf"] = {alias_de="nucleoperf"}, ["núcleosup"] = {alias_de="nucleosup"}, ["paradigma"] = {lista = true}, ["desactivarnucleos"] = {tipo="bool", por_defecto=true}, -- para [[-o]] ["nota"] = {}, } local conjugado = {} for forma,_ in pairs(formas_no_personales) do params[forma] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma] = {} end for forma,_ in pairs(formas_personales) do for i,s in ipairs(tostr) do params[forma..s] = {tipo=parsear_arreglo, por_defecto={}} conjugado[forma..s] = {} if i == 1 then params[forma] = {alias_de=forma..s} end end end local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) assert(not find(tit, " "), "locuciones no soportadas aún") assert(not (args["dep"] and args["semidep"]), "un verbo no puede ser deponente y semideponente a la vez") local conjinfo = { conj = args.conj, prefijo="", v=args.pres, desactivar = {}, dep=args.dep, semidep=args.semidep, sigm=args.sigm, impers=args.impers, nopasivo=args.nopasivo, soloperf=args.soloperf, I=args.I, p3inf=args.p3inf, poet_sync_perf=args.poet_sync_perf, -- sin uso always_sync_perf=args.always_sync_perf, nucleopres = deep_copy(args.nucleopres), nucleoperf = deep_copy(args.nucleoperf), nucleosup = deep_copy(args.nucleosup), nucleosigm = deep_copy(args.nucleosigm) } conjinfo = detect_v_type_and_subtypes(conjinfo) if conjinfo.impers == true then conjinfo.impers = "3" end -- no puede ir conjinfo acá abajo porque si es un sufijo va a quedar "-" en la raíz, lo que anularía todas las formas conjugadas, tiene que venir directo de args if args.desactivarnucleos then if args.nucleopres[1] == "-" then conjinfo.nucleopres = {} end if args.nucleoperf[1] == "-" then conjinfo.nucleoperf = {} end if args.nucleosup[1] == "-" then conjinfo.nucleosup = {} end if args.nucleosigm[1] == "-" then conjinfo.nucleosigm = {} end end local es_irregular = conjinfo.irreg for _,d in ipairs(conjinfo.desactivar) do if formas_no_personales[d] then args[d] = {"no"} else args[d.."2"] = {"no"} end end for forma,_ in pairs(formas) do agregar_forma(conjugado, conjinfo, forma) end local resultante = sobreescribir_formas(conjugado, args) local mostrar_fut_sig = #resultante["ind_fut_sig1"] > 0 local mostrar_aor_sig = #resultante["subj_aor_sig1"] > 0 local defectivo = comprobar_defectivo(resultante, {"^imper", "_sig"}, tostr) local defect2 resultante, defect2 = desactivar_formas(resultante, function (form) return (conjinfo.nopasivo and form:find("_pas")) or (conjinfo.soloperf and not form:find("perf")) or (conjinfo.impers == "pas" and form:find("_pas[^3]")) or (conjinfo.impers == "pas3" and form:find("_pas[^3]")) or (conjinfo.impers == "pas36" and form:find("_pas[^36]")) end ) if defect2 then defectivo = true end -- por ahora innecesario -- local part_no_adj = {} -- for _,e in ipairs(resultante.part) do -- if (find(e, 'PART') or not find(e, 'ADJ')) and not find(e, "†") then -- insert(part_no_adj, gsub1(e, '%b{}', '')) -- end -- end local tit_pres = f(resultante["ind_pres1"][1] or "―") local tit_inf = f(resultante["inf_act"][1] or "―") local tit_perf = f(resultante["ind_perf1"][1] or "―") local tit_sup = f(resultante["sup"][1] or "―") resultante = agregar_enlaces(resultante, tit, normalizar_enlace) local es_impersonal = conjinfo.impers resultante = formatear_formas(resultante, function (x) return obtener_pronombre(x, es_impersonal) end) local impers = conjinfo.impers local cs, cs1, cs2, fila_pronombres_ind, fila_pronombres_subj, fila_pronombres_imper, mostrar_imper if impers == "3" then fila_pronombres_ind = {"", "(id)", color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", "(quod id)", color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", "(id)", color=COLOR_IMPER, header=true, class="pc"} cs = 2 elseif impers == "36" then error("no soportado actualmente") cs = 3 else fila_pronombres_ind = {"", PRONOMBRES[1], PRONOMBRES[2], PRONOMBRES[3], PRONOMBRES[4], PRONOMBRES[5], PRONOMBRES[6], color=COLOR_IND, header=true, class="pc"} fila_pronombres_subj = {"", PRONOMBRES_SUBJ[1], PRONOMBRES_SUBJ[2], PRONOMBRES_SUBJ[3], PRONOMBRES_SUBJ[4], PRONOMBRES_SUBJ[5], PRONOMBRES_SUBJ[6], color=COLOR_SUBJ, header=true, class="pc"} fila_pronombres_imper = {"", PRONOMBRES_IMP[1], PRONOMBRES_IMP[2], PRONOMBRES_IMP[3], PRONOMBRES_IMP[4], PRONOMBRES_IMP[5], PRONOMBRES_IMP[6], color=COLOR_IMPER, header=true, class="pc"} cs = 7 mostrar_imper = true end cs1 = cs -- math.floor(cs / 2) -- cs2 = cs - cs1 local t = {} insert(t, {{"Formas no personales (verboides)", colspan=cs}, color=COLOR_H, header=true}) if impers == "3" then insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else resultante.inf_act.colspan = cs1-1 resultante.inf_pas.colspan = cs1-1 resultante.part_act.colspan = cs1-1 resultante.part_pas.colspan = cs1-1 resultante.ger.colspan = cs1-1 resultante.sup.colspan = cs1-1 if conjinfo.dep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) elseif conjinfo.semidep then insert(t, {{"Infinitivo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Participio", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) else insert(t, {{"Infinitivo activo", header=true, color=COLOR_NP}, resultante.inf_act}) insert(t, {{"Infinitivo pasivo", header=true, color=COLOR_NP}, resultante.inf_pas}) insert(t, {{"Participio activo", header=true, color=COLOR_NP}, resultante.part_act}) insert(t, {{"Participio pasivo", header=true, color=COLOR_NP}, resultante.part_pas}) insert(t, {{"Gerundio", header=true, color=COLOR_NP}, resultante.ger}) insert(t, {{"Supino", header=true, color=COLOR_NP}, resultante.sup}) end end local function ic(tiempo) if impers == "3" then return resultante[tiempo.."3"] elseif impers == "36" then return resultante[tiempo.."3"], resultante[tiempo.."6"] end return resultante[tiempo.."1"], resultante[tiempo.."2"], resultante[tiempo.."3"], resultante[tiempo.."4"], resultante[tiempo.."5"], resultante[tiempo.."6"] end insert(t, {{"Formas personales", colspan=cs}, color=COLOR_H, header=true}) insert(t, {{"Modo indicativo", colspan=cs}, color=COLOR_IND, header=true}) insert(t, fila_pronombres_ind) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end else insert(t, {{"Presente", color=COLOR_IND, header=true}, ic("ind_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_IND, header=true}, ic("ind_imp")}) insert(t, {{"Futuro", color=COLOR_IND, header=true}, ic("ind_fut")}) insert(t, {{"Pretérito perfecto", color=COLOR_IND, header=true}, ic("ind_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_IND, header=true}, ic("ind_pluperf")}) insert(t, {{"Futuro perfecto", color=COLOR_IND, header=true}, ic("ind_fut_perf")}) if mostrar_fut_sig then insert(t, {{f("Futuro sigmático{†}"), color=COLOR_IND, header=true}, ic("ind_fut_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_IND, header=true}, ic("ind_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_IND, header=true}, ic("ind_imp_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IND, header=true}, ic("ind_fut_pas")}) end insert(t, {{"Modo subjuntivo", colspan=cs}, color=COLOR_SUBJ, header=true}) insert(t, fila_pronombres_subj) if conjinfo.dep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end else insert(t, {{"Presente", color=COLOR_SUBJ, header=true}, ic("subj_pres")}) insert(t, {{"Pretérito imperfecto", color=COLOR_SUBJ, header=true}, ic("subj_imp")}) insert(t, {{"Pretérito perfecto", color=COLOR_SUBJ, header=true}, ic("subj_perf")}) insert(t, {{"Pretérito pluscuamperfecto", color=COLOR_SUBJ, header=true}, ic("subj_pluperf")}) if mostrar_aor_sig then insert(t, {{f("Aorista sigmático{†}"), color=COLOR_SUBJ, header=true}, ic("subj_aor_sig")}) end insert(t, {{"Presente pasivo", color=COLOR_SUBJ, header=true}, ic("subj_pres_pas")}) insert(t, {{"Pretérito imperfecto pasivo", color=COLOR_SUBJ, header=true}, ic("subj_imp_pas")}) end insert(t, {{"Modo imperativo", colspan=cs}, color=COLOR_IMPER, header=true}) insert(t, fila_pronombres_imper) if mostrar_imper then if conjinfo.dep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) elseif conjinfo.semidep then insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) else insert(t, {{"Presente", color=COLOR_IMPER, header=true}, ic("imper_pres")}) insert(t, {{"Futuro", color=COLOR_IMPER, header=true}, ic("imper_fut")}) insert(t, {{"Presente pasivo", color=COLOR_IMPER, header=true}, ic("imper_pres_pas")}) insert(t, {{"Futuro pasivo", color=COLOR_IMPER, header=true}, ic("imper_fut_pas")}) end else insert(t, {{"Como verbo "..(impers == "3" and "impersonal" or "terciopersonal")..", ''"..tit.."'' CARECE de imperativo", color=COLOR_IMPER, header=true, colspan=cs}}) end insert(t, {{f("Leyenda: † arcaico, x no normativo, ~■~ cambio ortográfico, #■# irregularidad"), colspan=cs}}) args["nota"] = args["nota"] or "" if conjinfo.impers == "utc3" then args["nota"] = args["nota"].." NOTA: se usa también como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "umc3" then args["nota"] = args["nota"].." NOTA: se usa más como impersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular." end if conjinfo.impers == "utc36" then args["nota"] = args["nota"].." NOTA: se usa también como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "umc36" then args["nota"] = args["nota"].." NOTA: se usa más como terciopersonal, en cuyo caso solo son válidas las conjugaciones de la tercera persona singular y plural." end if conjinfo.impers == "pas" or conjinfo.imeprs == "pas3" then args["nota"] = args["nota"].." NOTA: impersonal para las formas pasivas" end if conjinfo.impers == "pas36" then args["nota"] = args["nota"].." NOTA: formas pasivas terciopersonales (solamente tercera persona singular y plural)" end if conjinfo.soloperf then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas del perfecto y pluscuamperfecto con valor de presente, imperfecto o futuro" end if conjinfo.nopasivo then args["nota"] = args["nota"].. " NOTA: solo se emplean las formas activas" end insert(t, {{args["nota"] and args["nota"] or "", colspan=cs}}) local cats = {} local subtits = {} local conj_str if conjinfo.conj == "1" then conj_str = "primera conjugación" elseif conjinfo.conj == "2" then conj_str = "segunda conjugación" elseif conjinfo.conj == "3" then conj_str = "tercera conjugación" elseif conjinfo.conj == "3/4" then conj_str = "tercera/cuarta conjugación" else conj_str = "cuarta conjugación" end insert(cats, "LA:Verbos de la "..conj_str) insert(subtits, conj_str) impers = impers or "" if impers == "3" or find(impers, "^u[tm]c3$") then insert(subtits, "impersonal") insert(cats, "LA:Verbos impersonales") end if defectivo then insert(subtits, "defectivo") insert(cats, "LA:Verbos defectivos") end if conjinfo.dep then insert(subtits, "deponente") insert(cats, "LA:Verbos deponentes") end if conjinfo.semidep then insert(subtits, "semideponente") insert(cats, "LA:Verbos semideponentes") end if es_irregular then insert(subtits, "irregular") insert(cats, "LA:Verbos irregulares") else insert(subtits, "regular") insert(cats, "LA:Verbos regulares") end return renderizar_tabla( frame, "'''Conjugación de ''"..tit_pres..", "..tit_inf..", "..tit_perf..", "..tit_sup.."'''''&emsp;&emsp;("..concat(subtits, ", ")..")", t, ns == 0 and cats or {}) end function export.adv(frame) local title_ = mw.title.getCurrentTitle() local title = title_.fullText local ns = title_.namespace if ns ~= 0 then return "Use esta plantilla en el espacio principal." end local params = { ["n"] = {}, ["nota"] = {alias_de = "n"}, ["comp"] = {lista = true}, ["comparativo"] = {alias_de = "comp"}, ["compnota"] = {lista = true}, ["sup"] = {lista = true}, ["superlativo"] = {alias_de = "sup"}, ["supnota"] = {lista = true}, } local parent_frame = frame:getParent() local args = require("Módulo:parámetros").obtener_parametros(parent_frame.args, params) local head = args[1] local modo = args[2] local enc local cats = {} local cat_pref = "LA:Adverbios" if modo == "-" then enc = "sin comparativo ni superlativo" insert(cats, cat_pref.." incomparables") return renderizar_encabezado( frame, head, enc, args["n"], {}, ns == 0 and cats or {}, normalizar_enlace ) end local flex = {comp={},sup={}} local stem for _, suff in ipairs{"iter", "nter", "ter", "er", "iē", "ē", "rā", "im", "ō"} do stem = match(head, "^(.*)" .. suff .. "$") if stem ~= nil then local comp_suff, sup_suff = "ius", "issimē" if suff == "nter" then stem = stem .. "nt" end if suff == "rā" then comp_suff = "er" .. comp_suff sup_suff = "imē" end insert(flex.comp, stem .. comp_suff) insert(flex.sup, stem .. sup_suff) break end end if not stem and not args.comp[1] and not args.sup[1] then error("Unrecognized adverb type, recognized types are “-ē”, “-er”, “-ter”, “-iter”, “-im”, or “-ō”, “-ra” or specify irregular forms or “-” if incomparable.") end local formas, irr = sobreescribir_formas(flex, args) if args["comp"][1] == "no" then enc = "sin comparativo" insert(cats, cat_pref.." sin comparativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) elseif args["sup"][1] == "no" then enc = "sin superlativo" insert(cats, cat_pref.." sin superlativo") return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end if irr then enc = f("#irregular#") insert(cats, cat_pref.." irregulares") end return renderizar_encabezado( frame, head, enc, args["n"], {{"comparativo", formas.comp, args["compnota"]}, {"superlativo", formas.sup, args["supnota"]}}, ns == 0 and cats or {}, normalizar_enlace ) end return export kfipttp38zpka9y6njlg8cnny0r05e4 caballo de Troya 0 1061252 6123453 5920853 2026-07-24T17:52:39Z ~2026-34597-22 183061 6123453 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|metafórico}}. En referencia al [[w:caballo de Troya|caballo gigante de madera]] en donde se escondieron los aqueos para infiltrarse en la ciudad enemiga en la Guerra de Troya. ==== {{locución|es|sustantivo|masculino}} ==== {{es.sust|cop=n}} ;1: {{plm|estrategia}}, [[ardid]] o [[artimaña]] para [[infiltrar]]se en algo sin que se note. ;2 {{csem|informática}}: Programa informático malicioso, que el usuario incauto introduce en su ordenador, creyéndolo un juego inofensivo o un programa de alguna utilidad. {{sinónimo|troyano}} ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} <!-- formato: {{t|idioma|t1=(traducción1)|t2=(traducción2|...(hay más opciones))}} p. ej. {{t|fr|t1=chose|a1=1|g1=f}} (ver más ejemplos en Plantilla:t/doc) --> {{trad-abajo}} <!-- si va a insertar una nueva sección de etimología o de idioma, por favor, hágalo ↑ arriba ↑ de esta línea. NO BORRE LO QUE ESTÁ DEBAJO, GRACIAS. --> == Referencias y notas == <references /> nm680l3cgfvp546gv233d2sp2isy21w 6123454 6123453 2026-07-24T17:57:24Z ~2026-34597-22 183061 imagen 6123454 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología === [[File:La Destruction de Troye la Grant, translatée de latin en françois et mise par personnages. Cy sensuit lystoire de la des, LDUT397(1).jpg|thumb|el caballo de Troya]] {{etimología|metafórico}}. En referencia al [[w:caballo de Troya|caballo gigante de madera]] en donde se escondieron los aqueos para infiltrarse en la ciudad enemiga en la Guerra de Troya. ==== {{locución|es|sustantivo|masculino}} ==== {{es.sust|cop=n}} ;1: {{plm|estrategia}}, [[ardid]] o [[artimaña]] para [[infiltrar]]se en algo sin que se note. ;2 {{csem|informática}}: Programa informático malicioso, que el usuario incauto introduce en su ordenador, creyéndolo un juego inofensivo o un programa de alguna utilidad. {{sinónimo|troyano}} ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} <!-- formato: {{t|idioma|t1=(traducción1)|t2=(traducción2|...(hay más opciones))}} p. ej. {{t|fr|t1=chose|a1=1|g1=f}} (ver más ejemplos en Plantilla:t/doc) --> {{trad-abajo}} <!-- si va a insertar una nueva sección de etimología o de idioma, por favor, hágalo ↑ arriba ↑ de esta línea. NO BORRE LO QUE ESTÁ DEBAJO, GRACIAS. --> == Referencias y notas == <references /> aliy0oyh395kst3gfjrtybz9x5uchd1 minusvalía 0 1061837 6123499 5936046 2026-07-25T00:31:33Z Tmagc 158167 6123499 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|prefijo|minus|valía}}. ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1: {{plm|detrimento}} o pérdida de valor. ;2: La condición de estar con una discapacidad o desventaja. ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> dyj3ecs2u7st78b86bmk1exf5m4dt6q cururú 0 1064354 6123569 6118529 2026-07-25T10:43:46Z André Koehne 5272 /* Traducciones */ + 6123569 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|gn|kururu}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|anfibios}}: {{taxón|Rhinella diptycha|Rhinella schneideri}} Especie de sapo grande nativo del litoral argentino. {{sinónimo|sapo buey|sapo gigante}} ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{t|de|t1=Aga-Kröte|t2=Riesenkröte}} {{t|fr|t1=crapaud-buffle}} {{t|en|t1=cane toad|t2=marine toad}} {{t|pt|t1=cururu|t2=sapo-jururu}} {{trad-abajo}} == Referencias y notas == <references /> nvk2pexeaza6xadfl7msxxmisz7jdys inte- 0 1065310 6123461 6122031 2026-07-24T19:47:48Z CarpetanoComplutense 161160 6123461 wikitext text/x-wiki == {{lengua|xib}} == {{pron-graf|leng=xib}} === Etimología === {{etimología|leng=xib|incierta}}, pero probablemente relacionado con el vasco ''[[indar]]'' ('fuerza'). ==== {{raíz|xib}} ==== {{xib.esc|inte}} ;1: Formante de antropónimos bimembres.<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 246 | obs = Sagunto 16, Siles: 1985, nº 1038, M.L.H. F.11.7, lápida.}}</ref> ==== Información adicional ==== {{derivad|leng=xib|Intebeleś}} == Referencias y notas == <references /> 8vie84jsb55bafzmt9jzv62kj6f6m85 6123462 6123461 2026-07-24T19:58:05Z CarpetanoComplutense 161160 Se ha deshecho la revisión [[Special:Diff/6123461|6123461]] de [[Special:Contributions/CarpetanoComplutense|CarpetanoComplutense]] ([[User talk:CarpetanoComplutense|disc.]]) 6123462 wikitext text/x-wiki == {{lengua|xib}} == {{pron-graf|leng=xib}} === Etimología === {{etimología|leng=xib|incierta}}, pero probablemente relacionado con el vasco ''[[indar]]'' ('fuerza'). ==== {{prefijo|xib}} ==== {{xib.esc|inte}} ;1: Formante de antropónimos bimembres.<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 246 | obs = Sagunto 16, Siles: 1985, nº 1038, M.L.H. F.11.7, lápida.}}</ref> ==== Información adicional ==== {{derivad|leng=xib|Intebeleś}} == Referencias y notas == <references /> l5tslgwtanvshlm0ibkv6gykn9h5zte realismo mágico 0 1065373 6123460 6123289 2026-07-24T19:32:06Z ~2026-36517-83 183232 /* Locución sustantiva masculina */ 6123460 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología2|Término usado por el crítico de arte alemán Franz Roh, para describir una pintura que demostraba una realidad alterada}}. ==== {{locución sustantiva|es|masculina}} ==== ;1 {{csem|literatura|pintura}}: Movimiento artístico en el que se presentan situaciones [[onírica]]s o [[surrealista]]s que los personajes que las viven aceptan como si fueran comunes. ==== Véase también ==== {{W}} ==== Traducciones ==== {{trad-arriba}} <!-- formato: {{t|idioma|t1=(traducción1)|t2=(traducción2|...(hay más opciones))}} p. ej. {{t|fr|t1=chose|a1=1|g1=f}} (ver más ejemplos en Plantilla:t/doc) --> {{trad-abajo}} <!-- si va a insertar una nueva sección de etimología o de idioma, por favor, hágalo ↑ arriba ↑ de esta línea. NO BORRE LO QUE ESTÁ DEBAJO, GRACIAS. --> == Referencias y notas == <references /> 0oe14hx9xcpm5j9yt280sc2fzxewbvm reversible 0 1065404 6123471 6123361 2026-07-24T21:52:40Z Tmagc 158167 /* {{adjetivo|es}} */ 6123471 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf|v=revertible}} === Etimología === {{etimología|sufijo|reversa|ible}}. ==== {{adjetivo|es}} ==== {{es.adj}} ;1: Que se puede [[revertir]]. {{antónimo|irreversible}} ;2: Que puede volver al estado anterior. ;3 {{csem|derecho}}: Se dice de los bienes que pueden o deben volver a su antiguo dueño o a su [[causahabiente]]. ;4 {{csem|ropa}}: Dicho de una prenda de vestir: que puede usarse por el derecho o por el revés según convenga. ;5 {{csem|mecánica}}: Dícese de una transmisión que puede ponerse en movimiento actuando sobre uno cualquiera de los cuerpos enlazados por ella.<ref>{{DLE1925}}</ref> ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> 4cshu5ap98xybmbkntkv4zgdhwcqcwq neurológico 0 1065424 6123430 2026-07-24T15:39:53Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|confijo|neuro|lógico}}. ==== {{adjetivo|es}} ==== {{es.adj}} ;1: {{adjetivo de sustantivo|[[neurología]]|a la}}. ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references />» 6123430 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|confijo|neuro|lógico}}. ==== {{adjetivo|es}} ==== {{es.adj}} ;1: {{adjetivo de sustantivo|[[neurología]]|a la}}. ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> jcuxz19yr4c7aou3f5jng60rs4lqeh4 6123431 6123430 2026-07-24T15:40:10Z Tmagc 158167 /* Etimología */ 6123431 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|sufijo|neurología|ico}}. ==== {{adjetivo|es}} ==== {{es.adj}} ;1: {{adjetivo de sustantivo|[[neurología]]|a la}}. ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> 8b05gncdi5umt95rboh3dxpup2in7hp narcisista 0 1065425 6123432 2026-07-24T15:41:56Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|sufijo|narcisismo|ista}}. ==== {{adjetivo|es}} ==== {{es.adj}} ;1: {{adjetivo de sustantivo|narcisismo|al}}. ;2: Dicho de una persona: que practica el [[narcisismo]]. {{uso|utcs}} {{sinónimo|narciso|ninfo}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references />» 6123432 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|sufijo|narcisismo|ista}}. ==== {{adjetivo|es}} ==== {{es.adj}} ;1: {{adjetivo de sustantivo|narcisismo|al}}. ;2: Dicho de una persona: que practica el [[narcisismo]]. {{uso|utcs}} {{sinónimo|narciso|ninfo}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> dby1f4tl840gmurui8a51r52f6vs6su palomo 0 1065426 6123437 2026-07-24T15:48:33Z Tmagc 158167 Página creada con «{{desambiguación|Palomo}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|masculino|paloma}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|aves}}: Macho de la [[paloma]]. ;2 {{csem|aves}}: {{plm|paloma torcaz}}. ;3: {{plm|tonto}}. {{uso|anticuado}} {{ámbito|germanía}} ;4: {{plm|vendedor}} o [[propagandista]] muy hábil. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y not…» 6123437 wikitext text/x-wiki {{desambiguación|Palomo}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|masculino|paloma}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|aves}}: Macho de la [[paloma]]. ;2 {{csem|aves}}: {{plm|paloma torcaz}}. ;3: {{plm|tonto}}. {{uso|anticuado}} {{ámbito|germanía}} ;4: {{plm|vendedor}} o [[propagandista]] muy hábil. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> sjq8naj4o66uht7b5jdin4szhi9j544 6123438 6123437 2026-07-24T15:50:54Z Tmagc 158167 6123438 wikitext text/x-wiki {{desambiguación|Palomo}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|masculino|paloma}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|aves}}: Macho de la [[paloma]].<ref name=d>{{DLE1925}}</ref> ;2 {{csem|aves}}: {{plm|paloma torcaz}}.<ref name=d /> ;3: Hombre de poca inteligencia.<ref name=d /> {{uso|anticuado}} {{ámbito|germanía}} ;4: {{plm|Juan Palomo}}.<ref name=d /> ;5: Propagandista o muñidor muy diestro en estos oficios.<ref name=d /> ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> kxrs2xp81795qqgh2wh9mwdnagyzrxi paradeporte 0 1065427 6123443 2026-07-24T15:57:14Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|prefijo|para|deporte}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|deportes}}: Cualquiera de los deportes en los que compiten los [[discapacitado]]s. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references />» 6123443 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|prefijo|para|deporte}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|deportes}}: Cualquiera de los deportes en los que compiten los [[discapacitado]]s. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> kiu6xcsz5b14blhctrxa3nz6o11iq3m nado sincronizado 0 1065428 6123444 2026-07-24T15:59:05Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{locución|es|sustantiva|masculina}} ==== {{es.sust|s}} ;1 {{csem|deporte}}: {{plm|natación artística}}. == Referencias y notas == <references />» 6123444 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{locución|es|sustantiva|masculina}} ==== {{es.sust|s}} ;1 {{csem|deporte}}: {{plm|natación artística}}. == Referencias y notas == <references /> hwb4hwsgkcag9mf96oqwbbya7w8p9a0 natación artística 0 1065429 6123445 2026-07-24T15:59:49Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{locución|es|sustantiva|femenina}} ==== {{es.sust|s}} ;1 {{csem|deporte}}: Disciplina que combina natación, gimnasia y danza, consistente en nadadores que realizan una serie de acrobacias acuáticas al ritmo de la música. {{sinónimo|nado sincronizado|natación sincronizada}} ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} ==…» 6123445 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{locución|es|sustantiva|femenina}} ==== {{es.sust|s}} ;1 {{csem|deporte}}: Disciplina que combina natación, gimnasia y danza, consistente en nadadores que realizan una serie de acrobacias acuáticas al ritmo de la música. {{sinónimo|nado sincronizado|natación sincronizada}} ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> ng7f9e95apj0jvet1xreyevlct2td5s 6123446 6123445 2026-07-24T16:16:55Z ~2026-34597-22 183061 imagen 6123446 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{locución|es|sustantiva|femenina}} ==== {{es.sust|s}} [[File:Sync Group.jpg|thumb|[1]]] ;1 {{csem|deporte}}: Disciplina que combina [[natación]], [[gimnasia]] y [[danza]], consistente en [[nadador]]es que realizan una serie de [[acrobacia]]s [[acuático|acuáticas]] al [[ritmo]] de la [[música]]. {{sinónimo|nado sincronizado|natación sincronizada}} ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> h1sv1zabis9xtpz4yujtxl1y3ku4liq cicatricial 0 1065430 6123451 2026-07-24T17:12:13Z ~2026-34597-22 183061 Página creada con «== {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|sufijo|cicatriz|al}}. ==== {{adjetivo|es}} ==== {{es.adj|ng}} ;1: Relacionado con las [[cicatriz|cicatrices]]. ==== Traducciones ==== {{trad-arriba}} <!-- formato: {{t|idioma|t1=(traducción1)|t2=(traducción2|...(hay más opciones))}} p. ej. {{t|fr|t1=chose|a1=1|g1=f}} (ver más ejemplos en Plantilla:t/doc) --> {{trad-abajo}} <!-- si va a insertar una nueva sección de etimología o de idio…» 6123451 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|sufijo|cicatriz|al}}. ==== {{adjetivo|es}} ==== {{es.adj|ng}} ;1: Relacionado con las [[cicatriz|cicatrices]]. ==== Traducciones ==== {{trad-arriba}} <!-- formato: {{t|idioma|t1=(traducción1)|t2=(traducción2|...(hay más opciones))}} p. ej. {{t|fr|t1=chose|a1=1|g1=f}} (ver más ejemplos en Plantilla:t/doc) --> {{trad-abajo}} <!-- si va a insertar una nueva sección de etimología o de idioma, por favor, hágalo ↑ arriba ↑ de esta línea. NO BORRE LO QUE ESTÁ DEBAJO, GRACIAS. --> == Referencias y notas == <references /> 6liucz6wyas0ybs1dnma7g4ouq7ury5 circunferencial 0 1065431 6123452 2026-07-24T17:19:54Z ~2026-34597-22 183061 Página creada con «== {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|sufijo|circunferencia|al}}. ==== {{adjetivo|es}} ==== {{es.adj|ng}} ;1: Relacionado con la [[circunferencia]]. ==== Traducciones ==== {{trad-arriba}} <!-- formato: {{t|idioma|t1=(traducción1)|t2=(traducción2|...(hay más opciones))}} p. ej. {{t|fr|t1=chose|a1=1|g1=f}} (ver más ejemplos en Plantilla:t/doc) --> {{trad-abajo}} <!-- si va a insertar una nueva sección de etimología o de idio…» 6123452 wikitext text/x-wiki == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|sufijo|circunferencia|al}}. ==== {{adjetivo|es}} ==== {{es.adj|ng}} ;1: Relacionado con la [[circunferencia]]. ==== Traducciones ==== {{trad-arriba}} <!-- formato: {{t|idioma|t1=(traducción1)|t2=(traducción2|...(hay más opciones))}} p. ej. {{t|fr|t1=chose|a1=1|g1=f}} (ver más ejemplos en Plantilla:t/doc) --> {{trad-abajo}} <!-- si va a insertar una nueva sección de etimología o de idioma, por favor, hágalo ↑ arriba ↑ de esta línea. NO BORRE LO QUE ESTÁ DEBAJO, GRACIAS. --> == Referencias y notas == <references /> 7cz2gyp5jo60xu0jenhxzcleqnzaguw mañana o pasado 0 1065432 6123464 2026-07-24T20:16:00Z Charlyfar 7832 Página creada con «{{desambiguación|}}<!-- si hay términos que se diferencian de este solo en una tilde o diacrítico --> == {{lengua|es}} == {{pron-graf}} <!--- En el caso del español u otro idioma regular (consultar Plantilla:pron-graf), la plantilla se deja en blanco y la pronunciación se generará automáticamente. Si la palabra es irregular, use el parámetro |ayuda. Ejemplo: rally -> {{pron-graf|ayuda=ralí}}. Si el idioma es considerado irregular, como el inglés, especifique…» 6123464 wikitext text/x-wiki {{desambiguación|}}<!-- si hay términos que se diferencian de este solo en una tilde o diacrítico --> == {{lengua|es}} == {{pron-graf}} <!--- En el caso del español u otro idioma regular (consultar Plantilla:pron-graf), la plantilla se deja en blanco y la pronunciación se generará automáticamente. Si la palabra es irregular, use el parámetro |ayuda. Ejemplo: rally -> {{pron-graf|ayuda=ralí}}. Si el idioma es considerado irregular, como el inglés, especifique en la plantilla cada transcripción fonética manualmente. Adicionalmente se puede especificar si hay alguna transliteración, grafía alternativa, etc. --> === Etimología === {{etimología}}. <!-- Para una palabra de otro idioma, utilice {{etimología|(CÓDIGO DE IDIOMA)|(PALABRA)|(SIGNIFICADO)}}. Para elegir otra opción u otro tipo de etimología, consulte la página Plantilla:etimología --> ==== {{locución adverbial|es|de tiempo}} ==== <!-- definiciones: borrar todo lo que no sea necesario --> ;1: Se refiera a lo que le puede deparar el destino o el futuro a una persona. {{ámbito|Venezuela}} {{uso|coloquial}} {{ejemplo|De las decisiones que tomes hoy depende cómo te irá ''mañana o pasado''}} <!--;2: explicación de lo que significa otra acepción de la palabra, siempre y cuando la etimología y el tipo de palabra sea el mismo --> <!-- OBSERVACIÓN: si pertenece a uno o varios campos semánticos (ver Wikcionario:Lista de etiquetas), inclúyelo entre el número y los dos puntos, p. ej. ;1 {{csem|música}}: o ;1 {{csem|política|economía}} --> <!-- puedes incluir uno o más de los siguientes campos debajo de cada acepción. Ver indicaciones y otros en Wikcionario:Estructura --> <!--{{ámbito|<ÁMBITO 1>|<ÁMBITO2>}} (zonas donde se entiende o usa esta acepción, como un regionalismo) (ver Wikcionario:Lista de etiquetas) --> <!--{{uso|}}(coloquial, obsoleto, malsonante, etc. (ver Wikcionario:Lista de etiquetas)--> <!--{{sinónimo|<SINÓNIMO 1>|<SINÓNIMO 2>}}--> <!--{{relacionado|<1>|<2>}}--> <!--{{ejemplo|<oración, con la palabra del lema en ''cursiva''>|... (cita de la fuente, si la hay: vea Plantilla:ejemplo)}}--> <!-- enlace al artículo de Wikipedia con el mismo título que esta página (agréguelo sólo si es relevante) ==== Véase también ==== {{w}} --> ==== Traducciones ==== {{trad-arriba}} <!-- formato: {{t|idioma|t1=(traducción1)|t2=(traducción2|...(hay más opciones))}} p. ej. {{t|fr|t1=chose|a1=1|g1=f}} (ver más ejemplos en Plantilla:t/doc) --> {{trad-abajo}} <!-- si va a insertar una nueva sección de etimología o de idioma, por favor, hágalo ↑ arriba ↑ de esta línea. NO BORRE LO QUE ESTÁ DEBAJO, GRACIAS. --> == Referencias y notas == <references /> bnhrndbazirhi4uo4vnkfcfpkzjs063 Alosoŕtin 0 1065433 6123467 2026-07-24T21:23:35Z CarpetanoComplutense 161160 Página creada con «== {{lengua|xib}} == {{pron-graf|leng=xib}} === Etimología === {{etimología|leng=xib|confijo|alos|oŕtin}}.<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 34 | obs = Cerámica gala, Ensérune, M.L.H. B.1.254; Siles: 1985, nº 122. Atestiguado como 'alosoŕtin[[-ar#Íbero|ar]][[-ḿi|ḿi]]'.}}</ref> ====…» 6123467 wikitext text/x-wiki == {{lengua|xib}} == {{pron-graf|leng=xib}} === Etimología === {{etimología|leng=xib|confijo|alos|oŕtin}}.<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 34 | obs = Cerámica gala, Ensérune, M.L.H. B.1.254; Siles: 1985, nº 122. Atestiguado como 'alosoŕtin[[-ar#Íbero|ar]][[-ḿi|ḿi]]'.}}</ref> ==== {{sustantivo propio|xib}} ==== {{xib.esc|alosoŕtin}} ;1: ''{{plm|nombre de pila}}''. [[Categoría:XIB:Antropónimos]] ==== Véase también ==== * [http://hesperia.ucm.es/consulta%20hesperia/onomastica/corpus.php?id2=5263 Hesperia] == Referencias y notas == <references /> fx7fhhrivau49lo5kpg0u9d7aqqf8sd 6123469 6123467 2026-07-24T21:31:39Z CarpetanoComplutense 161160 6123469 wikitext text/x-wiki == {{lengua|xib}} == {{pron-graf|leng=xib}} === Etimología === {{etimología|leng=xib|confijo|alos|oŕtin}}.<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 34 | obs = Cerámica gala, Ensérune, M.L.H. B.1.254; Siles: 1985, nº 122. Atestiguado como 'alosoŕtin[[-ar#Íbero|ar]][[-ḿi|ḿi]]'.}}</ref> ==== {{sustantivo propio|xib}} ==== {{xib.esc|alosoŕtin}} ;1: ''{{plm|nombre de pila}}''. [[Categoría:XIB:Antropónimos]] ==== Véase también ==== * [http://hesperia.ucm.es/consulta_hesperia/onomastica/corpus.php?id2=5263 Hesperia] == Referencias y notas == <references /> ky47xuvnrc85qz7bkmwe7icmx3rbk0p śei 0 1065434 6123470 2026-07-24T21:39:57Z CarpetanoComplutense 161160 Página creada con «== {{lengua|xib}} == {{pron-graf|leng=xib}} === Etimología === {{etimología|leng=xib|incierta}}, pero probablemente relacionado con el vasco ''[[sei#Vasco|sei]]'' ('seis').<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 413}}</ref><ref>{{referencia | autor = Orduña Aznar, Eduardo | fecha = 2011 | url = ht…» 6123470 wikitext text/x-wiki == {{lengua|xib}} == {{pron-graf|leng=xib}} === Etimología === {{etimología|leng=xib|incierta}}, pero probablemente relacionado con el vasco ''[[sei#Vasco|sei]]'' ('seis').<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 413}}</ref><ref>{{referencia | autor = Orduña Aznar, Eduardo | fecha = 2011 | url = https://ojs.ehu.eus/index.php/Veleia/article/view/6301/8075 | título = Los numerales ibéricos y el protovasco | cat=artículo}}</ref><ref>{{referencia | autor = Ferrer i Jané, Joan | fecha = 2009 | url = https://ifc.dpz.es/recursos/publicaciones/29/54/32ferrer.pdf | título = El sistema de numerales ibérico: avances en su conocimiento | cat=artículo}}</ref> ==== {{numeral|xib}} ==== {{xib.esc|śei}} ;1 {{csem|leng=xib|números}}: {{plm|seis}}. == Referencias y notas == <references /> 3y3qhetp5plr78qivaz99jqkebap8wx inexhaurible 0 1065435 6123472 2026-07-24T22:02:01Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|la-neo|inexhauribilis}}, {{etim|la|exhaurio|alt=exhaurīre|agotar}}. ==== {{adjetivo|es}} ==== {{es.adj}} ;1: {{plm|inagotable}}, [[inacabable]]. {{uso|raro}} == Referencias y notas == <references />» 6123472 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|la-neo|inexhauribilis}}, {{etim|la|exhaurio|alt=exhaurīre|agotar}}. ==== {{adjetivo|es}} ==== {{es.adj}} ;1: {{plm|inagotable}}, [[inacabable]]. {{uso|raro}} == Referencias y notas == <references /> ppbnkzfrkrdyo3mrwx8mp2n33lyifyo 6123473 6123472 2026-07-24T22:02:20Z Tmagc 158167 6123473 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf|ayuda=in-exhaurible}} === Etimología === {{etimología|la-neo|inexhauribilis}}, {{etim|la|exhaurio|alt=exhaurīre|agotar}}. ==== {{adjetivo|es}} ==== {{es.adj}} ;1: {{plm|inagotable}}, [[inacabable]]. {{uso|raro}} == Referencias y notas == <references /> 6j2wrjrgiwzq3ni3uqse2fdtvdegmw9 exhaustación 0 1065436 6123475 2026-07-24T22:07:41Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1 {{csem|mecánica}}: Expulsión de los residuos de la combustión de un motor. ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references />» 6123475 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1 {{csem|mecánica}}: Expulsión de los residuos de la combustión de un motor. ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> bi9f5zsim0ukllu5vb6ut7kd1t45ekn ollado 0 1065437 6123476 2026-07-24T22:09:26Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|roa-opt|ollado}}, participio de {{l+|roa-opt|ollar|glosa=ojear}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|náutica}}: {{variante|ollao}}. == Referencias y notas == <references />» 6123476 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|roa-opt|ollado}}, participio de {{l+|roa-opt|ollar|glosa=ojear}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|náutica}}: {{variante|ollao}}. == Referencias y notas == <references /> 3uy1vm4t2wwipz6cmcg1y6lb8mfb1s6 sisbi 0 1065438 6123490 2026-07-24T23:37:25Z CarpetanoComplutense 161160 Página creada con «== {{lengua|xib}} == {{pron-graf|leng=xib}} === Etimología === {{etimología|leng=xib|incierta}}, pero probablemente relacionado con el vasco ''[[zazpi]]'' ('siete').<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 542}}</ref><ref>{{referencia | autor = Orduña Aznar, Eduardo | fecha = 2011 | url = https://o…» 6123490 wikitext text/x-wiki == {{lengua|xib}} == {{pron-graf|leng=xib}} === Etimología === {{etimología|leng=xib|incierta}}, pero probablemente relacionado con el vasco ''[[zazpi]]'' ('siete').<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 542}}</ref><ref>{{referencia | autor = Orduña Aznar, Eduardo | fecha = 2011 | url = https://ojs.ehu.eus/index.php/Veleia/article/view/6301/8075 | título = Los numerales ibéricos y el protovasco | cat=artículo}}</ref><ref>{{referencia | autor = Ferrer i Jané, Joan | fecha = 2009 | url = https://ifc.dpz.es/recursos/publicaciones/29/54/32ferrer.pdf | título = El sistema de numerales ibérico: avances en su conocimiento | cat=artículo}}</ref> ==== {{numeral|xib}} ==== {{xib.esc|sisbi}} ;1 {{csem|leng=xib|números}}: {{plm|siete}}. == Referencias y notas == <references /> s3li3f9azihlihypudahfzjo1d9n25h alos- 0 1065439 6123493 2026-07-25T00:04:13Z CarpetanoComplutense 161160 Página creada con «== {{lengua|xib}} == {{pron-graf|leng=xib}} === Etimología === {{etimología|leng=xib|incierta}}, pero probablemente relacionado con el vasco ''[[arotz]]'' ('carpintero', 'herrero'). ==== {{prefijo|xib}} ==== {{xib.esc|alos}} ;1: Formante de antropónimos bimembres.<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro…» 6123493 wikitext text/x-wiki == {{lengua|xib}} == {{pron-graf|leng=xib}} === Etimología === {{etimología|leng=xib|incierta}}, pero probablemente relacionado con el vasco ''[[arotz]]'' ('carpintero', 'herrero'). ==== {{prefijo|xib}} ==== {{xib.esc|alos}} ;1: Formante de antropónimos bimembres.<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 34}}</ref> ==== Información adicional ==== {{derivad|leng=xib|Alostibaś|Alosoŕtin}} == Referencias y notas == <references /> o6tjbpk595eb4hgzlqk9fufrmsslpjf sorse 0 1065440 6123496 2026-07-25T00:15:57Z CarpetanoComplutense 161160 Página creada con «== {{lengua|xib}} == {{pron-graf|leng=xib}} === Etimología === {{etimología|leng=xib|incierta}}, pero probablemente relacionado con el vasco ''[[zortzi]]'' ('ocho').<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 546}}</ref><ref>{{referencia | autor = Orduña Aznar, Eduardo | fecha = 2011 | url = https://o…» 6123496 wikitext text/x-wiki == {{lengua|xib}} == {{pron-graf|leng=xib}} === Etimología === {{etimología|leng=xib|incierta}}, pero probablemente relacionado con el vasco ''[[zortzi]]'' ('ocho').<ref>{{referencia | autor = Silgo Gauche, Luis | fecha = 2016 | url = https://euskerarenjatorria.eus/wp-content/uploads/2016/08/L%C3%A9xico_Ib%C3%A9rico_2nd01.pdf | título = Léxico ibérico | cat=libro | p = 546}}</ref><ref>{{referencia | autor = Orduña Aznar, Eduardo | fecha = 2011 | url = https://ojs.ehu.eus/index.php/Veleia/article/view/6301/8075 | título = Los numerales ibéricos y el protovasco | cat=artículo}}</ref><ref>{{referencia | autor = Ferrer i Jané, Joan | fecha = 2009 | url = https://ifc.dpz.es/recursos/publicaciones/29/54/32ferrer.pdf | título = El sistema de numerales ibérico: avances en su conocimiento | cat=artículo}}</ref> ==== {{numeral|xib}} ==== {{xib.esc|sorse}} ;1 {{csem|leng=xib|números}}: {{plm|ocho}}. == Referencias y notas == <references /> s5ws41p6xcs1ofvv4fy0bguaoxiwl5w mamarruchada 0 1065441 6123498 2026-07-25T00:25:39Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|cruce|mamarrachada|paparruchada}}. ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1: {{variante|paparruchada}}. == Referencias y notas == <references />» 6123498 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|cruce|mamarrachada|paparruchada}}. ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1: {{variante|paparruchada}}. == Referencias y notas == <references /> fi7x8qnu5bacxr29ve2voe1yhccblvw conor 0 1065442 6123504 2026-07-25T01:22:57Z Tmagc 158167 Página creada con «{{desambiguación|Conor}} == {{lengua|la}} == {{pron-graf|ayuda=cōnor|leng=la}} === Etimología === {{etimología|leng=la|itc-pro|*kōnāje-}}, {{l+|itc-pro|*kōnājo-}}, {{etim|leng=la|ine-pro|*kṓnh₁-ie-}}, de {{l+|ine-pro|*ken-|mover, animar}}. ==== {{verbo transitivo|la}} ==== ;1: {{plm|intentar}}. ==== Conjugación ==== {{la.v|1+|cōnor|depon=v}} == Referencias y notas == <references />» 6123504 wikitext text/x-wiki {{desambiguación|Conor}} == {{lengua|la}} == {{pron-graf|ayuda=cōnor|leng=la}} === Etimología === {{etimología|leng=la|itc-pro|*kōnāje-}}, {{l+|itc-pro|*kōnājo-}}, {{etim|leng=la|ine-pro|*kṓnh₁-ie-}}, de {{l+|ine-pro|*ken-|mover, animar}}. ==== {{verbo transitivo|la}} ==== ;1: {{plm|intentar}}. ==== Conjugación ==== {{la.v|1+|cōnor|depon=v}} == Referencias y notas == <references /> ew1up5z6myed7spqbn5rfazb01quolj waffle 0 1065443 6123509 2026-07-25T01:59:20Z CitationsFreak 149699 Página creada con «== {{lengua|en}} == === Etimología === {{etimología|leng=en|nl|wafel}} ==== {{sustantivo|en}} ==== {{en.sust|c}} ;1: [[wafle]] ==== Véase también ==== {{w|leng=en}} == Referencias y notas == <references />» 6123509 wikitext text/x-wiki == {{lengua|en}} == === Etimología === {{etimología|leng=en|nl|wafel}} ==== {{sustantivo|en}} ==== {{en.sust|c}} ;1: [[wafle]] ==== Véase también ==== {{w|leng=en}} == Referencias y notas == <references /> 057xdxiksnu3nnalcw9kf04warwufjr cadorna 0 1065444 6123514 2026-07-25T02:36:10Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|EPON|Luigi Cadorna}}, general italiano responsable de más de 300k de bajas propias por su incapacidad para comandar su batallón.<ref>{{referencia|c=pagina|t=Cadorna y cadorcha|f=2020-4-9|sitio=esaviejaculturafrita.blogspot.com|u=https://esaviejaculturafrita.blogspot.com/2020/04/cadorna-y-cadorcha-sabias-que.html}}</ref> ==== {{sustantivo masculino y femenino|es}} ==== {{es.sus…» 6123514 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|EPON|Luigi Cadorna}}, general italiano responsable de más de 300k de bajas propias por su incapacidad para comandar su batallón.<ref>{{referencia|c=pagina|t=Cadorna y cadorcha|f=2020-4-9|sitio=esaviejaculturafrita.blogspot.com|u=https://esaviejaculturafrita.blogspot.com/2020/04/cadorna-y-cadorcha-sabias-que.html}}</ref> ==== {{sustantivo masculino y femenino|es}} ==== {{es.sust|mf}} ;1: Persona [[imperita]] o [[inhábil]]. {{uso|coloquial}} {{ámbito|Argentina}} {{wikisauro|inhábil}} ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;2: Cosa u objeto insignificante que no se quiere mencionar. {{uso|coloquial}} {{ámbito|Argentina}} {{sinónimo|mierda|poronga}} == Referencias y notas == <references /> ferj6xxoot6g5r618j3vjc0onmzc18a 6123515 6123514 2026-07-25T02:36:27Z Tmagc 158167 6123515 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|EPON|Luigi Cadorna}}, general italiano responsable de más de 300k de bajas propias por su incapacidad para comandar su batallón.<ref>{{referencia|c=pagina|t=Cadorna y cadorcha|f=2020-4-9|sitio=esaviejaculturafrita.blogspot.com|u=https://esaviejaculturafrita.blogspot.com/2020/04/cadorna-y-cadorcha-sabias-que.html}}</ref> ==== {{sustantivo masculino y femenino|es}} ==== {{es.sust|mf}} ;1: Persona [[imperita]] o [[inhábil]]. {{uso|coloquial}} {{ámbito|Argentina}} {{wikisauro|inhábil}} ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;2: Cosa u objeto insignificante que no se quiere mencionar. {{uso|coloquial}} {{ámbito|Argentina}} {{sinónimo|mierda|poronga|cuerno}} == Referencias y notas == <references /> oeb7eejorm8f2erk2k44kcjci8d5jmc 6123516 6123515 2026-07-25T02:37:35Z Tmagc 158167 6123516 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf|v=cadorcha}} === Etimología === {{etimología|EPON|Luigi Cadorna}}, general italiano responsable de más de 300k de bajas propias por su incapacidad para comandar su batallón.<ref>{{referencia|c=pagina|t=Cadorna y cadorcha|f=2020-4-9|sitio=esaviejaculturafrita.blogspot.com|u=https://esaviejaculturafrita.blogspot.com/2020/04/cadorna-y-cadorcha-sabias-que.html}}</ref> ==== {{sustantivo masculino y femenino|es}} ==== {{es.sust|mf}} ;1: Persona [[imperita]] o [[inhábil]]. {{uso|coloquial}} {{ámbito|Argentina}} {{wikisauro|inhábil}} ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;2: Cosa u objeto insignificante que no se quiere mencionar. {{uso|coloquial}} {{ámbito|Argentina}} {{sinónimo|mierda|poronga|cuerno}} == Referencias y notas == <references /> 7990461uol1cvl7y7am23s62xnu2f0d cadorcha 0 1065445 6123517 2026-07-25T02:38:04Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|cruce|cadorna|garcha}}. ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1: {{variante|cadorna}}. {{uso|coloquial}} {{ámbito|Argentina}} == Referencias y notas == <references />» 6123517 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|cruce|cadorna|garcha}}. ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1: {{variante|cadorna}}. {{uso|coloquial}} {{ámbito|Argentina}} == Referencias y notas == <references /> 6dz64rjelb7o913ute7reeo6nel512q pipe clamp 0 1065446 6123525 2026-07-25T02:54:01Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|en}} == {{pron-graf|leng=en}} === Etimología === {{etimología|leng=en}}. ==== {{locución|en|sustantiva}} ==== ;1 {{csem|herramientas|leng=en}}: {{plm|sargento}}. == Referencias y notas == <references />» 6123525 wikitext text/x-wiki {{desambiguación|}} == {{lengua|en}} == {{pron-graf|leng=en}} === Etimología === {{etimología|leng=en}}. ==== {{locución|en|sustantiva}} ==== ;1 {{csem|herramientas|leng=en}}: {{plm|sargento}}. == Referencias y notas == <references /> m64l8ag0mu1ah9bm5efbjtafxu3e0j3 6123526 6123525 2026-07-25T02:54:27Z Tmagc 158167 /* {{locución|en|sustantiva}} */ 6123526 wikitext text/x-wiki {{desambiguación|}} == {{lengua|en}} == {{pron-graf|leng=en}} === Etimología === {{etimología|leng=en}}. ==== {{locución|en|sustantiva}} ==== ;1 {{csem|herramientas|leng=en}}: {{plm|sargento}} (herramienta). == Referencias y notas == <references /> ifmc78yn94ocgl53tt59igh4nxwcajq 6123527 6123526 2026-07-25T02:54:41Z Tmagc 158167 /* {{locución|en|sustantiva}} */ 6123527 wikitext text/x-wiki {{desambiguación|}} == {{lengua|en}} == {{pron-graf|leng=en}} === Etimología === {{etimología|leng=en}}. ==== {{locución|en|sustantiva}} ==== ;1 {{csem|carpintería|herramientas|leng=en}}: {{plm|sargento}} (herramienta). == Referencias y notas == <references /> h1nr0ic7kszgkdxw8pga7ypyd454s5q 6123533 6123527 2026-07-25T02:59:11Z Tmagc 158167 6123533 wikitext text/x-wiki {{desambiguación|}} == {{lengua|en}} == {{pron-graf|leng=en}} === Etimología === {{etimología|leng=en}}. ==== {{locución|en|sustantiva}} ==== ;1 {{csem|mecánica|leng=en}}: {{plm|abrazadera}}. ;2 {{csem|carpintería|herramientas|leng=en}}: {{plm|sargento}} (herramienta). == Referencias y notas == <references /> 0862a1rm5c9uecv40i9nh2ykq65k1e5 escuadra de prueba 0 1065447 6123529 2026-07-25T02:56:25Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. [[Archivo:Trysquare.jpg|thumb|(1)]] ==== {{locución|es|sustantiva|femenina}} ==== {{es.sust|cop=n}} ;1 {{csem|carpintería|metalistería}}: Herramienta que se utiliza para marcar y comprobar ángulos de 90° en piezas de madera. Consta de una paleta ancha, fabricada de acero o bronce y remachada a un mango de madera. ==== Véase también ==== {{w}} ==== Traducciones ====…» 6123529 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. [[Archivo:Trysquare.jpg|thumb|(1)]] ==== {{locución|es|sustantiva|femenina}} ==== {{es.sust|cop=n}} ;1 {{csem|carpintería|metalistería}}: Herramienta que se utiliza para marcar y comprobar ángulos de 90° en piezas de madera. Consta de una paleta ancha, fabricada de acero o bronce y remachada a un mango de madera. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> ejcmjbye794qjyn6tv7yvwxawvhbd4j 6123530 6123529 2026-07-25T02:56:52Z Tmagc 158167 6123530 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. [[Archivo:Trysquare.jpg|thumb|(1)]] ==== {{locución|es|sustantiva|femenina}} ==== {{es.sust|cop=n}} ;1 {{csem|carpintería|metalistería}}: Herramienta que se utiliza para marcar y comprobar ángulos de 90° en piezas de madera. Consta de una paleta ancha, fabricada de acero o bronce y remachada a un mango de madera. {{sinónimo|escuadra de comprobación|escuadra de carpintero}} ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> b59byx6j43n8gc5bprid5b18qszukfs escuadra de comprobación 0 1065448 6123531 2026-07-25T02:57:22Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{locución|es|sustantiva|femenina}} ==== {{es.sust|cop=n}} ;1 {{csem|carpintería|metalistería}}: {{plm|escuadra de prueba}}. {{sinónimo|escuadra de prueba|escuadra de carpintero}} == Referencias y notas == <references />» 6123531 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{locución|es|sustantiva|femenina}} ==== {{es.sust|cop=n}} ;1 {{csem|carpintería|metalistería}}: {{plm|escuadra de prueba}}. {{sinónimo|escuadra de prueba|escuadra de carpintero}} == Referencias y notas == <references /> fgizbuvi19o1zfl6ebi81eg67fbu46g escuadra de carpintero 0 1065449 6123532 2026-07-25T02:57:37Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{locución|es|sustantiva|femenina}} ==== {{es.sust|cop=n}} ;1 {{csem|carpintería|metalistería}}: {{plm|escuadra de prueba}}. {{sinónimo|escuadra de prueba|escuadra de comprobación}} == Referencias y notas == <references />» 6123532 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{locución|es|sustantiva|femenina}} ==== {{es.sust|cop=n}} ;1 {{csem|carpintería|metalistería}}: {{plm|escuadra de prueba}}. {{sinónimo|escuadra de prueba|escuadra de comprobación}} == Referencias y notas == <references /> lekydygwdyhko8ugxz1oz6ko0075w2g lijadora 0 1065450 6123538 2026-07-25T03:12:40Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|femenino|lijador}}. [[File:Belt sander bosch.jpg|thumb|(1) Lijadora de banda]] ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1 {{csem|máquinas|herramientas|carpintería}}: Máquina-herramienta usada para lijar. ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references />» 6123538 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|femenino|lijador}}. [[File:Belt sander bosch.jpg|thumb|(1) Lijadora de banda]] ==== {{sustantivo femenino|es}} ==== {{es.sust}} ;1 {{csem|máquinas|herramientas|carpintería}}: Máquina-herramienta usada para lijar. ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> 8p6gkxd745ciuhz3cdzw7o9o9goty5w lijador 0 1065451 6123539 2026-07-25T03:13:15Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{adjetivo|es}} ==== {{es.adj}} ;1: {{adjetivo de verbo|lijar|lija}}. ==== Véase también ==== * [[lijadora]] == Referencias y notas == <references />» 6123539 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{adjetivo|es}} ==== {{es.adj}} ;1: {{adjetivo de verbo|lijar|lija}}. ==== Véase también ==== * [[lijadora]] == Referencias y notas == <references /> ieq00j8hp4ohvsrnej2ywhza4ckz8oj berbiquí 0 1065452 6123540 2026-07-25T03:17:05Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf|v=villabarquín|v2=billamarquín}} === Etimología === {{etimología|fr|vilebrequin}}, {{etim|nl|wimmelkijn}}. [[File:PalmercarpenterA.jpg|thumb|(1) Carpintero usando un berbiquí]] ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|carpintería}}: Herramienta manual de perforación, provista de un manubrio semicircular o en forma de doble codo realizado en metal, normalmente de acero, con elementos de m…» 6123540 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf|v=villabarquín|v2=billamarquín}} === Etimología === {{etimología|fr|vilebrequin}}, {{etim|nl|wimmelkijn}}. [[File:PalmercarpenterA.jpg|thumb|(1) Carpintero usando un berbiquí]] ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|carpintería}}: Herramienta manual de perforación, provista de un manubrio semicircular o en forma de doble codo realizado en metal, normalmente de acero, con elementos de madera. Es el precursor del taladro moderno. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> 4d90ufysrr7r9mysio6ja1s0s0ygqlu 6123541 6123540 2026-07-25T03:17:37Z Tmagc 158167 /* {{sustantivo masculino|es}} */ 6123541 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf|v=villabarquín|v2=billamarquín}} === Etimología === {{etimología|fr|vilebrequin}}, {{etim|nl|wimmelkijn}}. [[File:PalmercarpenterA.jpg|thumb|(1) Carpintero usando un berbiquí]] ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|carpintería|herramientas}}: Herramienta manual de perforación, provista de un manubrio semicircular o en forma de doble codo realizado en metal, normalmente de acero, con elementos de madera. Es el precursor del taladro moderno. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> 70tj6ey5foeyr6cuq7ejjqanhomnzvm 6123547 6123541 2026-07-25T03:20:28Z Tmagc 158167 /* {{sustantivo masculino|es}} */ 6123547 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf|v=villabarquín|v2=billamarquín}} === Etimología === {{etimología|fr|vilebrequin}}, {{etim|nl|wimmelkijn}}. [[File:PalmercarpenterA.jpg|thumb|(1) Carpintero usando un berbiquí]] ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|carpintería|herramientas}}: Herramienta manual de perforación, provista de un manubrio semicircular o en forma de doble codo unido a una mecha. Es el precursor del taladro moderno. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> qmxggpkkg92i2y49bjk4kzxcgy5ohae 6123548 6123547 2026-07-25T03:20:51Z Tmagc 158167 6123548 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf|v=villabarquín|v2=billamarquín}} === Etimología === {{etimología|fr|vilebrequin}}, {{etim|nl|wimmelkijn}}. [[File:PalmercarpenterA.jpg|thumb|(1) Carpintero agujereando con un berbiquí]] ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|carpintería|herramientas}}: Herramienta manual de perforación, provista de un manubrio semicircular o en forma de doble codo unido a una mecha. Es el precursor del taladro moderno. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> mt25ajzi722vhgghmpwrkjeozpmnguw villabarquín 0 1065453 6123542 2026-07-25T03:18:09Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|véase|berbiquín}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|carpintería|herramientas}}: {{variante|berbiquín}}. == Referencias y notas == <references />» 6123542 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|véase|berbiquín}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|carpintería|herramientas}}: {{variante|berbiquín}}. == Referencias y notas == <references /> li7ty4re3tmlpsnqmlioywobdd1pakv 6123543 6123542 2026-07-25T03:18:20Z Tmagc 158167 6123543 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|véase|berbiquí}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|carpintería|herramientas}}: {{variante|berbiquí}}. == Referencias y notas == <references /> o007ysmrd3rp6s7ebode7tnptdz5cl2 6123546 6123543 2026-07-25T03:19:23Z Tmagc 158167 6123546 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|véase|berbiquí}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|carpintería|herramientas}}: {{variante|berbiquí}}. {{uso|rural}} {{ámbito|Aragón}} == Referencias y notas == <references /> ab7maehb5cf38v7opzk0f1mzdeh2975 billamarquín 0 1065454 6123544 2026-07-25T03:18:42Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|véase|berbiquí}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|carpintería|herramientas}}: {{variante|berbiquí}}. == Referencias y notas == <references />» 6123544 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|véase|berbiquí}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|carpintería|herramientas}}: {{variante|berbiquí}}. == Referencias y notas == <references /> o007ysmrd3rp6s7ebode7tnptdz5cl2 6123545 6123544 2026-07-25T03:19:04Z Tmagc 158167 6123545 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología|véase|berbiquí}}. ==== {{sustantivo masculino|es}} ==== {{es.sust}} ;1 {{csem|carpintería|herramientas}}: {{variante|berbiquí}}. {{ámbito|Colombia}} == Referencias y notas == <references /> 92isauvo2ss4cgcztlsg5rodfvhyhvm integrador social 0 1065455 6123551 2026-07-25T03:27:04Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{locución|es|sustantiva|masculina|femenina}} ==== {{es.sust|mf|cop=n}} ;1 {{csem|ocupaciones}}: Persona formada para intervenir en grupos sociales para solventar las situaciones de exclusión social. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references />» 6123551 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{locución|es|sustantiva|masculina|femenina}} ==== {{es.sust|mf|cop=n}} ;1 {{csem|ocupaciones}}: Persona formada para intervenir en grupos sociales para solventar las situaciones de exclusión social. ==== Véase también ==== {{w}} ==== Traducciones ==== {{trad-arriba}} {{trad-abajo}} == Referencias y notas == <references /> 6pllnrcs9g9wdp07n4ko2tgefovq72x -ongo 0 1065456 6123552 2026-07-25T04:18:12Z Tmagc 158167 Página creada con «{{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{sufijo|es}} ==== ;1: {{variante|-ango}}. {{uso|despectivo|jocoso}} {{ejemplo|[[facilongo]], [[sorongo]]}} == Referencias y notas == <references />» 6123552 wikitext text/x-wiki {{desambiguación|}} == {{lengua|es}} == {{pron-graf}} === Etimología === {{etimología}}. ==== {{sufijo|es}} ==== ;1: {{variante|-ango}}. {{uso|despectivo|jocoso}} {{ejemplo|[[facilongo]], [[sorongo]]}} == Referencias y notas == <references /> h6gdx8y8f4urpcjuft2u82i90z8ckau bile 0 1065457 6123557 2026-07-25T05:20:38Z CitationsFreak 149699 Página creada con «== {{lengua|en}} == {{pron-graf|leng=en|pron=General American, Canadá|fono=baɪl}} === Etimología === {{etimología|leng=en|frm|bile}}, {{etim|la|bilis}}. ==== {{sustantivo|en}} ==== ;1: [[bilis]] (líquido segregado por el hígado) ;2: [[bilis]] (mal humor) ==== Véase también ==== {{w|leng=en}} == Referencias y notas == <references />» 6123557 wikitext text/x-wiki == {{lengua|en}} == {{pron-graf|leng=en|pron=General American, Canadá|fono=baɪl}} === Etimología === {{etimología|leng=en|frm|bile}}, {{etim|la|bilis}}. ==== {{sustantivo|en}} ==== ;1: [[bilis]] (líquido segregado por el hígado) ;2: [[bilis]] (mal humor) ==== Véase también ==== {{w|leng=en}} == Referencias y notas == <references /> h29xyzeuvrrmb6gko1t20m8miqa3rwq tsʼiiw 0 1065458 6123572 2026-07-25T11:22:20Z 26agcp 138617 Página creada con «== {{lengua|yua}} == {{pron-graf|leng=yua|g=ts'iiw}} === Etimología === {{etimología|leng=yua}}. [[Archivo:Molothrus aeneus -Tucson, Arizona, USA-8 (1).jpg|thumb|(1)]] ==== {{sustantivo|yua}} ==== {{yua.sust}} ;1 {{csem|aves|leng=yua}}: {{taxón|Molothrus aeneus}} {{plm|tordo}} ojos rojos.<ref>{{GN 2009|p=180|cita=TS’IIW}}</ref> == Referencias y notas == <references />» 6123572 wikitext text/x-wiki == {{lengua|yua}} == {{pron-graf|leng=yua|g=ts'iiw}} === Etimología === {{etimología|leng=yua}}. [[Archivo:Molothrus aeneus -Tucson, Arizona, USA-8 (1).jpg|thumb|(1)]] ==== {{sustantivo|yua}} ==== {{yua.sust}} ;1 {{csem|aves|leng=yua}}: {{taxón|Molothrus aeneus}} {{plm|tordo}} ojos rojos.<ref>{{GN 2009|p=180|cita=TS’IIW}}</ref> == Referencias y notas == <references /> eg9mf3cphz301p2nfjcyzjclfapp50n 6123573 6123572 2026-07-25T11:24:24Z 26agcp 138617 /* {{sustantivo|yua}} */ + ref 6123573 wikitext text/x-wiki == {{lengua|yua}} == {{pron-graf|leng=yua|g=ts'iiw}} === Etimología === {{etimología|leng=yua}}. [[Archivo:Molothrus aeneus -Tucson, Arizona, USA-8 (1).jpg|thumb|(1)]] ==== {{sustantivo|yua}} ==== {{yua.sust}} ;1 {{csem|aves|leng=yua}}: {{taxón|Molothrus aeneus}} {{plm|tordo}} ojos rojos.<ref>{{GN 2009|p=180|cita=TS’IIW}}</ref><ref>{{referencia|c=libro|a1=Alfredo Dorantes Euan|a2=Ingrid A. Tello López|a3=Aldo I. Echeverría Caro|a4=Gerardo I. Linares Hernández|a5=Ariadna Ibarra Morales|a6=Davira Y. Palma Cancino|a7=Darleny R. Sanmiguel Caamal|a8=Sebastián Gay Escalante|a9=Richard E. Feldman|u=https://www.cicy.mx/Documentos/CICY/sitios/CircuitoEtnobiologico/Repositorio/Etapa4/Acceso-Universal/2024_Catalogo-aves-CICY.pdf|t=Guía de aves del Jardín Botánico Regional “Roger Orellana”|f=2024|editorial=Centro de Investigación Científica de Yucatán|edición=2|formato=PDF|lugar=México|p=113}}</ref> == Referencias y notas == <references /> 0a8d4hw3puiycjq0euf7u2lramrimni