i18n-ai-translate开源程序,可以使用DeepSeek等模型将您的 i18nJSON翻译成任何语言

一、软件介绍

文末提供程序和源码下载

       i18n-ai-translate开源程序使用 DeepSeek等模型可以将您的 i18n JSON 翻译成任何语言。 无缝翻译本地化文件。支持嵌套翻译文件的目录。需要i18next样式的JSON 文件(文末一并提供下载)。

二、模式

CSV 模式

三个提示链接在一起,以确保每个翻译格式正确。

  1. 翻译提示尝试翻译
  2. 翻译验证提示使用单独的上下文来验证翻译
  3. 样式验证提示使用另一个上下文来验证翻译的格式是否与源一致

JSON 模式

​翻译和验证分两个单独的步骤完成。

  1. 翻译提示尝试翻译整个文件
  2. 翻译验证提示会验证/修复并再次验证每一行。
  3. 在两次调用之间保留历史记录,以确保翻译整个文件时的一致性。

​三、Usage  用法

Quick-start  快速启动

GitHub Actions  GitHub 作
使用 GitHub Action 将其合并到您的 CI 中,以将每个拉取请求的密钥自动转换为新提交。所有可配置选项均以 action.yml 形式提供。

下面翻译了 i18n/en.json 被修改的每个 PR:

name: i18n-ai-translateon:pull_request:# Only trigger when en.json has been modifiedpaths:- "i18n/en.json"jobs:build:runs-on: ubuntu-lateststeps:- name: i18n-ai-translateuses: taahamahdi/i18n-ai-translate@masterwith:json-file-path: i18n/en.jsonapi-key: ${{ secrets.OPENAI_API_KEY }}

四、Running directly 直接运行

git clone git@github.com:taahamahdi/i18n-ai-translate.git
cd i18n-ai-translate
yarn
cp /home/en.json jsons/# Generate French translations
npm run i18n-ai-translate -- translate -i en.json -o fr.json --engine chatgpt --model gpt-4o --api-key <openai_key>

Running as a script in your own project在您自己的项目中作为脚本运行

yarn add i18n-ai-translate# Generate French translations
npx i18n-ai-translate translate -i en.json -o fr.json --engine gemini --model gemini-2.0-flash-exp --api-key <gemini_key># Or, assuming you already have other translations in the current directory
npx i18n-ai-translate diff --before en-before.json --after en.json --input-language English --engine claude --model claude-3-5-sonnet-latest --api-key <anthropic_key>

Running as a library  作为库运行

import { translate } from "i18n-ai-translate";
...
const englishJSON = {"welcomeMessage": "Welcome, {{name}}!","messages": {"notifications_one": "You have one notification","notifications_other": "You have {{count}} notifications","delete": "Would you like to delete the \"{{name}}\" category?"}
};const frenchTranslation = await translate({inputJSON: englishJSON,inputLanguage: "English",outputLanguage: "French",...
});console.log(frenchTranslation);
{"welcomeMessage": "Bienvenue, {{name}} !","messages": {"notifications_one": "Vous avez une notification","notifications_other": "Vous avez {{count}} notifications","delete": "Voulez-vous supprimer la catégorie « {{name}} » ?"}
}

Script  脚本

Use i18n-ai-translate translate to convert a local i18n JSON file to any language. Relative paths begin from the jsons/ directory.
使用 i18n-ai-translate translate 将本地 i18n JSON 文件转换为任何语言。相对路径从 jsons/ 目录开始。

Use i18n-ai-translate diff to find the differences between two versions of a source language file, and apply them to all language files in the same directory.
使用 i18n-ai-translate diff 查找源语言文件的两个版本之间的差异,并将它们应用于同一目录中的所有语言文件。

Create a .env file with an entry for your API key, or pass the --api-key flag.
创建一个包含 API 密钥条目的 .env 文件,或传递 --api-key 标志。

  • GEMINI_API_KEY=<your Gemini API key>
  • OPENAI_API_KEY=<your OpenAI API key>
  • ANTHROPIC_API_KEY=<your Anthropic API key>

For Ollama, create an entry for your host, use the --host flag to set a custom host and path (Defaults to localhost:11434).
对于 Ollama,为您的主机创建一个条目,使用 --host 标志设置自定义主机和路径(默认为 localhost:11434)。

  • OLLAMA_HOSTNAME=<the server and port number running Ollama>
<span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><span style="color:#1f2328"><span style="color:var(--fgColor-default, var(--color-fg-default))"><span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><code>Usage: i18n-ai-translate [options] [command]Use ChatGPT or Gemini to translate your i18n JSON to any languageOptions:-V, --version        output the version number-h, --help           display help for commandCommands:translate [options]diff [options]help [command]       display help for command
</code></span></span></span></span>
<span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><span style="color:#1f2328"><span style="color:var(--fgColor-default, var(--color-fg-default))"><span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><code>Usage: i18n-ai-translate translate [options]Options:-i, --input <input>                         Source i18n file or path of source language, in the jsons/ directory if a relative path is given-o, --output-languages [language codes...]  A list of languages to translate to-e, --engine <engine>                       Engine to use (chatgpt, gemini, ollama, or claude)-m, --model <model>                         Model to use (e.g. gpt-4o, gemini-2.0-flash-exp, llama3.3, claude-3-5-sonnet-latest)-r, --rate-limit-ms <rateLimitMs>           How many milliseconds between requests (defaults to 1s for Gemini, 120ms (at 500RPM) for ChatGPT, 1200msfor Claude)-f, --force-language-name <language name>   Force output language name-A, --all-languages                         Translate to all supported languages-p, --templated-string-prefix <prefix>      Prefix for templated strings (default: "{{")-s, --templated-string-suffix <suffix>      Suffix for templated strings (default: "}}")-k, --api-key <API key>                     API key-h, --host <hostIP:port>                    The host and port number serving Ollama. 11434 is the default port number.--ensure-changed-translation                Each generated translation key must differ from the input (for keys longer than 4) (default: false)-n, --batch-size <batchSize>                How many keys to process at a time (default: "32")--skip-translation-verification             Skip validating the resulting translation through another query (default: false)--skip-styling-verification                 Skip validating the resulting translation's formatting through another query (default: false)--override-prompt <path to JSON file>       Use the prompts from the given JSON file, containing keys for at least one of generationPrompt,translationVerificationPrompt, stylingVerificationPrompt--prompt-mode <prompt-mode>                 Chose between 'csv' mode for better performance and 'json' mode for better compatibility,--batch-max-tokens <batch-max-tokens>       For json mode only, maximum size of a single request in tokens--verbose                                   Print logs about progress (default: false)--help                                      display help for command
</code></span></span></span></span>
<span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><span style="color:#1f2328"><span style="color:var(--fgColor-default, var(--color-fg-default))"><span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><code>Usage: i18n-ai-translate diff [options]Options:-b, --before <fileOrDirectoryBefore>      Source i18n file or directory before changes, in the jsons/ directory if a relative path is given-a, --after <fileOrDirectoryAfter>        Source i18n file or directory after changes, in the jsons/ directory if a relative path is given-l, --input-language <inputLanguageCode>  The input language's code, in ISO6391 (e.g. en, fr)-e, --engine <engine>                     Engine to use (chatgpt, gemini, ollama, or claude)-m, --model <model>                       Model to use (e.g. gpt-4o, gemini-2.0-flash-exp, llama3.3, claude-3-5-sonnet-latest)-r, --rate-limit-ms <rateLimitMs>         How many milliseconds between requests (defaults to 1s for Gemini, 120ms (at 500RPM) for ChatGPT, 1200ms forClaude)-k, --api-key <API key>                   API key-h, --host <hostIP:port>                  The host and port number serving Ollama. 11434 is the default port number.--ensure-changed-translation              Each generated translation key must differ from the input (for keys longer than 4) (default: false)-p, --templated-string-prefix <prefix>    Prefix for templated strings (default: "{{")-s, --templated-string-suffix <suffix>    Suffix for templated strings (default: "}}")-n, --batch-size <batchSize>              How many keys to process at a time (default: "32")--skip-translation-verification           Skip validating the resulting translation through another query (default: false)--skip-styling-verification               Skip validating the resulting translation's formatting through another query (default: false)--override-prompt <path to JSON file>     Use the prompts from the given JSON file, containing keys for at least one of generationPrompt,translationVerificationPrompt, stylingVerificationPrompt--prompt-mode <prompt-mode>               Chose between 'csv' mode for better performance and 'json' mode for better compatibility,--batch-max-tokens <batch-max-tokens>     For json mode only, maximum size of a single request in tokens--verbose                                 Print logs about progress (default: false)--help                                    display help for command
</code></span></span></span></span>

Example usage  用法示例

npx i18n-ai-translate translate -i en.json -o fr

  • Translate the en.json file in jsons/ to French, and save the output in fr.json
    将 jsons/ 中的 en.json 文件翻译成法语,并将输出保存在 fr.json 中

npx i18n-ai-translate translate -i en.json -o es de nl --engine gemini

  • Translate the en.json file in jsons/ to Spanish, German, and Dutch, and save each file in jsons/, using Google Gemini
    使用 Google Gemini 将 jsons/ 中的 en.json 文件翻译成西班牙语、德语和荷兰语,并将每个文件保存在 jsons/ 中

npx i18n-ai-translate diff -b en.json -a en-after.json -l English --verbose --engine ollama --host my-olllama-server.com:12345

  • Translate the keys that have changed between en.json and en-after.json for all files in the en.json directory, with logging enabled using Ollama running on my-ollama-server.com:12345
    转换 en.json 目录中所有文件的 en.json 和 en-after.json 之间更改的键,并使用在 my-ollama-server.com:12345 上运行的 Ollama 启用日志记录

npx i18n-ai-translate translate -i en.json -A --engine chatgpt --model gpt-4-turbo --api-key <my_key> --rate-limit-ms 150 -n 64

  • Translate the en.json file in jsons/ to 200+ languages, save each file in jsons/, using the GPT-4 Turbo model of ChatGPT, with the given key, a rate limit of 150ms between requests, and 64 keys sent in each batch
    将 jsons/ 的 en.json 文件翻译成 200+ 种语言,使用 ChatGPT 的 GPT-4 Turbo 模型,使用给定的 key,请求之间的限速为 150ms,每批发送 64 个 key

npx i18n-ai-translate diff -b en -a en-after --engine claude

  • Translate the keys that have changed between en/ and en-after/ for all JSON files in both directories using Claude
    使用 Claude 翻译两个目录中所有 JSON 文件的 en/ 和 en-after/ 之间更改的键

五、As a library  作为库

或者,导入此项目并使用它通过 translate() 即时转换 JSON,或者在源 i18n 文件发生更改时使用 translateDiff() 获取已修改键的更新。

import { translate, translateDiff } from "i18n-ai-translate";...const translation = await translate({apiKey, // OpenAI/Gemini/Anthropic API keybatchMaxTokens, // Maximum amount of tokens for one requestbatchSize, // How many keys to process at a timechatParams, // Additional configuration to pass to the modelengine, // ChatGPT, Gemini, Ollama, or ClaudeensureChangedTranslation, // Every key longer than 4 characters must be different than the inputhost, // The host and port number running OllamainputJSON, // JSON to translateinputLanguage, // Language of inputJSONmodel, // Model to use (e.g. gpt-4o, gemini-2.0-flash-exp, llama3.3, claude-3-5-sonnet-latest)outputLanguage, // Targeted language (e.g. French, Spanish, etc.)overridePrompt, // Set custom prompts for generation or verificationpromptMode, // Chose between 'csv' mode and 'json' moderateLimitMs, // How many milliseconds between requestsskipStylingVerification, // Whether to skip an additional query to see whether the text formatting remained consistentskipTranslationVerification, // Whether to skip an additional query to see whether the resultant translation makes sensetemplatedStringPrefix, // The start of inline variables; defaults to "{{"templatedStringSuffix, // The end of inline variables; defaults to "}}"verbose, // Print status of conversion to stdout/stderr});const translations = await translateDiff({apiKey, // OpenAI/Gemini/Anthropic API keybatchMaxTokens, // Maximum amount of tokens for one requestbatchSize, // How many keys to process at a timechatParams, // Additional configuration to pass to the modelengine, // ChatGPT, Gemini, Ollama, or ClaudeensureChangedTranslation, // Every key longer than 4 characters must be different than the inputhost, // The host and port number running OllamainputJSONAfter, // The source translation after a changeinputJSONBefore, // The source translation before a changeinputLanguage, // Language of inputJSONBefore/Aftermodel, // Model to use (e.g. gpt-4o, gemini-2.0-flash-exp, llama3.3, claude-3-5-sonnet-latest)overridePrompt, // Set custom prompts for generation or verificationpromptMode, // Chose between 'csv' mode and 'json' moderateLimitMs, // How many milliseconds between requestsskipStylingVerification, // Whether to skip an additional query to see whether the text formatting remained consistentskipTranslationVerification, // Whether to skip an additional query to see whether the resultant translation makes sensetemplatedStringPrefix, // The start of inline variables; defaults to "{{"templatedStringSuffix, // The end of inline variables; defaults to "}}"toUpdateJSONs, // An object of language codes to their translationsverbose, // Print status of conversion to stdout/stderr
});

六、CSV Mode  CSV 模式

Translation prompt  翻译提示

Batches of the i18n input are passed in. Each call is checked to ensure no keys are lost, all templated strings are retained, and no translations were skipped.
传入 i18n 输入的批次。检查每个调用以确保没有键丢失,所有模板化字符串都被保留,并且没有跳过任何翻译。

<span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><span style="color:#1f2328"><span style="color:var(--fgColor-default, var(--color-fg-default))"><span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><code>You are a professional translator.Translate each line from ${inputLanguage} to ${outputLanguage}.Return translations in the same text formatting.Maintain case sensitivity and whitespacing.Output only the translations.All lines should start and end with an ASCII quotation mark (").${input}
</code></span></span></span></span>

Translation verification prompt
翻译验证提示

The output of the translation is sent back to ensure the model is okay with the translation. If this fails, the translation is re-generated.
将翻译的输出发回以确保模型对翻译没有问题。如果失败,则会重新生成转换。

<span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><span style="color:#1f2328"><span style="color:var(--fgColor-default, var(--color-fg-default))"><span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><code>Given a translation from ${inputLanguage} to ${outputLanguage} in CSV form, reply with NAK if _any_ of the translations are poorly translated.Otherwise, reply with ACK.Only reply with ACK/NAK.
</code></span></span></span></span>

Styling verification prompt
样式验证提示

Formatting from the input should be retained where possible. If punctuation, capitalization, or whitespaces differ between the source and the translation, the translation is re-generated.
应尽可能保留输入中的格式。如果源和翻译之间的标点符号、大小写或空格不同,则会重新生成翻译。

<span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><span style="color:#1f2328"><span style="color:var(--fgColor-default, var(--color-fg-default))"><span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><code>Given text from ${inputLanguage} to ${outputLanguage} in CSV form, reply with NAK if _any_ of the translations do not match the formatting of the original.Check for differing capitalization, punctuation, or whitespaces.Otherwise, reply with ACK.Only reply with ACK/NAK.
</code></span></span></span></span>

JSON Mode  JSON 模式

Translation prompt json  翻译提示 json

Batches of the i18n input are passed in. Each call is checked to ensure no keys are lost, all templated strings are retained, and no translations are skipped.
传入 i18n 输入的批次。检查每个调用以确保没有键丢失,保留所有模板化字符串,并且不会跳过任何翻译。

<span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><span style="color:#1f2328"><span style="color:var(--fgColor-default, var(--color-fg-default))"><span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><code>You are a professional translator.Translate from ${inputLanguage} to ${outputLanguage}.- Translate each object in the array.
- 'original' is the text to be translated.
- 'translated' must not be empty.
- 'context' is additional info if needed.
- 'failure' explains why the previous translation failed.
- Preserve text formatting, case sensitivity, and whitespace.Special Instructions:
- Treat anything in the format {{variableName}} as a placeholder. Never translate or modify its content.
- Do not add your own variables
- The number of variables like {{timeLeft}} must be the same in the translated text.
- Do not convert {{NEWLINE}} to \\n.Return the translation as JSON.
\`\`\`json
${input}
\`\`\`
</code></span></span></span></span>

Translation verification prompt json
翻译验证提示 json

The output of the translation is sent back to ensure the model is okay with the translation/formatting. If this fails, the translation is re-generated.
将翻译的输出发回,以确保模型对翻译/格式设置没有问题。如果失败,则会重新生成转换。

<span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><span style="color:#1f2328"><span style="color:var(--fgColor-default, var(--color-fg-default))"><span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><code>You are a professional translator.Check translations from ${inputLanguage} to ${outputLanguage}.- Verify each object in the array.
- 'original' is the text to be translated.
- 'translated' is the translated text.
- 'context' is additional info if needed.
- 'failure' explains why the previous translation failed.
- check for Accuracy (meaning, tone, grammar), Formatting (case, whitespace, punctuation).If correct, return 'valid' as 'true' and leave 'fixedTranslation' and 'issue' empty.
If incorrect, return 'valid' as 'false' and put the fixed translation in 'fixedTranslation' and explain what is 'issue'.Special Instructions:
- Treat anything in the format {{variableName}} as a placeholder. Never translate or modify its content.
- Do not add your own variables
- The number of variables like {{timeLeft}} must be the same in the translated text.
- Do not convert {{NEWLINE}} to \\n.Allow minor grammar, phrasing, and formatting differences if meaning is clear.
Flag only significant issues affecting accuracy or readability.Return the verified as JSON.
\`\`\`json
${input}
\`\`\`
</code></span></span></span></span>

Prompt overriding  提示覆盖

Replace the aforementioned prompts with your own by creating a JSON file containing keys of at least one of generationPrompttranslationVerificationPrompt, or stylingVerificationPrompt. Then, pass it as an argument with --override-prompt <path to file>. Be sure to include templated arguments like ${inputLanguage} as part of the prompt.
通过创建一个 JSON 文件,将上述提示替换为您自己的提示,该文件至少包含 generationPrompttranslationVerificationPrompt 或 stylingVerificationPrompt 中的至少一个键。然后,将其作为参数传递。 --override-prompt <path to file> 请务必在提示符中包含模板化参数,例如 ${inputLanguage}

软件下载

夸克网盘分享

本文信息来源于GitHub作者地址:https://github.com/taahamahdi/i18n-ai-translate

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/78515.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Flask + ajax上传文件(一)--单文件上传

一、概述 本教程将教你如何使用Flask后端和AJAX前端实现文件上传功能,包含完整的代码实现和详细解释。 二、环境准备 1. 所需工具和库 Python 3.xFlask框架jQuery库Bootstrap(可选,用于美化界面)2. 安装Flask pip install flask三、项目结构 upload_project/ ├── a…

如何在 Postman 中,自动获取 Token 并将其赋值到环境变量

在 Postman 中&#xff0c;你可以通过 预请求脚本&#xff08;Pre-request Script&#xff09; 和 测试脚本&#xff08;Tests&#xff09; 实现自动获取 Token 并将其赋值到环境变量&#xff0c;下面是完整的操作步骤&#xff1a; ✅ 一、创建获取 Token 的请求 通常这个请求…

北斗导航 | 基于Transformer+LSTM+激光雷达的接收机自主完好性监测算法研究

基于Transformer+LSTM+激光雷达的接收机自主完好性监测算法研究 接收机自主完好性监测(RAIM)是保障全球导航卫星系统(GNSS)定位可靠性的核心技术。传统RAIM算法依赖最小二乘残差法,存在故障漏检、对复杂环境适应性差等问题。结合Transformer、LSTM与激光雷达的多模态融合…

基于Python爬虫的豆瓣电影信息爬取(可以根据选择电影编号得到需要的电影信息)

# 豆瓣电影信息爬虫(展示效果如下图所示:) 这是一个功能强大的豆瓣电影信息爬虫程序,可以获取豆瓣电影 Top 250 的详细信息。 ## 功能特点 - 自动爬取豆瓣电影 Top 250 的所有电影信息 - 支持分页获取,每页 25 部电影,共 10 页 - 获取每部电影的详细信息,包括: - 标题…

Ubuntu22.04/24.04 P104-100 安装驱动和 CUDA Toolkit

硬件环境 使用一块技嘉 B85m-DS3H 安装 P104-100, CPU是带集成显卡的i5-4690. 先在BIOS中设置好显示设备优先使用集成显卡(IGX). 然后安装P104-100开机. 登入Ubuntu 后查看硬件信息, 检查P104-100是否已经被检测到 # PCI设备 lspci -v | grep -i nvidia lspci | grep NVIDIA …

东南亚与中东小游戏市场出海调研报告

东南亚与中东小游戏市场出海调研报告 目标市场筛选与概况 (The Gaming Market in Southeast Asia (SEA) | Allcorrect)图:2018–2027年东南亚主要国家游戏市场收入(亿美元)趋势。到2024年东南亚游戏市场规模预计将接近300亿美元 (2024年东南亚手游市场怎么样? - 快出海问…

力扣4-最长公共前缀

一.题目 编写一个函数来查找字符串数组中的最长公共前缀。 如果不存在公共前缀&#xff0c;返回空字符串 ""。 示例 1&#xff1a; 输入&#xff1a;strs ["flower","flow","flight"] 输出&#xff1a;"fl"示例 2&…

设计模式和单一原则笔记

单一原则&#xff1a;方法 对象 策略模式&#xff1a;方法实现 // 策略接口&#xff08;单一职责&#xff1a;定义计算规范&#xff09; public interface PriceStrategy {boolean match(String type); // 职责1&#xff1a;判断是否适用该策略double calculate(double pric…

常见正则表达式整理与Java使用正则表达式的例子

一、常见正则表达式整理 1. 基础验证类 邮箱地址 ^[a-zA-Z0-9._%-][a-zA-Z0-9.-]\\.[a-zA-Z]{2,}$ &#xff08;匹配如 userexample.com&#xff09;手机号 ^1[3-9]\\\\d{9}$ &#xff08;匹配国内11位手机号&#xff0c;如 13812345678&#xff09;中文字符 ^[\u4e00-\u9fa5…

vue2 项目的 vscode 插件整理

Folder Selector 当项目文件很多时&#xff0c;查找一个文件&#xff0c;可能需要在资源管理器中不断的滚动再打开文件夹查找文件&#xff0c;很麻烦&#xff0c;这个可以增加一个面板通过右键文件夹选择 然后在面板中查看文件 Reveal Button 文件中跳转到另一个文件时&#…

使用 Node、Express 和 MongoDB 构建一个项目工程

本文将详细介绍如何使用 Node.js Express MongoDB 构建一个完整的 RESTful API 后端项目&#xff0c;涵盖&#xff1a; 项目初始化 Express 服务器搭建 MongoDB 数据库连接 REST API 设计&#xff08;CRUD 操作&#xff09; 错误处理与中间件 源码结构与完整代码 部署建…

如何实现Spring Boot应用程序的安全性:全面指南

在现代 Web 开发中&#xff0c;安全性是 Spring Boot 应用程序的核心需求&#xff0c;尤其是在微服务、云原生和公开 API 场景中。Spring Boot 结合 Spring Security 提供了一套强大的工具&#xff0c;用于保护应用程序免受常见威胁&#xff0c;如未经授权的访问、数据泄露、跨…

无人机避障——Mid360+Fast-lio感知建图+Ego-planner运动规划(胎教级教程)

电脑配置:Xavier-nx、ubuntu 18.04、ros melodic 激光雷达:Livox_Mid-360 结果展示:左边Mid360+Fast-lio感知建图,右边Ego-planner运动规划 1、读取雷达数据并显示 无人机避障——感知篇(采用Livox-Mid360激光雷达获取点云数据显示)-CSDN博客 看看雷达数据话题imu以及…

数据库证书可以选OCP认证吗?

直接回答&#xff1a;国内OCP认证持有者的年薪普遍在15万到40万元之间&#xff0c;具体收入与经验、地区和行业强相关。OCP认证能大幅提升求职竞争力&#xff0c;但薪资天花板仍由个人能力决定。 一、薪资范围和核心影响因素 OCP认证是Oracle数据库领域的中高级“技术通行证”…

MySQL 从入门到精通:第二篇 - 数据类型、约束与索引

1. MySQL数据类型详解 数值类型 整数类型 -- 常用整数类型及范围 CREATE TABLE integer_types (tiny_col TINYINT, -- 1字节,有符号(-128~127),无符号(0~255)small_col SMALLINT, -- 2字节,有符号(-32768~32767),无符号(0~65535)medium_col MEDIUMINT,

Arduino 入门学习笔记(二):开发环境搭建

Arduino 入门学习笔记&#xff08;二&#xff09;&#xff1a;开发环境搭建 B站学习链接&#xff1a;link 1. Arduino IDE2软件介绍 Arduino IDE&#xff0c;Arduino Integrated Development Environment&#xff0c;即Arduino集成开发环境。 Arduino IDE具有程序编辑、调试…

ChatGPT、deepseek、豆包、Kimi、通义千问、腾讯元宝、文心一言、智谱清言代码能力对比

均使用测试时的最强模型 均是一次对话,对话内容一样 均开启深度思考 能联网的都联网了&#xff0c;但是作用不大&#xff0c;因为蓝桥杯刚考完&#xff0c;洛谷题目刚上传没多久 问题一测试了两遍 从问题三开始不再测试智谱清言&#xff08;它思考时间太长了&#xff0c;前两个…

OCR之身份证识别

前言 OCR身份证识别是光学字符识别技术在身份证领域的应用。通过扫描或拍照获取身份证图像&#xff0c;利用图像处理、深度学习等技术&#xff0c;自动提取姓名、性别、民族、出生日期、地址、身份证号等信息&#xff0c;可大幅提升信息录入效率&#xff0c;广泛应用于政务、金…

线性代数—向量与矩阵的范数(Norm)

参考链接&#xff1a; 范数&#xff08;Norm&#xff09;——定义、原理、分类、作用与应用 - 知乎 带你秒懂向量与矩阵的范数(Norm)_矩阵norm-CSDN博客 什么是范数&#xff08;norm&#xff09;&#xff1f;以及L1,L2范数的简单介绍_l1 norm-CSDN博客 范数&#xff08;Norm…

Java高频面试之并发编程-08

hello啊&#xff0c;各位观众姥爷们&#xff01;&#xff01;&#xff01;本baby今天来报道了&#xff01;哈哈哈哈哈嗝&#x1f436; 面试官&#xff1a;说说sleep和wait的区别&#xff1f; 1. 核心区别总结 特性sleep()wait()所属类Thread 类的静态方法Object 类的实例方法…