Continuing the discussion from Sugerencia de mejora: diccionario de español:
Solucionado: Cómo mejorar el corrector ortográfico de español en eM Client 11 mediante un diccionario personalizado
Quiero compartir la solución que encontré para mejorar la corrección ortográfica del español en eM Client 11, por si puede ayudar a otros usuarios que estén experimentando el mismo problema.
Entorno utilizado
-
Windows 11 Home.
-
eM Client 11.0.1725.
-
Idioma de corrección ortográfica seleccionado: Español (España).
1. El problema
Varias palabras perfectamente válidas en español aparecían incorrectamente subrayadas en rojo, entre ellas:
-
Interoperabilidad
-
Desambiguación
-
Retroalimentación
-
Parametrización
Inicialmente intenté utilizar un diccionario español Hunspell más completo (archivos .dic y .aff), pero comprobé que estos archivos eran idénticos a los que ya incluía eM Client.
2. La solución
Descubrí que eM Client utiliza un archivo de diccionario personalizado llamado:
es-ES.custdic
En mi instalación, su ubicación dentro del perfil del usuario de Windows era:
%APPDATA%\eM Client\es-ES.custdic
En lugar de reemplazar los archivos originales del diccionario de la aplicación, utilicé un script de PowerShell para extraer las palabras de un diccionario español Hunspell más completo (.dic) e incorporarlas al diccionario personalizado.
Script de PowerShell
Antes de ejecutar el script:
-
Descarga un diccionario español Hunspell completo (
es-ES.dic). -
Colócalo en una carpeta de tu ordenador.
-
Cierra eM Client.
-
Abre PowerShell y modifica la ruta del archivo de origen en la primera línea, si es necesario.
El script crea automáticamente una copia de seguridad del diccionario personalizado existente antes de modificarlo.
# Diccionario Hunspell de origen
$dicFile = "C:\EmClient\Diccionario Mejorado\es-ES.dic"
# Diccionario personalizado de destino
$customFile = "$env:APPDATA\eM Client\es-ES.custdic"
# Comprobar que existe el archivo de origen
if (!(Test-Path -LiteralPath $dicFile)) {
Write-Host "No se encuentra el diccionario de origen: $dicFile" -ForegroundColor Red
return
}
# Leer el diccionario utilizando codificación UTF-8
$sourceLines = Get-Content -LiteralPath $dicFile -Encoding UTF8
# Crear la carpeta de destino si no existe
$folder = Split-Path $customFile
if (!(Test-Path -LiteralPath $folder)) {
New-Item -ItemType Directory -Path $folder -Force | Out-Null
}
# Crear una copia de seguridad del diccionario personalizado existente
if (Test-Path -LiteralPath $customFile) {
$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"
$backupFile = "$customFile.backup_$timestamp"
Copy-Item -LiteralPath $customFile -Destination $backupFile
$existingWords = Get-Content -LiteralPath $customFile -Encoding UTF8
}
else {
$existingWords = @()
$backupFile = "No existía un diccionario personalizado anterior"
}
# Colección de palabras sin distinguir mayúsculas y minúsculas
$words = [System.Collections.Generic.HashSet[string]]::new(
[System.StringComparer]::OrdinalIgnoreCase
)
# Conservar las palabras que ya existían en el diccionario personalizado
foreach ($word in $existingWords) {
$word = $word.Trim()
if ($word) {
[void]$words.Add($word)
}
}
$originalCount = 0
$newCount = 0
# Procesar las entradas del diccionario Hunspell
# La primera línea contiene el número de entradas, por eso se omite.
for ($i = 1; $i -lt $sourceLines.Count; $i++) {
$line = $sourceLines[$i]
if ([string]::IsNullOrWhiteSpace($line)) {
continue
}
# Eliminar la información morfológica separada por tabulaciones
$word = ($line -split "`t", 2)[0]
# Eliminar las marcas de sufijos de Hunspell
$word = $word -replace '(?<!\\)/.*$', ''
# Restaurar las barras inclinadas escapadas
$word = $word -replace '\\/', '/'
$word = $word.Trim()
if (!$word) {
continue
}
$originalCount++
# Añadir únicamente las palabras que todavía no existen
if ($words.Add($word)) {
$newCount++
}
}
# Escribir el archivo en UTF-8 sin BOM
$result = @($words)
[System.IO.File]::WriteAllLines(
$customFile,
[string[]]$result,
[System.Text.UTF8Encoding]::new($false)
)
# Mostrar los resultados
Write-Host "`nIMPORTACIÓN FINALIZADA" -ForegroundColor Green
Write-Host "Entradas originales procesadas: $originalCount"
Write-Host "Palabras nuevas incorporadas: $newCount"
Write-Host "Total de palabras personalizadas: $($words.Count)"
Write-Host "Archivo: $customFile"
Write-Host "Copia de seguridad: $backupFile"
Resultados de la importación
En mi caso, la importación produjo los siguientes resultados:
-
Entradas originales procesadas: 58.222
-
Palabras nuevas incorporadas: 55.635
-
Total de palabras personalizadas después de la importación: 55.645
Después de añadir manualmente otra palabra, el diccionario final quedó con 55.646 palabras.
3. Trasladar el diccionario a otro ordenador
Una vez comprobado que el diccionario personalizado funcionaba correctamente en una máquina virtual con Windows 11 y eM Client 11, copié el archivo es-ES.custdic a mi ordenador principal.
Actualicé de eM Client 10 a eM Client 11 y copié el diccionario personalizado en:
%APPDATA%\eM Client\
No fue necesario modificar la carpeta protegida de instalación de Windows ni reemplazar los archivos .dic y .aff.
4. Verificación final
Los resultados fueron exactamente los esperados:
| Palabra | Resultado |
|---|---|
| Interoperabilidad | Aceptada |
| Desambiguación | Aceptada |
| Retroalimentación | Aceptada |
| Parametrización | Aceptada |
| Interperabilidad | Detectada correctamente como error |
| Desambiguasión | Detectada correctamente como error |
Conclusión
La solución consistió en enriquecer el diccionario personalizado de eM Client (es-ES.custdic) con las entradas extraídas de un diccionario español Hunspell más completo, en lugar de modificar los archivos de instalación de la aplicación.
Esto también permitió trasladar el diccionario enriquecido a otro ordenador con eM Client 11 sin necesidad de modificar las carpetas protegidas de Windows.
Espero que esta experiencia pueda ayudar a otros usuarios de eM Client que trabajan con el idioma español.
¡Gracias a todos los que contribuyen a este foro!
English .
Solved: Improving the Spanish spell checker in eM Client 11 with a custom dictionary
I would like to share the solution I found to improve Spanish spell-checking in eM Client 11, in case it helps other users experiencing the same issue.
Environment
-
Windows 11 Home.
-
eM Client 11.0.1725.
-
Spanish (Spain) selected as the spell-checking language.
1. The problem
Several perfectly valid Spanish words were incorrectly underlined in red, including:
-
Interoperabilidad
-
Desambiguación
-
Retroalimentación
-
Parametrización
I initially tried using a more comprehensive Spanish Hunspell dictionary (.dic and .aff files), but these files were identical to the ones already included with eM Client.
2. The solution
I discovered that eM Client supports a custom dictionary file named:
es-ES.custdic
Its location in my Windows user profile was:
%APPDATA%\eM Client\es-ES.custdic
Instead of replacing the application’s original dictionary files, I used a PowerShell script to extract the words from a more comprehensive Spanish Hunspell .dic file and import them into the custom dictionary.
PowerShell script
Before running the script:
-
Download a comprehensive Spanish Hunspell dictionary (
es-ES.dic). -
Place it in a folder on your computer.
-
Close eM Client.
-
Open PowerShell and adjust the source path in the first line if necessary.
The script automatically creates a backup of the existing custom dictionary before modifying it.
# Source Hunspell dictionary
$dicFile = "C:\EmClient\Diccionario Mejorado\es-ES.dic"
# Destination custom dictionary
$customFile = "$env:APPDATA\eM Client\es-ES.custdic"
# Check source file
if (!(Test-Path -LiteralPath $dicFile)) {
Write-Host "Source dictionary not found: $dicFile" -ForegroundColor Red
return
}
# Read source dictionary using UTF-8
$sourceLines = Get-Content -LiteralPath $dicFile -Encoding UTF8
# Create destination folder if necessary
$folder = Split-Path $customFile
if (!(Test-Path -LiteralPath $folder)) {
New-Item -ItemType Directory -Path $folder -Force | Out-Null
}
# Create backup of existing custom dictionary
if (Test-Path -LiteralPath $customFile) {
$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"
$backupFile = "$customFile.backup_$timestamp"
Copy-Item -LiteralPath $customFile -Destination $backupFile
$existingWords = Get-Content -LiteralPath $customFile -Encoding UTF8
}
else {
$existingWords = @()
$backupFile = "No previous custom dictionary"
}
# Case-insensitive word collection
$words = [System.Collections.Generic.HashSet[string]]::new(
[System.StringComparer]::OrdinalIgnoreCase
)
# Preserve existing custom dictionary entries
foreach ($word in $existingWords) {
$word = $word.Trim()
if ($word) {
[void]$words.Add($word)
}
}
$originalCount = 0
$newCount = 0
# Process Hunspell dictionary entries
# The first line contains the entry count, so skip it.
for ($i = 1; $i -lt $sourceLines.Count; $i++) {
$line = $sourceLines[$i]
if ([string]::IsNullOrWhiteSpace($line)) {
continue
}
# Remove tab-separated morphological information
$word = ($line -split "`t", 2)[0]
# Remove Hunspell suffix flags
$word = $word -replace '(?<!\\)/.*$', ''
# Restore escaped forward slashes
$word = $word -replace '\\/', '/'
$word = $word.Trim()
if (!$word) {
continue
}
$originalCount++
# Add only words not already present
if ($words.Add($word)) {
$newCount++
}
}
# Write UTF-8 without BOM
$result = @($words)
[System.IO.File]::WriteAllLines(
$customFile,
[string[]]$result,
[System.Text.UTF8Encoding]::new($false)
)
# Display results
Write-Host "`nIMPORTATION COMPLETED" -ForegroundColor Green
Write-Host "Original dictionary entries: $originalCount"
Write-Host "New words added: $newCount"
Write-Host "Total custom dictionary words: $($words.Count)"
Write-Host "File: $customFile"
Write-Host "Backup: $backupFile"
Import results
In my case, the import produced the following results:
-
Original dictionary entries processed: 58,222
-
New words added: 55,635
-
Total custom dictionary words after import: 55,645
After a subsequent manual addition, the final dictionary contained 55,646 words.
3. Moving the dictionary to another computer
Once the custom dictionary was working in my Windows 11 virtual machine, I copied es-ES.custdic to my main laptop.
I upgraded from eM Client 10 to eM Client 11 and copied the custom dictionary into:
%APPDATA%\eM Client\
I did not need to modify the protected Windows installation folder or replace the .dic and .aff files.
4. Final verification
The results were exactly what I wanted:
| Word | Result |
|---|---|
| Interoperabilidad | Accepted |
| Desambiguación | Accepted |
| Retroalimentación | Accepted |
| Parametrización | Accepted |
| Interperabilidad | Correctly flagged as an error |
| Desambiguasión | Correctly flagged as an error |
Conclusion
The solution was to enrich eM Client’s custom dictionary (es-ES.custdic) with entries extracted from a more comprehensive Spanish Hunspell dictionary, rather than modifying the application’s installation files.
This also made it possible to transfer the enriched custom dictionary to another computer running eM Client 11 without modifying protected Windows folders.
I hope this helps other Spanish-speaking eM Client users!
Thanks to everyone who contributes to this forum.