Entries tagged 'lang:en' (Page 9)

Automatically Extracting A String For The Use Of Alt Text From An Image File's Metadata

Entry created on 2024-02-14 (edited 2024-07-16) author:steeph (374) cat:Dublin Core (1) cat:IPTC (1) cat:Image Descriptions (1) cat:XMP (1) cat:exiftool (1) lang:en (253)

For my web site builder SBWG I've looked into ways to store image descriptions as meta data in the image file itself so it can be used as an img tag's alt attribute. The subject is a bit of a mess. So I decided to summarise the problems that I see and suggest a way of implementing automatic image descriptions from meta tags anyway.

Problems

First of all, there is the main issue that a good image description depends on the context in which the image is shown. For the same picture one might want to name the persons depicted, what they are wearing or their facial expressions if that is relevant, or the colours and contrasts between background and clothes and visible compression artefacts. In some other context, only the types of glasses worn or the hairstyles might be relevant. For the purpose of this post, in order to look beyond this problem, I have to ignore the possibility of wrong image descriptions because of re-used files or files used in several contexts. The creator, editor or curator of a web page or blog post must be responsible to make sure no wrong image description is present or used for the alt attribute. The same is true for mis-usage of meta tags, for example when some image editing software automatically uses a description field to store its copyright notice without the user's knowledge.

A script that automatically extracts the first string it finds among a list of XMP fields could just as well find an unrelated string, the string 'none', a badly written alt text, one that was written for a different context or a string that was not meant to serve as the alt text to the image. Many of the fields that are listed below are meant to store something else than an alt text. Overall it is entirely expected that this method will not extract a useful alt text from the vast majority of images, simply because hardly anybody bothers to write them. I plan to use this method anyway, as a fallback, to cover for the cases where I myself couldn't be bothered. Writing a meaningfiul alt text for the context in which the image is used is still the only way to make sure that there is one.

So looking for a string in all of those fields and inserting it as the alt text in <img> is not correct unless you know that a good alt text has been stored there. Doing so anyway makes this an experimentive feature. Using it with real image files from different sources will show if it is of much help or not even usable.

exiftool

The easiest free way of extracting meta data from image files is using exiftool. It supports more than just EXIF data and the list of supported file types is quite comprehensive in the image department. Then the main question is which tags to use. There is no widely used standard for storing image descriptions for alt attributes. IPTC defined the new tags 'Alt Text (Accessibility)' and 'Extended Description (Accessibility)' in 2024. But they seem to be catching on slowly. Before this tag was defined, many different tags were used by different projects, editing software and people. Additionally XMP tags aren't always implemented correctly; So the name of the tags can differ between different tools and software versions. After my research into which tags are mentioned to be used for similar purposed, I've compiled the following ordered list of tags that should be checked when generating HTML code with images.

Selection of Tags

  1. XMP-iptcCore:ExtDescrAccessibility
  2. Iptc4xmpCore:ExtDescrAccessibility
  3. ExtDescrAccessibility
  4. XMP-iptcCore:AltTextAccessibility
  5. Iptc4xmpCore:AltTextAccessibility
  6. AltTextAccessibility
  7. XMP:dc:description
  8. dc:description
  9. IPTC:Caption-Abstract
  10. Exif.Image.ImageDescription
  11. XMP:ImageDescription
  12. XMP:Descrption
  13. ImageDescription
  14. Description
  15. Exif.Photo.UserComment
  16. UserComment
  17. XMP:Headline
  18. Headline
  19. IPTC:Headline
  20. XMP-photoshop:Headline
  21. XMP-dc:Title
  22. dc:title
  23. Title
  24. IPTC:ObjectName
  25. Iptc4xmpExt:AOTitle
  26. AOTitle

This list does not contain some tags for which I've found evidence that they are used for image descriptions, but not commonly enough (e.g. when only one not too widely used image editor writes it). It's hard to decide where to end the list. There will always be some weird tool, some conversion script or some old camera that uses yet another tag. But I think I've made a reasonable decision in the length of the list. Some of the above are not according to the respective standard or don't belong in most image file types. But I argue it's worth checking for them because there's not much cost to it and people don't always follow standards exactly, thus manually tagging images or creating software that tags images with fields in the wrong namespace or with the same fields across all image file types. Some of the tags listed (Title, Headline) aren't meant for image descriptions. But it has been suggested to use them for short descriptions in the past. Plus I argue if there is an image title, but no description or alt text whatsoever, it is still better to use the title than to not have an alt text at all. Other fields may be worthwhile to implement, too (Credit Line, Creator's Contact Info, Copyright Notice or others depending on the application). For a really extensive alt text the following format could be used, if those fields are filled: "[Image Title] by [Credit] ([Contact Email]): [ExtDescrAccessibility]"

Additionally to the tags mentioned, many XMP tags (e.g. Iptc4xmpCore:AltTextAccessibility, Iptc4xmpCore:ExtDescrAccessibility, dc:Description) can store values in different languages. Those could be respected as well if the language of the generated web page is known. Checking if any are set and using one if not empty should be simple. For those file formats that don't support XMP tags and those not supported by exiftool, I'm not aware of any meta data tags that do the job. The above list is for image files in general. Other file types may have other/additional tags that are useful for similar purposes to the img tags alt attribute. Video file formats definitely have several different additional description fields. Those would be interesting to extract and display, too.

For a clean implementation without so many different tags, only AltTextAccessibility and maybe ExtDescrAccessibility are necessary. Those are the most "official" ones and will likely become the most widely used for image descriptions.

Consciousness

Entry created on 2024-07-15 author:steeph (374) cat:#100DaysToOffload (41) cat:Consciousness (1) cat:Philosophy (5) cat:Science (6) lang:en (253)

Consciousness is such a heavy topic that, even if I keep clear of actually trying to address the so-called hard problem, writing anything on it feels like I'm over-stretching my copetence in both science and philosophy. But I've decided to be confident enough to type out some of my thoughts an how the subject is discussed.

The topic interests me on an academic hobby level. Consciousness in dreams especially is something that I've read and thought a lot about and experimented with over years. Really explaining the nature of the brain-tingling that a good philosophical chain of thoughts gives me would take a lot longer than I'm prepared to spend writing this entry and would probably produce enough related sentences to write a book about it. Suffice it to say I'm interested - among other things - in how experiences and thereby people's realities change when input is filtered differently by the brain that processes the input (more of less or differently consciously).

One reason why I find it hard to structure thoughts around the topic is because of the definition of consciousness. There is none that encopasses all the cases where it is regularly used with the assumption that the meaning of the word in the context it is used in is clear, or obvious. That is OK in principle. And I've decided to do thew same here and not define it in any way, for simplicity. But when discussing the topic academically, when writing a paper on a related subject or when writing a book on it (with an academic target audience or not), a definition that prefaces the presentation of any concept or theory is necessary to allow for a productive discussion. Without a definition on such a varied subject interesting things may be said on it. But it's complicated to impossible to discuss them in a structured way or to do epirical reasearch on them. In other words, they lose some very important possibilities of being useful above entertainment. That is probably why a definition usually is brought forth in such publications. But not always. Introducing a concept on most other topics doesn't require the author to first define what they think the field of research actually is about. But such a requirement inheres - in my opinion - in discussing the subject of consciousness; something that can be experienced by somebody who agrees to the fact that they are experiencing it (according to some definitions) but who at the same time argues that it (according to some definitions) may not exist as a distinguishable state. I've seen a panel discussion once where two of the participants discovered their diverging definitions of consciousness in regards of what they wanted to talk about that day halfway through the discussion, which lead them to agree to every seemingly contradicting statements based on the assumption that they each other were the expert on what they were talking about. That was a funny and useful one compared to other panel discussions that muddle ideas and thoughts on the topic by mixing concepts that are not reconcilable with each other.

I'll leave it at that for now because I don't want to actually say anything about consciousness before producing a formal definition, which, in confusion over different views on what consciousness is, I'm not prepared to do.

The Best Movies Ever

Entry created on 2024-07-10 author:steeph (374) cat:#100DaysToOffload (41) cat:Films (22) lang:en (253)

I like to recommend movies. Because I like to discover movies that serve me as a source of a good mystery, an emotional journey, or fun. But it's not easy to recommend some film to somebody with a different taste than me, which is everybody that I know. But I think it is pretty likely that you will like this recommendation - if you take the time to follow it.

Something like three years ago I've started to watch the titles on the then current IMDb Top 250 Movies list. The way I do it is to keep the next 8 to 16 titles with me, ready to watch when I like to. When I'm not in the mood for a movie, find it booring or for other reasons not worth following through, I skip to the next one but keep the skipped movie to give it at least another two chances. That way I always have at least some very good movies with me, ready to be watched, even when I'm travelling or have no access to the internet. I started this because there are some very well known and very popular movies that I had never watched and I didn't know if that's because of a preconception or not. I'm slowly going through the classics of all genres. Even the horror movies I at least watch for a while. Although I say that horror is not for me, there are some very good ones that I enjoyed in a way. I've watched Casablanca and North By Northwest and get those references now and I know that I don't need to watch them again. I get to see some Chinese and Indian movies that I would have never had the idea to check out. I've seen 12 Years a Slave and To Kill a Mockingbird for the first time and now their relevance now. So many other great movies that I had missed out on for a long time for various reasons. I've eaven discovered some movies that really are for me but I've never heard of before, like Paris, Texas and Jagten. Again, all the classics people from different generations expect others to know, like The Shawshank Redemption" and Psycho, are in the reportoir of comparisons I can make now. From some I learned pieces of history, like from Hotel Rwanda and Gandhi. Some Anime like Hotaru no haka and Kimi no na wa., I would probably have never watched if they weren't rated that highly. ANd in between all of that, I get to watch many of my favourite movies as well as very good movies that I haven't seen since I was much younger.

I don't watch all of them, by far. And that is where I'll stop naming titles in pairs, or at all. I just don't like some movie styles and others are too boring or too far outside of my reality (without any element that keeps my interest up otherwise) and so I abandon them after a couple of attempts to make me interested. I'm not through yet. There are still many classics coming up. And even now there are new titles on the current list, like Oppenheimer and Joker, that I know I'd like to watch. So either when I will be through my list, I'll look at the then current one and see if I want to catch up or start anew. Because many of these movies are worth wathing again after five years.

In my experience, watching one after one of these movies has been a great way to discover new movies of very high quality, rediscover old gems, get to know classics and re-watch favourites because it is a relatively broad list. Not one that is confined to genres, a time period or a culture that I'm familiar with and that I already know has movies that I like.

It's possible to convince somebody of something with the right (form of) argument.

Entry created on 2024-07-09 author:steeph (374) cat:#100DaysToOffload (41) cat:Beliefs (2) cat:Communication (3) cat:Conspiracy Narratives (1) cat:Conversation (2) cat:Corona (9) cat:Opinion (9) cat:Science (6) cat:Thinking (3) lang:en (253)

There is this thing that I've noticed happen when I'm speaking about something I've heard or read about but don't feel like an expert on. I believe that one should not spread information unless one truely understands it as well as how the information was gathered, what knowledge it builds on, what relevance and meaning it has in the context it likely will be applied in by the person who receives the information, and a few other principles that are hardly possible to honour every time. Those principles cannot be applied to everday conversations like smalltalk, without eliminating the interaction. (That's another topic, though.) So I don't apply them in general conversations with colleagues and customers and often overlook them in conversations with friends and other peers. So it is almost inevitable that I at some point say something I'm not 99.99% sure is correct the way I present it. It happens a lot with "interesting facts" and "what most people don't know". What happens then is that I feel in the wrong to some degree - because I have not made absolutely sure that I'm neither wrong nor going to be misunderstood - while the person I'm speaking to (if they see me as a peer, take me serious and are listening to me) takes what I say as new information and fits in into what they already know and believe. They don't know about the tiny feeling of guilt that I have. So I am regularly surprised when I speak to someone and seem to influence their set of beliefs inadvertently.

How to convince somebody of something is quite a complicated question psychologically. I've read enough about it to know that and to know that I'm not interested in learning how to do it in any professional way (or with style). But there are some interesting aspects to know about how easily people can change their mind in some situations and how tough it is to make somebody change their mind in others.

There was an experiment done that is often referred to in social media sometimes as an interesting bit of knowledgle and sometimes as an argument of an almost political nature, hinting at the stubbernness or irrationality of people with different beliefs (usually beliefs that deverge from the widely accepted set of scientific knowdlege). The simplified conclusion of this study is often presented as this: Presenting a person with a firm belief evidence that their belief is factually wrong makes it even stronger (see Backfire Effect). The conclusion that people draw from this sometimes is: Arguing rationally with somebody with an irrational belief will have the opposite from the intended effect. That is not usually true, though. Not only are cases where that happened rare even in the study that is referred to, the effect could also not be replicated when several researchers tried.

Sometimes I come across a person and learn of a belief of theirs that I find problematic for some reason or another. An extremist attitude to societies basic questions, fascist ideas formulated into political demands, a conspiracy narrative that results in hostile behaviour, things like that. These are usually beliefs with a large foundation that was built over years if not decades and they are often embedded in a world view that justifies and explains anything that might appear to others to oppose ethical code or the reasoning behind the belief. But "often" is not "always". And even if those things are the case is the assumption that simple, rational arguments won't have a positive effect is an erroneous one that is made too quickly. Yes, it seems like a hard undertaking to craft responses that take the opposite of your own beliefs into account properly, not as the hallucination of the enemy camp but as an equal to your own opinion. It also feels like the work necessary to formulate a response that foresees all the expectable counter-arguments and to answer all the antagonistical follow-up questions. That's the things I expect to be confronted with after objecting to something somebody said in a conversation. Correctly so. But if forging a plan to optimally convince the opponent to abandon a belief of theirs is not what I want to do, then it's not necessary to put that much work into it. You can just respond honestly with a simple thought and even end the conversation if it becomes too cumbersome. When a topic has an emotional component, it's easy to forget that keeping this on the level of a regular conversation with no expectation that it will have any meaning to anybody other than passing time.

The insight that I keep having and intend to remember in applicable situations more often is that it is not necessary but possible to convince somebody to take on a different view on something. My mind is not short of explanations and explanation attempts from opposite viewpoints and I'm ready to share them with others to encourage a broadening of their thinking. If it's my own view, a belief based on my own experience, I'm often more reluctant to share it if it opposes somebody else's belief. But it is worth it. Provided both conversing parties bring forth the necessary trust to take other's assertions seriously, a calm, rational objection is far better than cutting the topic short. The latter can easily have the same effect as saying something like "Oh, you're one of those." Derogatory remarks should be avoided just like dismissing a concern, be it ever so irrational. Ignoring an argument for being too absurd or discrediting a source without a reason, talking down or being in any way not as respectful as you would like to be treated yourself in an emotional discussion will not get you closer to invoking insight nor to learning something useful yourself. Those aren't new ideas. The realisation that is, as a conscious insight, new to me, is that I'm far more likely to influence somebody's thinking than I assumed. If a respectful discussion can't be maintained for after small talk got out of the area of the mundane, I don't need to maintain it any longer. One sincere offer of a different view on something is better than none, and better than one with a snarky remark about anti-science belief systems appended, which will likely not make your conversational partner want to think about any of what you said. Say something positive and let it sink it. The hours and even night after you talked can do a lot for making a new idea a familiar one that can or needs to be integrated with ones world view.

I will not continue to give tips on how to convince people of anything. That's not what this entry was supposed to be about. And I'm not experienced enough to give good tips. But I want to leave a book referral here. I can't recommend it, because I haven't read it. But it appears to me that Lee McIntyre knows what he's talking about in his book "How to Talk to a Science Denier". I conclude that from what he says in book introduction (YT, IV.

Entry created on 2024-07-05 author:steeph (374) cat:#100DaysToOffload (41) cat:Cars (1) cat:Driving (1) cat:Opinion (9) cat:Stress (1) lang:en (253)

Here's a controversal conviction that I've developed over the past couple of years: Humans are not able to operate a car savely at road speeds. Ergo, humans should not be allowed to drive.

I drive a lot in my current job. I may not be the best of drivers for many reasons but I tend to accept and abide by the rules if in doubt (and in general, because that's what rules are for). I've learned to save gas and breaks by coasting just right. I've learned to adjust my speed not only to road conditions but also to amount and type of traffic. I don't use apps that warn of speed cameras or police check points because I don't have to. I drive sensibly. I'm not payed more if I get to the customer earlier. I gain quality of life if I drive calmly and defensively. By the measurements that I learned in driving school, I'm a relatively good driver. In practice, when I share a road with other drivers, in the real world, I don't think I can count as a good driver though.

Most people seem to make their own rules for the road and assume that everybody will drive by their rules. They drive 5 km/h over, 10 km/h over, 20 km/h over. They assume a right to overtake because they chose to drive 50 km/h over the limit. They expect you to jump a red light if it's been red for less than two seconds. They assume right of way if no sign reminds them of the rules. Not everybody does all of those things. Most people try to respect the rules as they are put down by law (maybe except driving 5 km/h over). But some people, sometimes, follow their own rules, which is when everybody who doesn't gets in their way. That is often argued to be aproblem of "those drivers" being selfish, stupid and/or respectless. But the truth is likely that all of the people who sometimes drive according to their own rules do so because they are convinced that it's the right thing to do. In fact sometimes drivers spend thousands of Euros to argue in court that their own rules where the right ones to follow as opposed to the ones written down in the relevant law. They get angry and frustrated at people who strictly respect the official rules as the other way around. Of course I'm simplifying a lot here to make my point. I'm not describing any particular example for that reason. But I reckon most people don't break rules and make it harder for others on purpose. Two exceptions: Some people sometimes do have the intention to harm others and try to do so by driving a car. And people sometimes spontaniously decicde to provoke other drivers after they felt provoked or feel like somebody should do something about the behaviour of another driver. I can't say anything about the first exception. That's not the topic of this entry. The second exception I'll come back to later when I talk about stress.

So, when driving intend to drive sensibly according to the rules they deem the correct set, and still clash with other drivers, as it constantly happens on busy reads, that means that either simply setting up rules and hoping that everybody will follow them as well as possible isn't enough or that people are always going to make their own rules. I think the latter is close to the trouth considering the amount of work that goes into trying to make people abide by the defined rules (teaching classes, enforcing physically, convincing by extra signs, commercials, punishment, …).

It is so common for drivers to breaks the rules that certain rules are expected to be broken by the vast majority of drivers most of the time. Driving below or at the speed limit is a very easy way to tease other traffic participants. Driving 100 or 80 km/h in the rain where that is required by law is seen as traffic obstruction by most people. Not stopping at a stop sign in a driving test will immediately revoke your chance of getting a licence. But stopping at a stop sign after you got your license tells others that you're a bad driver or an ass. Hardly anybody ever does it. Good driving doesn't only come down to following the rules like I may have made it sound just now. But the fact that despite all the investments some people see the rules as something that should be generally followed and others drive with the assumption that some rules obviously will and should not be followed creates a constant conflict that seems almost impossible to resolve. Maybe truely impossible as long as so many so different infdividuals control cars on the same road.

Another thing, probably the more important one when it comes to explaining why I believe that humans can not drive cars acceptably well, is how hostile male drivers become when driving under stress. And people are stressed. Working full while also having a life is regularly stressful and I don't need to list the range of hundrets of reason why people get overly stressed every day. It's a point that's often made: People chance character when driving a car. They are capable of atrocious thoughts when driving under stress. They are easy to develop hate at other road participants without being able to communicate much with them. It's a known problem. Men build up rage while driving unless they do some really stupid thing. Knowing about your own tendency to react that way to other drivers being on the same road you're going on doesn't prevent you from reacting with anger to repeated small inconsistancies in other drivers behaviours. And with contempt at people who make up their own rules and ignore your rule set. And with hate to manouvers that you see as an indication of a respectless attitude in other drivers. And with rage at the constant occurance of such situations.

Of course rage is not a constant state while driving. And you might say that, all in all, it does seem to work out relatively well because people aren't having accidents every other day. Accidents with injuries are rare with modern cars. But I think that tens of millions of injuries and more than a million deaths per year (WHO report) are about 100 % more than it should be. Above that though, I think that the hostility and trauma that driving under stress generates constantly, whether you are one of the agressive ones or one who swollows without externalising your anger, is enough reason to prohibit humans from driving cars at speeds abover 20 km/h. But of course that is unrealistic. Too late, after humans have been driving cars since they exist.

The common assumption seems to be that this problem will solve itself when selfdriving cars become a common reality and over the then following 20 years most cars will be replaced with ones that don't require a human driver anymore. Only poor people will drive themselves, and later only vintage car enthusiasts. But That's still science fiction. Closer than ever, yes. But not a reality that is here yet, and possibly not even on the horizon.

The solution is simple: Make driving illegal. Force people to find other ways of getting where they need to go. People have to walk more, drive bikes and if they want to ride carriages with horsed more often and for more practical reasons than nowadays. The economy will collapse from the sudden change what's possible at short notice. But the problem that people drive badly will be solved.

Go To Navigation Page
Show/Hide Navigation